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

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 // This is only needed for testing high promotion mode.
1553 void SetNewSpaceHighPromotionModeActive(bool mode) {
1554 new_space_high_promotion_mode_active_ = mode;
1550 } 1555 }
1551 1556
1552 inline PretenureFlag GetPretenureMode() { 1557 inline PretenureFlag GetPretenureMode() {
1553 return new_space_high_promotion_mode_active_ ? TENURED : NOT_TENURED; 1558 return new_space_high_promotion_mode_active_ ? TENURED : NOT_TENURED;
1554 } 1559 }
1555 1560
1556 inline Address* NewSpaceHighPromotionModeActiveAddress() { 1561 inline Address* NewSpaceHighPromotionModeActiveAddress() {
1557 return reinterpret_cast<Address*>(&new_space_high_promotion_mode_active_); 1562 return reinterpret_cast<Address*>(&new_space_high_promotion_mode_active_);
1558 } 1563 }
1559 1564
(...skipping 1547 matching lines...) Expand 10 before | Expand all | Expand 10 after
3107 AssertNoAllocation no_alloc; // i.e. no gc allowed. 3112 AssertNoAllocation no_alloc; // i.e. no gc allowed.
3108 3113
3109 private: 3114 private:
3110 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer); 3115 DISALLOW_IMPLICIT_CONSTRUCTORS(PathTracer);
3111 }; 3116 };
3112 #endif // DEBUG 3117 #endif // DEBUG
3113 3118
3114 } } // namespace v8::internal 3119 } } // namespace v8::internal
3115 3120
3116 #endif // V8_HEAP_H_ 3121 #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