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

Side by Side Diff: src/heap/gc-tracer.h

Issue 1988623002: Ensure black and gray objects are kept around by scavenger (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Cleanup Created 4 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
« no previous file with comments | « no previous file | src/heap/gc-tracer.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 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 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 #ifndef V8_HEAP_GC_TRACER_H_ 5 #ifndef V8_HEAP_GC_TRACER_H_
6 #define V8_HEAP_GC_TRACER_H_ 6 #define V8_HEAP_GC_TRACER_H_
7 7
8 #include "src/base/compiler-specific.h" 8 #include "src/base/compiler-specific.h"
9 #include "src/base/platform/platform.h" 9 #include "src/base/platform/platform.h"
10 #include "src/counters.h" 10 #include "src/counters.h"
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 }; 52 };
53 53
54 typedef std::pair<uint64_t, double> BytesAndDuration; 54 typedef std::pair<uint64_t, double> BytesAndDuration;
55 55
56 inline BytesAndDuration MakeBytesAndDuration(uint64_t bytes, double duration) { 56 inline BytesAndDuration MakeBytesAndDuration(uint64_t bytes, double duration) {
57 return std::make_pair(bytes, duration); 57 return std::make_pair(bytes, duration);
58 } 58 }
59 59
60 enum ScavengeSpeedMode { kForAllObjects, kForSurvivedObjects }; 60 enum ScavengeSpeedMode { kForAllObjects, kForSurvivedObjects };
61 61
62 #define TRACER_SCOPES(F) \ 62 #define TRACER_SCOPES(F) \
63 F(EXTERNAL_WEAK_GLOBAL_HANDLES) \ 63 F(EXTERNAL_WEAK_GLOBAL_HANDLES) \
64 F(MC_CLEAR) \ 64 F(MC_CLEAR) \
65 F(MC_CLEAR_CODE_FLUSH) \ 65 F(MC_CLEAR_CODE_FLUSH) \
66 F(MC_CLEAR_DEPENDENT_CODE) \ 66 F(MC_CLEAR_DEPENDENT_CODE) \
67 F(MC_CLEAR_GLOBAL_HANDLES) \ 67 F(MC_CLEAR_GLOBAL_HANDLES) \
68 F(MC_CLEAR_MAPS) \ 68 F(MC_CLEAR_MAPS) \
69 F(MC_CLEAR_SLOTS_BUFFER) \ 69 F(MC_CLEAR_SLOTS_BUFFER) \
70 F(MC_CLEAR_STORE_BUFFER) \ 70 F(MC_CLEAR_STORE_BUFFER) \
71 F(MC_CLEAR_STRING_TABLE) \ 71 F(MC_CLEAR_STRING_TABLE) \
72 F(MC_CLEAR_WEAK_CELLS) \ 72 F(MC_CLEAR_WEAK_CELLS) \
73 F(MC_CLEAR_WEAK_COLLECTIONS) \ 73 F(MC_CLEAR_WEAK_COLLECTIONS) \
74 F(MC_CLEAR_WEAK_LISTS) \ 74 F(MC_CLEAR_WEAK_LISTS) \
75 F(MC_EVACUATE) \ 75 F(MC_EVACUATE) \
76 F(MC_EVACUATE_CANDIDATES) \ 76 F(MC_EVACUATE_CANDIDATES) \
77 F(MC_EVACUATE_CLEAN_UP) \ 77 F(MC_EVACUATE_CLEAN_UP) \
78 F(MC_EVACUATE_COPY) \ 78 F(MC_EVACUATE_COPY) \
79 F(MC_EVACUATE_UPDATE_POINTERS) \ 79 F(MC_EVACUATE_UPDATE_POINTERS) \
80 F(MC_EVACUATE_UPDATE_POINTERS_TO_EVACUATED) \ 80 F(MC_EVACUATE_UPDATE_POINTERS_TO_EVACUATED) \
81 F(MC_EVACUATE_UPDATE_POINTERS_TO_NEW) \ 81 F(MC_EVACUATE_UPDATE_POINTERS_TO_NEW) \
82 F(MC_EVACUATE_UPDATE_POINTERS_WEAK) \ 82 F(MC_EVACUATE_UPDATE_POINTERS_WEAK) \
83 F(MC_EXTERNAL_EPILOGUE) \ 83 F(MC_EXTERNAL_EPILOGUE) \
84 F(MC_EXTERNAL_PROLOGUE) \ 84 F(MC_EXTERNAL_PROLOGUE) \
85 F(MC_FINISH) \ 85 F(MC_FINISH) \
86 F(MC_INCREMENTAL_FINALIZE) \ 86 F(MC_INCREMENTAL_FINALIZE) \
87 F(MC_INCREMENTAL_EXTERNAL_EPILOGUE) \ 87 F(MC_INCREMENTAL_EXTERNAL_EPILOGUE) \
88 F(MC_INCREMENTAL_EXTERNAL_PROLOGUE) \ 88 F(MC_INCREMENTAL_EXTERNAL_PROLOGUE) \
89 F(MC_MARK) \ 89 F(MC_MARK) \
90 F(MC_MARK_FINISH_INCREMENTAL) \ 90 F(MC_MARK_FINISH_INCREMENTAL) \
91 F(MC_MARK_PREPARE_CODE_FLUSH) \ 91 F(MC_MARK_PREPARE_CODE_FLUSH) \
92 F(MC_MARK_ROOTS) \ 92 F(MC_MARK_ROOTS) \
93 F(MC_MARK_WEAK_CLOSURE) \ 93 F(MC_MARK_WEAK_CLOSURE) \
94 F(MC_MARK_WEAK_CLOSURE_EPHEMERAL) \ 94 F(MC_MARK_WEAK_CLOSURE_EPHEMERAL) \
95 F(MC_MARK_WEAK_CLOSURE_WEAK_HANDLES) \ 95 F(MC_MARK_WEAK_CLOSURE_WEAK_HANDLES) \
96 F(MC_MARK_WEAK_CLOSURE_WEAK_ROOTS) \ 96 F(MC_MARK_WEAK_CLOSURE_WEAK_ROOTS) \
97 F(MC_MARK_WEAK_CLOSURE_HARMONY) \ 97 F(MC_MARK_WEAK_CLOSURE_HARMONY) \
98 F(MC_SWEEP) \ 98 F(MC_SWEEP) \
99 F(MC_SWEEP_CODE) \ 99 F(MC_SWEEP_CODE) \
100 F(MC_SWEEP_MAP) \ 100 F(MC_SWEEP_MAP) \
101 F(MC_SWEEP_OLD) \ 101 F(MC_SWEEP_OLD) \
102 F(SCAVENGER_CODE_FLUSH_CANDIDATES) \ 102 F(SCAVENGER_CODE_FLUSH_CANDIDATES) \
103 F(SCAVENGER_EXTERNAL_EPILOGUE) \ 103 F(SCAVENGER_EXTERNAL_EPILOGUE) \
104 F(SCAVENGER_EXTERNAL_PROLOGUE) \ 104 F(SCAVENGER_EXTERNAL_PROLOGUE) \
105 F(SCAVENGER_OBJECT_GROUPS) \ 105 F(SCAVENGER_OBJECT_GROUPS) \
106 F(SCAVENGER_OLD_TO_NEW_POINTERS) \ 106 F(SCAVENGER_OLD_TO_NEW_POINTERS) \
107 F(SCAVENGER_ROOTS) \ 107 F(SCAVENGER_OBJECTS_MARKED_BY_MARK_COMPACT) \
108 F(SCAVENGER_SCAVENGE) \ 108 F(SCAVENGER_ROOTS) \
109 F(SCAVENGER_SEMISPACE) \ 109 F(SCAVENGER_SCAVENGE) \
110 F(SCAVENGER_SEMISPACE) \
110 F(SCAVENGER_WEAK) 111 F(SCAVENGER_WEAK)
111 112
112 #define TRACE_GC(tracer, scope_id) \ 113 #define TRACE_GC(tracer, scope_id) \
113 GCTracer::Scope::ScopeId gc_tracer_scope_id(scope_id); \ 114 GCTracer::Scope::ScopeId gc_tracer_scope_id(scope_id); \
114 GCTracer::Scope gc_tracer_scope(tracer, gc_tracer_scope_id); \ 115 GCTracer::Scope gc_tracer_scope(tracer, gc_tracer_scope_id); \
115 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.gc"), \ 116 TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("v8.gc"), \
116 GCTracer::Scope::Name(gc_tracer_scope_id)) 117 GCTracer::Scope::Name(gc_tracer_scope_id))
117 118
118 // GCTracer collects and prints ONE line after each garbage collector 119 // GCTracer collects and prints ONE line after each garbage collector
119 // invocation IFF --trace_gc is used. 120 // invocation IFF --trace_gc is used.
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 RingBuffer<BytesAndDuration> recorded_old_generation_allocations_; 493 RingBuffer<BytesAndDuration> recorded_old_generation_allocations_;
493 RingBuffer<double> recorded_context_disposal_times_; 494 RingBuffer<double> recorded_context_disposal_times_;
494 RingBuffer<double> recorded_survival_ratios_; 495 RingBuffer<double> recorded_survival_ratios_;
495 496
496 DISALLOW_COPY_AND_ASSIGN(GCTracer); 497 DISALLOW_COPY_AND_ASSIGN(GCTracer);
497 }; 498 };
498 } // namespace internal 499 } // namespace internal
499 } // namespace v8 500 } // namespace v8
500 501
501 #endif // V8_HEAP_GC_TRACER_H_ 502 #endif // V8_HEAP_GC_TRACER_H_
OLDNEW
« no previous file with comments | « no previous file | src/heap/gc-tracer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698