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

Unified Diff: base/trace_event/malloc_dump_provider.cc

Issue 1839503002: [tracing] Add native allocation tracing mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add type to StackFrame; format thread name Created 4 years, 8 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: base/trace_event/malloc_dump_provider.cc
diff --git a/base/trace_event/malloc_dump_provider.cc b/base/trace_event/malloc_dump_provider.cc
index 17e5c1e62074f95720442ee3b49a944607b490bf..38fb725b6f758339627703fa59257f95ad97e668 100644
--- a/base/trace_event/malloc_dump_provider.cc
+++ b/base/trace_event/malloc_dump_provider.cc
@@ -236,12 +236,12 @@ void MallocDumpProvider::InsertAllocation(void* address, size_t size) {
auto tracker = AllocationContextTracker::GetInstanceForCurrentThread();
if (!tracker)
return;
- AllocationContext context = tracker->GetContextSnapshot();
AutoLock lock(allocation_register_lock_);
if (!allocation_register_)
return;
+ AllocationContext context = tracker->GetContextSnapshot();
Primiano Tucci (use gerrit) 2016/04/07 15:51:57 why moving this? The point of this being before th
allocation_register_->Insert(address, size, context);
}

Powered by Google App Engine
This is Rietveld 408576698