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

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: 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
« src/counters.cc ('K') | « src/counters.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 d60548d27d131126b0f2c38c34a9a2c8da668104..0bfc47a27576d77ee8ad705cea08702f887f50ab 100644
--- a/src/vm-state-inl.h
+++ b/src/vm-state-inl.h
@@ -54,8 +54,8 @@ VMState<Tag>::~VMState() {
isolate_->set_current_vm_state(previous_tag_);
}
-
ExternalCallbackScope::ExternalCallbackScope(Isolate* isolate, Address callback)
+
Jarin 2016/02/13 19:28:20 Nit: Extra newline?
: isolate_(isolate),
callback_(callback),
previous_scope_(isolate->external_callback_scope()) {
@@ -63,9 +63,16 @@ ExternalCallbackScope::ExternalCallbackScope(Isolate* isolate, Address callback)
scope_address_ = Simulator::current(isolate)->get_sp();
#endif
isolate_->set_external_callback_scope(this);
+ if (FLAG_runtime_call_stats) {
+ RuntimeCallStats* stats = isolate_->counters()->runtime_call_stats();
+ stats->Enter(&stats->RuntimeCallbacks);
+ }
}
ExternalCallbackScope::~ExternalCallbackScope() {
+ if (FLAG_runtime_call_stats) {
+ isolate_->counters()->runtime_call_stats()->Leave();
+ }
isolate_->set_external_callback_scope(previous_scope_);
}
« src/counters.cc ('K') | « src/counters.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698