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

Unified Diff: src/vm-state-inl.h

Issue 1771323003: [counter] reducing the overhead of RuntimeCallTimerScope (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: further reducing overhead Created 4 years, 9 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/d8.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/vm-state-inl.h
diff --git a/src/vm-state-inl.h b/src/vm-state-inl.h
index 00a3683ebb61c932b1c9543e35e6e00c656d4b20..f00cf12c3b4a889862f3a872508b0573d39b23f0 100644
--- a/src/vm-state-inl.h
+++ b/src/vm-state-inl.h
@@ -58,15 +58,15 @@ VMState<Tag>::~VMState() {
ExternalCallbackScope::ExternalCallbackScope(Isolate* isolate, Address callback)
: isolate_(isolate),
callback_(callback),
- previous_scope_(isolate->external_callback_scope()),
- timer_(&isolate->counters()->runtime_call_stats()->ExternalCallback,
- isolate->counters()->runtime_call_stats()->current_timer()) {
+ previous_scope_(isolate->external_callback_scope()) {
#ifdef USE_SIMULATOR
scope_address_ = Simulator::current(isolate)->get_sp();
#endif
isolate_->set_external_callback_scope(this);
if (FLAG_runtime_call_stats) {
- isolate_->counters()->runtime_call_stats()->Enter(&timer_);
+ RuntimeCallStats* stats = isolate->counters()->runtime_call_stats();
+ timer_.Initialize(&stats->ExternalCallback, stats->current_timer());
+ stats->Enter(&timer_);
}
}
« no previous file with comments | « src/d8.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698