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

Unified Diff: base/trace_event/heap_profiler_allocation_context.h

Issue 2089253002: [tracing] Optimize AllocationRegister and increase max backtrace depth. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Cleanup tests Created 4 years, 6 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/heap_profiler_allocation_context.h
diff --git a/base/trace_event/heap_profiler_allocation_context.h b/base/trace_event/heap_profiler_allocation_context.h
index 3566dd08f5d377a7f66e5b747c48717723ffb7a5..24e2dec73f1f48ff886c0eabe3d27e1604dcd48a 100644
--- a/base/trace_event/heap_profiler_allocation_context.h
+++ b/base/trace_event/heap_profiler_allocation_context.h
@@ -71,18 +71,20 @@ struct BASE_EXPORT Backtrace {
// If the stack is higher than what can be stored here, the bottom frames
// (the ones closer to main()) are stored. Depth of 12 is enough for most
// pseudo traces (see above), but not for native traces, where we need more.
- enum { kMaxFrameCount = 24 };
+ enum { kMaxFrameCount = 48 };
StackFrame frames[kMaxFrameCount];
size_t frame_count;
};
bool BASE_EXPORT operator==(const Backtrace& lhs, const Backtrace& rhs);
+bool BASE_EXPORT operator!=(const Backtrace& lhs, const Backtrace& rhs);
// The |AllocationContext| is context metadata that is kept for every allocation
// when heap profiling is enabled. To simplify memory management for book-
// keeping, this struct has a fixed size.
struct BASE_EXPORT AllocationContext {
AllocationContext();
+ AllocationContext(const Backtrace& backtrace, const char* type_name);
Backtrace backtrace;
@@ -95,6 +97,8 @@ struct BASE_EXPORT AllocationContext {
bool BASE_EXPORT operator==(const AllocationContext& lhs,
const AllocationContext& rhs);
+bool BASE_EXPORT operator!=(const AllocationContext& lhs,
+ const AllocationContext& rhs);
// Struct to store the size and count of the allocations.
struct AllocationMetrics {

Powered by Google App Engine
This is Rietveld 408576698