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

Unified Diff: components/tracing/docs/heap_profiler_internals.md

Issue 1675183006: tracing: add dump provider for malloc heap profiler (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shim_layer_linux
Patch Set: ssid review 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
Index: components/tracing/docs/heap_profiler_internals.md
diff --git a/components/tracing/docs/heap_profiler_internals.md b/components/tracing/docs/heap_profiler_internals.md
index d7026ca6de6b0923ac7370d2c0c52829d84a6c16..d1019c8d2126b02dce0dbb01222a72a4f45496f9 100644
--- a/components/tracing/docs/heap_profiler_internals.md
+++ b/components/tracing/docs/heap_profiler_internals.md
@@ -25,7 +25,7 @@ When there is a way to get notified of all allocations and frees, this is the
normal flow:
1. When an allocation occurs, call
- [`AllocationContextTracker::GetContextSnapshot()`][context-tracker]
+ [`AllocationContextTracker::GetInstanceForCurrentThread()->GetContextSnapshot()`][context-tracker]
to get an [`AllocationContext`][alloc-context].
2. Insert that context together with the address and size into an
[`AllocationRegister`][alloc-register] by calling `Insert()`.
@@ -121,7 +121,7 @@ class FooDumpProvider : public MemoryDumpProvider {
static FooDumpProvider* GetInstance();
void InsertAllocation(void* address, size_t size) {
- AllocationContext context = AllocationContextTracker::GetContextSnapshot();
+ AllocationContext context = AllocationContextTracker::GetInstanceForCurrentThread()->GetContextSnapshot();
AutoLock lock(allocation_register_lock_);
allocation_register_->Insert(address, size, context);
}

Powered by Google App Engine
This is Rietveld 408576698