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

Unified Diff: src/perf-jit.h

Issue 1839133002: Ensure synchronized access to the perf dump file. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixes 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 | « no previous file | src/perf-jit.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/perf-jit.h
diff --git a/src/perf-jit.h b/src/perf-jit.h
index 248c9a2eda968f4eeb06c9cf08569b533d495477..25cc3b36866f6595b0debe00392659f74b7903a4 100644
--- a/src/perf-jit.h
+++ b/src/perf-jit.h
@@ -87,9 +87,13 @@ class PerfJitLogger : public CodeEventLogger {
#endif
}
- FILE* perf_output_handle_;
- uint64_t code_index_;
- void* marker_address_;
+ // Per-process singleton file. We assume that there is one main isolate;
+ // to determine when it goes away, we keep reference count.
+ static base::LazyRecursiveMutex file_mutex_;
+ static FILE* perf_output_handle_;
+ static uint64_t reference_count_;
+ static void* marker_address_;
+ static uint64_t code_index_;
};
#else
« no previous file with comments | « no previous file | src/perf-jit.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698