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

Unified Diff: src/isolate.h

Issue 2887193002: Create a thread safe version of StatsCounters and use. (Closed)
Patch Set: fix nits of mtrofin Created 3 years, 7 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
Index: src/isolate.h
diff --git a/src/isolate.h b/src/isolate.h
index d65a1f373a09f6de01f166d32f8ac30d452c5247..47ec220dd86d11d9c6e645e408395c361d5e301c 100644
--- a/src/isolate.h
+++ b/src/isolate.h
@@ -536,6 +536,7 @@ class Isolate {
//
// Safe to call more than once.
void InitializeLoggingAndCounters();
+ bool InitializeCounters(); // Returns false if already initialized.
bool Init(Deserializer* des);
@@ -872,6 +873,7 @@ class Isolate {
DCHECK(counters_ != NULL);
return counters_;
}
+ std::shared_ptr<Counters> counters_shared() { return counters_shared_; }
RuntimeProfiler* runtime_profiler() { return runtime_profiler_; }
CompilationCache* compilation_cache() { return compilation_cache_; }
Logger* logger() {
@@ -1427,6 +1429,7 @@ class Isolate {
Bootstrapper* bootstrapper_;
RuntimeProfiler* runtime_profiler_;
CompilationCache* compilation_cache_;
+ std::shared_ptr<Counters> counters_shared_;
Counters* counters_;
base::RecursiveMutex break_access_;
Logger* logger_;

Powered by Google App Engine
This is Rietveld 408576698