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

Side by Side Diff: src/isolate.cc

Issue 893073006: Add map-based read barrier to WeakCell Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix merge Created 5 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
« no previous file with comments | « src/ic/ia32/ic-compiler-ia32.cc ('k') | src/objects.h » ('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 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stdlib.h> 5 #include <stdlib.h>
6 6
7 #include <fstream> // NOLINT(readability/streams) 7 #include <fstream> // NOLINT(readability/streams)
8 #include <sstream> 8 #include <sstream>
9 9
10 #include "src/v8.h" 10 #include "src/v8.h"
(...skipping 2586 matching lines...) Expand 10 before | Expand all | Expand 10 after
2597 new_length += 2; 2597 new_length += 2;
2598 } 2598 }
2599 } 2599 }
2600 PrintF("%d detached contexts are collected out of %d\n", length - new_length, 2600 PrintF("%d detached contexts are collected out of %d\n", length - new_length,
2601 length); 2601 length);
2602 for (int i = 0; i < new_length; i += 2) { 2602 for (int i = 0; i < new_length; i += 2) {
2603 int mark_sweeps = Smi::cast(detached_contexts->get(i))->value(); 2603 int mark_sweeps = Smi::cast(detached_contexts->get(i))->value();
2604 WeakCell* cell = WeakCell::cast(detached_contexts->get(i + 1)); 2604 WeakCell* cell = WeakCell::cast(detached_contexts->get(i + 1));
2605 if (mark_sweeps > 3) { 2605 if (mark_sweeps > 3) {
2606 PrintF("detached context 0x%p\n survived %d GCs (leak?)\n", 2606 PrintF("detached context 0x%p\n survived %d GCs (leak?)\n",
2607 static_cast<void*>(cell->value()), mark_sweeps); 2607 static_cast<void*>(cell->ValueNoReadBarrier()), mark_sweeps);
2608 } 2608 }
2609 } 2609 }
2610 if (length == new_length) { 2610 if (length == new_length) {
2611 heap()->set_detached_contexts(heap()->empty_fixed_array()); 2611 heap()->set_detached_contexts(heap()->empty_fixed_array());
2612 } else { 2612 } else {
2613 heap()->RightTrimFixedArray<Heap::FROM_GC>(*detached_contexts, 2613 heap()->RightTrimFixedArray<Heap::FROM_GC>(*detached_contexts,
2614 length - new_length); 2614 length - new_length);
2615 } 2615 }
2616 } 2616 }
2617 2617
(...skipping 15 matching lines...) Expand all
2633 if (prev_ && prev_->Intercept(flag)) return true; 2633 if (prev_ && prev_->Intercept(flag)) return true;
2634 // Then check whether this scope intercepts. 2634 // Then check whether this scope intercepts.
2635 if ((flag & intercept_mask_)) { 2635 if ((flag & intercept_mask_)) {
2636 intercepted_flags_ |= flag; 2636 intercepted_flags_ |= flag;
2637 return true; 2637 return true;
2638 } 2638 }
2639 return false; 2639 return false;
2640 } 2640 }
2641 2641
2642 } } // namespace v8::internal 2642 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ic/ia32/ic-compiler-ia32.cc ('k') | src/objects.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698