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

Unified Diff: base/trace_event/heap_profiler_allocation_context_tracker.cc

Issue 2777343003: [memory-infra] Add api to enable heap profiling in MemoryDumpManager
Patch Set: nits. Created 3 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: base/trace_event/heap_profiler_allocation_context_tracker.cc
diff --git a/base/trace_event/heap_profiler_allocation_context_tracker.cc b/base/trace_event/heap_profiler_allocation_context_tracker.cc
index b47dc16eddd02b2565bd18511d0490a17c488056..f926f90b81b8ad284cad2b1583ddfdf6d535ace0 100644
--- a/base/trace_event/heap_profiler_allocation_context_tracker.cc
+++ b/base/trace_event/heap_profiler_allocation_context_tracker.cc
@@ -183,11 +183,9 @@ bool AllocationContextTracker::GetContextSnapshot(AllocationContext* ctx) {
switch (mode) {
case CaptureMode::DISABLED:
- {
- break;
- }
+ case CaptureMode::BACKGROUND:
+ break;
case CaptureMode::PSEUDO_STACK:
- {
for (const PseudoStackFrame& stack_frame : pseudo_stack_) {
if (backtrace == backtrace_end) {
break;
@@ -196,9 +194,7 @@ bool AllocationContextTracker::GetContextSnapshot(AllocationContext* ctx) {
StackFrame::FromTraceEventName(stack_frame.trace_event_name);
}
break;
- }
case CaptureMode::NATIVE_STACK:
- {
// Backtrace contract requires us to return bottom frames, i.e.
// from main() and up. Stack unwinding produces top frames, i.e.
// from this point and up until main(). We request many frames to
@@ -226,7 +222,6 @@ bool AllocationContextTracker::GetContextSnapshot(AllocationContext* ctx) {
*backtrace++ = StackFrame::FromProgramCounter(frame);
}
break;
- }
}
ctx->backtrace.frame_count = backtrace - std::begin(ctx->backtrace.frames);
« no previous file with comments | « base/trace_event/heap_profiler_allocation_context_tracker.h ('k') | base/trace_event/malloc_dump_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698