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

Side by Side Diff: src/store-buffer-inl.h

Issue 6312147: Fix some correctness issues with the store buffer shown up by... (Closed) Base URL: http://v8.googlecode.com/svn/branches/experimental/gc/
Patch Set: Created 9 years, 10 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/store-buffer.cc ('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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 Heap::public_set_store_buffer_top(top); 45 Heap::public_set_store_buffer_top(top);
46 if ((reinterpret_cast<uintptr_t>(top) & kStoreBufferOverflowBit) != 0) { 46 if ((reinterpret_cast<uintptr_t>(top) & kStoreBufferOverflowBit) != 0) {
47 ASSERT(top == limit_); 47 ASSERT(top == limit_);
48 Compact(); 48 Compact();
49 } else { 49 } else {
50 ASSERT(top < limit_); 50 ASSERT(top < limit_);
51 } 51 }
52 } 52 }
53 53
54 54
55 void StoreBuffer::set_store_buffer_mode(StoreBuffer::StoreBufferMode mode) {
56 if (FLAG_trace_gc) {
57 if (mode != store_buffer_mode_) {
58 if (mode == kStoreBufferDisabled) {
59 PrintF("Store buffer overflowed.\n");
60 } else if (mode == kStoreBufferBeingRebuilt) {
61 PrintF("Store buffer being rebuilt.\n");
62 } else if (mode == kStoreBufferFunctional) {
63 PrintF("Store buffer reenabled.\n");
64 }
65 }
66 }
67 store_buffer_mode_ = mode;
68 }
69
70
55 void StoreBuffer::EnterDirectlyIntoStoreBuffer(Address addr) { 71 void StoreBuffer::EnterDirectlyIntoStoreBuffer(Address addr) {
56 if (store_buffer_rebuilding_enabled_) { 72 if (store_buffer_rebuilding_enabled_) {
57 Address* top = old_top_; 73 Address* top = old_top_;
58 *top++ = addr; 74 *top++ = addr;
59 old_top_ = top; 75 old_top_ = top;
60 if (top >= old_limit_) { 76 if (top >= old_limit_) {
61 Counters::store_buffer_overflows.Increment(); 77 Counters::store_buffer_overflows.Increment();
62 store_buffer_mode_ = kStoreBufferDisabled; 78 set_store_buffer_mode(kStoreBufferDisabled);
63 old_top_ = old_start_; 79 old_top_ = old_start_;
64 } 80 }
81 old_buffer_is_sorted_ = false;
65 } 82 }
66 } 83 }
67 84
68 85
69 } } // namespace v8::internal 86 } } // namespace v8::internal
70 87
71 #endif // V8_WRITE_BARRIER_INL_H_ 88 #endif // V8_WRITE_BARRIER_INL_H_
OLDNEW
« no previous file with comments | « src/store-buffer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698