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

Unified Diff: src/counters-inl.h

Issue 2313193002: [Tracing] Fix runtime call stats tracing for GC. (Closed)
Patch Set: update & rebase Created 4 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/counters.h ('k') | src/heap/gc-tracer.cc » ('j') | src/heap/gc-tracer.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/counters-inl.h
diff --git a/src/counters-inl.h b/src/counters-inl.h
index 44424d3ba458ec9abc0c61ccb8e598c8febecfe7..7edefda398005ea3767b697576dc0eddb2ae9c24 100644
--- a/src/counters-inl.h
+++ b/src/counters-inl.h
@@ -11,13 +11,25 @@ namespace v8 {
namespace internal {
RuntimeCallTimerScope::RuntimeCallTimerScope(
- HeapObject* heap_object, RuntimeCallStats::CounterId counter_id) {
- if (V8_UNLIKELY(FLAG_runtime_call_stats)) {
- isolate_ = heap_object->GetIsolate();
+ Isolate* isolate, RuntimeCallStats::CounterId counter_id) {
+ if (V8_UNLIKELY(TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_ENABLED())) {
+ isolate_ = isolate;
+ is_tracing_ = true;
+ RuntimeCallStats::Enter(isolate_->counters()->tracing_runtime_call_stats(),
fmeawad 2016/09/07 17:31:28 Do we still need the runtime_call_stats table and
lpy 2016/09/08 18:23:53 Done.
+ &timer_, counter_id);
+ } else if (V8_UNLIKELY(FLAG_runtime_call_stats)) {
+ isolate_ = isolate;
RuntimeCallStats::Enter(isolate_->counters()->runtime_call_stats(), &timer_,
counter_id);
}
- // TODO(lpy): Add a tracing equivalent for the runtime call stats.
+}
+
+RuntimeCallTimerScope::RuntimeCallTimerScope(
+ HeapObject* heap_object, RuntimeCallStats::CounterId counter_id) {
+ if (V8_UNLIKELY(TRACE_EVENT_RUNTIME_CALL_STATS_TRACING_ENABLED() ||
+ FLAG_runtime_call_stats)) {
+ RuntimeCallTimerScope(heap_object->GetIsolate(), counter_id);
+ }
}
} // namespace internal
« no previous file with comments | « src/counters.h ('k') | src/heap/gc-tracer.cc » ('j') | src/heap/gc-tracer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698