Parallel compaction, i.e., concurrently moving of objects (and code) requires
proper synchronization in the logger.
R=hpayer@chromium.org
BUG=chromium:524425
LOG=N
Review URL: https://codereview.chromium.org/
1338253002
Cr-Commit-Position: refs/heads/master@{#30714}
void HeapProfiler::ObjectMoveEvent(Address from, Address to, int size) {
+ base::LockGuard<base::Mutex> guard(&profiler_mutex_);
bool known_object = ids_->MoveObject(from, to, size);
if (!known_object && !allocation_tracker_.is_empty()) {
allocation_tracker_->address_to_trace()->MoveObject(from, to, size);
List<v8::HeapProfiler::WrapperInfoCallback> wrapper_callbacks_;
base::SmartPointer<AllocationTracker> allocation_tracker_;
bool is_tracking_object_moves_;
+ base::Mutex profiler_mutex_;
};
} } // namespace v8::internal
int length);
JitCodeEventHandler code_event_handler_;
+ base::Mutex logger_mutex_;
};
void JitLogger::CodeMoveEvent(Address from, Address to) {
+ base::LockGuard<base::Mutex> guard(&logger_mutex_);
Code* from_code = Code::cast(HeapObject::FromAddress(from));
JitCodeEvent event;