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

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: 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..59a77cd150c26d9bd5e60ea407232f96e46e62c2 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 Empty();
Primiano Tucci (use gerrit) 2015/10/12 16:36:45 s/Empty/GetEmptyContext/ or just GetEmpty, as you
Ruud van Asseldonk 2015/10/13 10:42:18 As you wish.
};
// The allocation context tracker keeps track of thread-local context for heap

Powered by Google App Engine
This is Rietveld 408576698