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

Side by Side Diff: src/counters-inl.h

Issue 2490643002: [counters] Implement off-isolate RuntimeCallStats for the Preparser (Closed)
Patch Set: fixing declaration Created 4 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/counters.cc ('k') | src/parsing/parser.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 2016 the V8 project authors. All rights reserved. 1 // Copyright 2016 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_COUNTERS_INL_H_ 5 #ifndef V8_COUNTERS_INL_H_
6 #define V8_COUNTERS_INL_H_ 6 #define V8_COUNTERS_INL_H_
7 7
8 #include "src/counters.h" 8 #include "src/counters.h"
9 9
10 namespace v8 { 10 namespace v8 {
11 namespace internal { 11 namespace internal {
12 12
13 RuntimeCallTimerScope::RuntimeCallTimerScope( 13 RuntimeCallTimerScope::RuntimeCallTimerScope(
14 Isolate* isolate, RuntimeCallStats::CounterId counter_id) { 14 Isolate* isolate, RuntimeCallStats::CounterId counter_id) {
15 if (V8_UNLIKELY(FLAG_runtime_stats)) { 15 if (V8_UNLIKELY(FLAG_runtime_stats)) {
16 Initialize(isolate, counter_id); 16 Initialize(isolate->counters()->runtime_call_stats(), counter_id);
17 } 17 }
18 } 18 }
19 19
20 RuntimeCallTimerScope::RuntimeCallTimerScope( 20 RuntimeCallTimerScope::RuntimeCallTimerScope(
21 HeapObject* heap_object, RuntimeCallStats::CounterId counter_id) { 21 HeapObject* heap_object, RuntimeCallStats::CounterId counter_id) {
22 RuntimeCallTimerScope(heap_object->GetIsolate(), counter_id);
23 }
24
25 RuntimeCallTimerScope::RuntimeCallTimerScope(
26 RuntimeCallStats* stats, RuntimeCallStats::CounterId counter_id) {
22 if (V8_UNLIKELY(FLAG_runtime_stats)) { 27 if (V8_UNLIKELY(FLAG_runtime_stats)) {
23 Initialize(heap_object->GetIsolate(), counter_id); 28 Initialize(stats, counter_id);
24 } 29 }
25 } 30 }
26 31
27 } // namespace internal 32 } // namespace internal
28 } // namespace v8 33 } // namespace v8
29 34
30 #endif // V8_COUNTERS_INL_H_ 35 #endif // V8_COUNTERS_INL_H_
OLDNEW
« no previous file with comments | « src/counters.cc ('k') | src/parsing/parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698