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

Unified Diff: src/isolate.h

Issue 1414483004: Add the rate of js invocations from the api as a signal of idleness (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address comments from Hannes Created 5 years, 2 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/heap/memory-reducer.cc ('k') | src/isolate.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/isolate.h
diff --git a/src/isolate.h b/src/isolate.h
index 8f4915cefd55bbab5f0f19b70a41ad7a08a8e734..522d617e6bca3693b2b8a0b6c818b8c15f2994a5 100644
--- a/src/isolate.h
+++ b/src/isolate.h
@@ -1046,6 +1046,12 @@ class Isolate {
return id;
}
+ void IncrementJsCallsFromApiCounter() { ++js_calls_from_api_counter_; }
+
+ unsigned int js_calls_from_api_counter() {
+ return js_calls_from_api_counter_;
+ }
+
// Get (and lazily initialize) the registry for per-isolate symbols.
Handle<JSObject> GetSymbolRegistry();
@@ -1313,6 +1319,9 @@ class Isolate {
int next_optimization_id_;
+ // Counts javascript calls from the API. Wraps around on overflow.
+ unsigned int js_calls_from_api_counter_;
+
#if TRACE_MAPS
int next_unique_sfi_id_;
#endif
« no previous file with comments | « src/heap/memory-reducer.cc ('k') | src/isolate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698