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

Unified Diff: base/trace_event/memory_profiler_allocation_context.h

Issue 1391933004: [Tracing] Add hook to PartitionAlloc for heap profiling (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address primiano comments Created 5 years, 2 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/memory_profiler_allocation_context.h
diff --git a/base/trace_event/memory_profiler_allocation_context.h b/base/trace_event/memory_profiler_allocation_context.h
index 3487f3ecfe0a9271ae768e03cc7892a64b7e68d2..41ab427ed168d1dfa9e8c7ac1e1fac46cca5d27a 100644
--- a/base/trace_event/memory_profiler_allocation_context.h
+++ b/base/trace_event/memory_profiler_allocation_context.h
@@ -86,6 +86,9 @@ struct BASE_EXPORT AllocationContext {
// |TRACE_ALLOCATION_CONTEXT| macro. A nullptr key indicates that the field is
// unused.
std::pair<const char*, const char*> fields[2];
+
+ // Returns an |AllocationContext| with empty backtrace and no fields.
+ static AllocationContext GetEmpty();
};
// The allocation context tracker keeps track of thread-local context for heap

Powered by Google App Engine
This is Rietveld 408576698