Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7)

Side by Side Diff: src/heap.h

Issue 15734007: Move global pretenuring flag check to ShouldGloballyPretenure(). (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/flag-definitions.h ('k') | src/heap.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1528 matching lines...) Expand 10 before | Expand all | Expand 10 after
1539 intptr_t change_in_bytes); 1539 intptr_t change_in_bytes);
1540 1540
1541 // Allocate uninitialized fixed array. 1541 // Allocate uninitialized fixed array.
1542 MUST_USE_RESULT MaybeObject* AllocateRawFixedArray(int length); 1542 MUST_USE_RESULT MaybeObject* AllocateRawFixedArray(int length);
1543 MUST_USE_RESULT MaybeObject* AllocateRawFixedArray(int length, 1543 MUST_USE_RESULT MaybeObject* AllocateRawFixedArray(int length,
1544 PretenureFlag pretenure); 1544 PretenureFlag pretenure);
1545 1545
1546 // Predicate that governs global pre-tenuring decisions based on observed 1546 // Predicate that governs global pre-tenuring decisions based on observed
1547 // promotion rates of previous collections. 1547 // promotion rates of previous collections.
1548 inline bool ShouldGloballyPretenure() { 1548 inline bool ShouldGloballyPretenure() {
1549 return new_space_high_promotion_mode_active_; 1549 return FLAG_pretenuring && new_space_high_promotion_mode_active_;
1550 }
1551
1552 void SetNewSpaceHighPromotionModeActive(bool mode) {
Michael Starzinger 2013/05/23 08:05:28 nit: Can we add a short one-liner comment here say
Hannes Payer (out of office) 2013/05/23 08:54:52 Done.
1553 new_space_high_promotion_mode_active_ = mode;
1550 } 1554 }
1551 1555
1552 inline PretenureFlag GetPretenureMode() { 1556 inline PretenureFlag GetPretenureMode() {
1553 return new_space_high_promotion_mode_active_ ? TENURED : NOT_TENURED; 1557 return new_space_high_promotion_mode_active_ ? TENURED : NOT_TENURED;
1554 } 1558 }
1555 1559
1556 inline Address* NewSpaceHighPromotionModeActiveAddress() { 1560 inline Address* NewSpaceHighPromotionModeActiveAddress() {
1557 return reinterpret_cast<Address*>(&new_space_high_promotion_mode_active_); 1561 return reinterpret_cast<Address*>(&new_space_high_promotion_mode_active_);
1558 } 1562 }
1559 1563
(...skipping 1547 matching lines...) Expand 10 before | Expand all | Expand 10 after
3107 AssertNoAllocation no_alloc; // i.e. no gc allowed. 3111 AssertNoAllocation no_alloc; // i.e. no gc allowed.
3108 3112
3109 private: 3113 private:
3110 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 3114 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
3111 }; 3115 };
3112 #endif // DEBUG 3116 #endif // DEBUG
3113 3117
3114 } } // namespace v8::internal 3118 } } // namespace v8::internal
3115 3119
3116 #endif // V8_HEAP_H_ 3120 #endif // V8_HEAP_H_
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/heap.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698