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

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 IsAheadOfProgressBar(Object** slot) {
Michael Starzinger 2012/11/22 21:13:22 Apparently we have a different understanding of th
Hannes Payer (out of office) 2012/11/23 10:12:49 Done.
507 ASSERT(reinterpret_cast<Address>(slot) > reinterpret_cast<Address>(this));
508 if (reinterpret_cast<Address>(slot) - reinterpret_cast<Address>(this) <
Michael Starzinger 2012/11/22 21:13:22 The pointer arithmetic is off. The progress bar ac
Hannes Payer (out of office) 2012/11/23 10:12:49 Done.
509 progress_bar()) {
510 return true;
511 }
512 return false;
513 }
506 514
507 static void IncrementLiveBytesFromGC(Address address, int by) { 515 static void IncrementLiveBytesFromGC(Address address, int by) {
508 MemoryChunk::FromAddress(address)->IncrementLiveBytes(by); 516 MemoryChunk::FromAddress(address)->IncrementLiveBytes(by);
509 } 517 }
510 518
511 static void IncrementLiveBytesFromMutator(Address address, int by); 519 static void IncrementLiveBytesFromMutator(Address address, int by);
512 520
513 static const intptr_t kAlignment = 521 static const intptr_t kAlignment =
514 (static_cast<uintptr_t>(1) << kPageSizeBits); 522 (static_cast<uintptr_t>(1) << kPageSizeBits);
515 523
(...skipping 2206 matching lines...) Expand 10 before | Expand all | Expand 10 after
2722 } 2730 }
2723 // Must be small, since an iteration is used for lookup. 2731 // Must be small, since an iteration is used for lookup.
2724 static const int kMaxComments = 64; 2732 static const int kMaxComments = 64;
2725 }; 2733 };
2726 #endif 2734 #endif
2727 2735
2728 2736
2729 } } // namespace v8::internal 2737 } } // namespace v8::internal
2730 2738
2731 #endif // V8_SPACES_H_ 2739 #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