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

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

Issue 1415383004: Fixing --verify-predictable mode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixed shared build Created 5 years, 1 month 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/flag-definitions.h ('k') | 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/platform/platform.h" 8 #include "src/base/platform/platform.h"
9 #include "src/globals.h" 9 #include "src/globals.h"
10 10
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
136 SCAVENGER_CODE_FLUSH_CANDIDATES, 136 SCAVENGER_CODE_FLUSH_CANDIDATES,
137 SCAVENGER_OBJECT_GROUPS, 137 SCAVENGER_OBJECT_GROUPS,
138 SCAVENGER_OLD_TO_NEW_POINTERS, 138 SCAVENGER_OLD_TO_NEW_POINTERS,
139 SCAVENGER_ROOTS, 139 SCAVENGER_ROOTS,
140 SCAVENGER_SCAVENGE, 140 SCAVENGER_SCAVENGE,
141 SCAVENGER_SEMISPACE, 141 SCAVENGER_SEMISPACE,
142 SCAVENGER_WEAK, 142 SCAVENGER_WEAK,
143 NUMBER_OF_SCOPES 143 NUMBER_OF_SCOPES
144 }; 144 };
145 145
146 Scope(GCTracer* tracer, ScopeId scope) : tracer_(tracer), scope_(scope) { 146 Scope(GCTracer* tracer, ScopeId scope);
147 start_time_ = base::OS::TimeCurrentMillis(); 147 ~Scope();
148 }
149
150 ~Scope() {
151 DCHECK(scope_ < NUMBER_OF_SCOPES); // scope_ is unsigned.
152 tracer_->current_.scopes[scope_] +=
153 base::OS::TimeCurrentMillis() - start_time_;
154 }
155 148
156 private: 149 private:
157 GCTracer* tracer_; 150 GCTracer* tracer_;
158 ScopeId scope_; 151 ScopeId scope_;
159 double start_time_; 152 double start_time_;
160 153
161 DISALLOW_COPY_AND_ASSIGN(Scope); 154 DISALLOW_COPY_AND_ASSIGN(Scope);
162 }; 155 };
163 156
164 157
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 584
592 // Counts how many tracers were started without stopping. 585 // Counts how many tracers were started without stopping.
593 int start_counter_; 586 int start_counter_;
594 587
595 DISALLOW_COPY_AND_ASSIGN(GCTracer); 588 DISALLOW_COPY_AND_ASSIGN(GCTracer);
596 }; 589 };
597 } // namespace internal 590 } // namespace internal
598 } // namespace v8 591 } // namespace v8
599 592
600 #endif // V8_HEAP_GC_TRACER_H_ 593 #endif // V8_HEAP_GC_TRACER_H_
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | src/heap/gc-tracer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698