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

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

Issue 1695733002: [counters] Making counter properly reentrant. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@2016-02-09_recursive_counters_1681943002
Patch Set: fixing comment Created 4 years, 10 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/vm-state.h ('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 7c9fdb1f978c3455c43d26b7faa780cc79aba8c9..6533aa18174ee96520e1cc005d1eb1c9c78f392d 100644
--- a/src/vm-state-inl.h
+++ b/src/vm-state-inl.h
@@ -61,18 +61,25 @@ VMState<Tag>::~VMState() {
isolate_->set_current_vm_state(previous_tag_);
}
-
ExternalCallbackScope::ExternalCallbackScope(Isolate* isolate, Address callback)
: isolate_(isolate),
callback_(callback),
- previous_scope_(isolate->external_callback_scope()) {
+ previous_scope_(isolate->external_callback_scope()),
+ timer_(&isolate->counters()->runtime_call_stats()->ExternalCallback,
+ isolate->counters()->runtime_call_stats()->current_timer()) {
#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_);
+ }
}
ExternalCallbackScope::~ExternalCallbackScope() {
+ if (FLAG_runtime_call_stats) {
+ isolate_->counters()->runtime_call_stats()->Leave(&timer_);
+ }
isolate_->set_external_callback_scope(previous_scope_);
}
« no previous file with comments | « src/vm-state.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698