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

Side by Side Diff: src/spaces.h

Issue 11415070: Forward white to grey transition only if slot is before the progress bar of a given object. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years 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/incremental-marking-inl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 progress_bar_ = progress_bar; 496 progress_bar_ = progress_bar;
497 } 497 }
498 498
499 void ResetProgressBar() { 499 void ResetProgressBar() {
500 if (IsFlagSet(MemoryChunk::HAS_PROGRESS_BAR)) { 500 if (IsFlagSet(MemoryChunk::HAS_PROGRESS_BAR)) {
501 set_progress_bar(0); 501 set_progress_bar(0);
502 ClearFlag(MemoryChunk::HAS_PROGRESS_BAR); 502 ClearFlag(MemoryChunk::HAS_PROGRESS_BAR);
503 } 503 }
504 } 504 }
505 505
506 bool IsLeftOfProgressBar(Object** slot) {
507 Address slot_address = reinterpret_cast<Address>(slot);
508 ASSERT(slot_address > this->address());
509 return (slot_address - this->address() + kObjectStartOffset) <
510 progress_bar();
511 }
506 512
507 static void IncrementLiveBytesFromGC(Address address, int by) { 513 static void IncrementLiveBytesFromGC(Address address, int by) {
508 MemoryChunk::FromAddress(address)->IncrementLiveBytes(by); 514 MemoryChunk::FromAddress(address)->IncrementLiveBytes(by);
509 } 515 }
510 516
511 static void IncrementLiveBytesFromMutator(Address address, int by); 517 static void IncrementLiveBytesFromMutator(Address address, int by);
512 518
513 static const intptr_t kAlignment = 519 static const intptr_t kAlignment =
514 (static_cast<uintptr_t>(1) << kPageSizeBits); 520 (static_cast<uintptr_t>(1) << kPageSizeBits);
515 521
(...skipping 2206 matching lines...) Expand 10 before | Expand all | Expand 10 after
2722 } 2728 }
2723 // Must be small, since an iteration is used for lookup. 2729 // Must be small, since an iteration is used for lookup.
2724 static const int kMaxComments = 64; 2730 static const int kMaxComments = 64;
2725 }; 2731 };
2726 #endif 2732 #endif
2727 2733
2728 2734
2729 } } // namespace v8::internal 2735 } } // namespace v8::internal
2730 2736
2731 #endif // V8_SPACES_H_ 2737 #endif // V8_SPACES_H_
OLDNEW
« no previous file with comments | « src/incremental-marking-inl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698