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

Unified Diff: src/log.cc

Issue 1338253002: [loggers] Guard object/code move events using mutexes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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-profiler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/log.cc
diff --git a/src/log.cc b/src/log.cc
index 0e932cfadd37c01416263e0e78dc90336641b270..0209f95b85269ee90d4ec7f25f33a5415802b4cf 100644
--- a/src/log.cc
+++ b/src/log.cc
@@ -501,6 +501,7 @@ class JitLogger : public CodeEventLogger {
int length);
JitCodeEventHandler code_event_handler_;
+ base::Mutex logger_mutex_;
};
@@ -530,6 +531,7 @@ void JitLogger::LogRecordedBuffer(Code* code,
void JitLogger::CodeMoveEvent(Address from, Address to) {
+ base::LockGuard<base::Mutex> guard(&logger_mutex_);
Code* from_code = Code::cast(HeapObject::FromAddress(from));
JitCodeEvent event;
« no previous file with comments | « src/heap-profiler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698