Index: base/trace_event/trace_event_memory.cc |
diff --git a/base/trace_event/trace_event_memory.cc b/base/trace_event/trace_event_memory.cc |
index 73c8536cac2a83a2145a88e93c35ec0a61d45490..5be03758202e10c24729db230a438663e0ace934 100644 |
--- a/base/trace_event/trace_event_memory.cc |
+++ b/base/trace_event/trace_event_memory.cc |
@@ -145,15 +145,8 @@ int GetPseudoStack(int skip_count_ignored, void** stack_out) { |
////////////////////////////////////////////////////////////////////////////// |
TraceMemoryController::TraceMemoryController( |
- scoped_refptr<SingleThreadTaskRunner> task_runner, |
- HeapProfilerStartFunction heap_profiler_start_function, |
- HeapProfilerStopFunction heap_profiler_stop_function, |
- GetHeapProfileFunction get_heap_profile_function) |
- : task_runner_(task_runner.Pass()), |
- heap_profiler_start_function_(heap_profiler_start_function), |
- heap_profiler_stop_function_(heap_profiler_stop_function), |
- get_heap_profile_function_(get_heap_profile_function), |
- weak_factory_(this) { |
+ scoped_refptr<SingleThreadTaskRunner> task_runner) |
+ : task_runner_(task_runner.Pass()), weak_factory_(this) { |
// Force the "memory" category to show up in the trace viewer. |
TRACE_EVENT0(TRACE_DISABLED_BY_DEFAULT("memory"), "init"); |
// Watch for the tracing system being enabled. |
@@ -198,7 +191,7 @@ void TraceMemoryController::StartProfiling() { |
InitThreadLocalStorage(); |
ScopedTraceMemory::set_enabled(true); |
// Call ::HeapProfilerWithPseudoStackStart(). |
- heap_profiler_start_function_(&GetPseudoStack); |
+ allocator::HeapProfilerStart(&GetPseudoStack); |
const int kDumpIntervalSeconds = 5; |
dump_timer_.Start(FROM_HERE, |
TimeDelta::FromSeconds(kDumpIntervalSeconds), |
@@ -214,7 +207,7 @@ void TraceMemoryController::DumpMemoryProfile() { |
DVLOG(1) << "DumpMemoryProfile"; |
// MemoryDumpHolder takes ownership of this string. See GetHeapProfile() in |
// tcmalloc for details. |
- char* dump = get_heap_profile_function_(); |
+ char* dump = allocator::GetHeapProfile(); |
const int kSnapshotId = 1; |
TRACE_EVENT_OBJECT_SNAPSHOT_WITH_ID( |
TRACE_DISABLED_BY_DEFAULT("memory"), |
@@ -232,7 +225,7 @@ void TraceMemoryController::StopProfiling() { |
ScopedTraceMemory::set_enabled(false); |
CleanupThreadLocalStorage(); |
// Call ::HeapProfilerStop(). |
- heap_profiler_stop_function_(); |
+ allocator::HeapProfilerStop(); |
} |
bool TraceMemoryController::IsTimerRunningForTest() const { |