OLD | NEW |
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/platform/platform.h" | 8 #include "src/base/platform/platform.h" |
9 #include "src/globals.h" | 9 #include "src/globals.h" |
10 | 10 |
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 | 91 |
92 // GCTracer collects and prints ONE line after each garbage collector | 92 // GCTracer collects and prints ONE line after each garbage collector |
93 // invocation IFF --trace_gc is used. | 93 // invocation IFF --trace_gc is used. |
94 // TODO(ernstm): Unit tests. | 94 // TODO(ernstm): Unit tests. |
95 class GCTracer { | 95 class GCTracer { |
96 public: | 96 public: |
97 class Scope { | 97 class Scope { |
98 public: | 98 public: |
99 enum ScopeId { | 99 enum ScopeId { |
100 EXTERNAL, | 100 EXTERNAL, |
| 101 MC_CLEAR, |
| 102 MC_CLEAR_CODE_FLUSH, |
| 103 MC_CLEAR_DEPENDENT_CODE, |
| 104 MC_CLEAR_GLOBAL_HANDLES, |
| 105 MC_CLEAR_MAPS, |
| 106 MC_CLEAR_SLOTS_BUFFER, |
| 107 MC_CLEAR_STORE_BUFFER, |
| 108 MC_CLEAR_STRING_TABLE, |
| 109 MC_CLEAR_WEAK_CELLS, |
| 110 MC_CLEAR_WEAK_COLLECTIONS, |
| 111 MC_CLEAR_WEAK_LISTS, |
| 112 MC_EVACUATE, |
| 113 MC_EVACUATE_CANDIDATES, |
| 114 MC_EVACUATE_CLEAN_UP, |
| 115 MC_EVACUATE_NEW_SPACE, |
| 116 MC_EVACUATE_UPDATE_POINTERS, |
| 117 MC_EVACUATE_UPDATE_POINTERS_BETWEEN_EVACUATED, |
| 118 MC_EVACUATE_UPDATE_POINTERS_TO_EVACUATED, |
| 119 MC_EVACUATE_UPDATE_POINTERS_TO_NEW, |
| 120 MC_EVACUATE_UPDATE_POINTERS_WEAK, |
| 121 MC_FINISH, |
| 122 MC_INCREMENTAL_FINALIZE, |
101 MC_MARK, | 123 MC_MARK, |
102 MC_MARK_FINISH_INCREMENTAL, | 124 MC_MARK_FINISH_INCREMENTAL, |
103 MC_MARK_PREPARE_CODE_FLUSH, | 125 MC_MARK_PREPARE_CODE_FLUSH, |
104 MC_MARK_ROOT, | 126 MC_MARK_ROOTS, |
105 MC_MARK_TOPOPT, | |
106 MC_MARK_WEAK_CLOSURE, | 127 MC_MARK_WEAK_CLOSURE, |
107 MC_MARK_STRING_TABLE, | |
108 MC_MARK_WEAK_REFERENCES, | |
109 MC_MARK_GLOBAL_HANDLES, | |
110 MC_MARK_CODE_FLUSH, | |
111 MC_STORE_BUFFER_CLEAR, | |
112 MC_SLOTS_BUFFER_CLEAR, | |
113 MC_SWEEP, | 128 MC_SWEEP, |
114 MC_SWEEP_NEWSPACE, | |
115 MC_SWEEP_OLDSPACE, | |
116 MC_SWEEP_CODE, | 129 MC_SWEEP_CODE, |
117 MC_SWEEP_CELL, | |
118 MC_SWEEP_MAP, | 130 MC_SWEEP_MAP, |
119 MC_SWEEP_ABORTED, | 131 MC_SWEEP_OLD, |
120 MC_EVACUATE_PAGES, | |
121 MC_UPDATE_NEW_TO_NEW_POINTERS, | |
122 MC_UPDATE_ROOT_TO_NEW_POINTERS, | |
123 MC_UPDATE_OLD_TO_NEW_POINTERS, | |
124 MC_UPDATE_POINTERS_TO_EVACUATED, | |
125 MC_UPDATE_POINTERS_BETWEEN_EVACUATED, | |
126 MC_UPDATE_MISC_POINTERS, | |
127 MC_INCREMENTAL_FINALIZE, | |
128 MC_WEAKCOLLECTION_PROCESS, | |
129 MC_WEAKCOLLECTION_CLEAR, | |
130 MC_WEAKCOLLECTION_ABORT, | |
131 MC_CLEAR, | |
132 MC_CLEAR_WEAKCELL, | |
133 MC_CLEAR_MAP, | |
134 MC_CLEAR_DEPENDENT_CODE, | |
135 MC_FLUSH_CODE, | |
136 SCAVENGER_CODE_FLUSH_CANDIDATES, | 132 SCAVENGER_CODE_FLUSH_CANDIDATES, |
137 SCAVENGER_OBJECT_GROUPS, | 133 SCAVENGER_OBJECT_GROUPS, |
138 SCAVENGER_OLD_TO_NEW_POINTERS, | 134 SCAVENGER_OLD_TO_NEW_POINTERS, |
139 SCAVENGER_ROOTS, | 135 SCAVENGER_ROOTS, |
140 SCAVENGER_SCAVENGE, | 136 SCAVENGER_SCAVENGE, |
141 SCAVENGER_SEMISPACE, | 137 SCAVENGER_SEMISPACE, |
142 SCAVENGER_WEAK, | 138 SCAVENGER_WEAK, |
143 NUMBER_OF_SCOPES | 139 NUMBER_OF_SCOPES |
144 }; | 140 }; |
145 | 141 |
(...skipping 454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 | 596 |
601 // Counts how many tracers were started without stopping. | 597 // Counts how many tracers were started without stopping. |
602 int start_counter_; | 598 int start_counter_; |
603 | 599 |
604 DISALLOW_COPY_AND_ASSIGN(GCTracer); | 600 DISALLOW_COPY_AND_ASSIGN(GCTracer); |
605 }; | 601 }; |
606 } // namespace internal | 602 } // namespace internal |
607 } // namespace v8 | 603 } // namespace v8 |
608 | 604 |
609 #endif // V8_HEAP_GC_TRACER_H_ | 605 #endif // V8_HEAP_GC_TRACER_H_ |
OLD | NEW |