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

Unified Diff: content/browser/tracing/tracing_controller_impl.h

Issue 2724793002: Revert of memory-infra: Finish moving memory_infra from TracingController (Closed)
Patch Set: Created 3 years, 10 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
« no previous file with comments | « content/browser/tracing/trace_message_filter.cc ('k') | content/browser/tracing/tracing_controller_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/tracing/tracing_controller_impl.h
diff --git a/content/browser/tracing/tracing_controller_impl.h b/content/browser/tracing/tracing_controller_impl.h
index 81ce092a68d85ba8130b72e0825d335ffb4891e1..0c7b8ea7cae9a31c6ddf76985f089b68bee01eaa 100644
--- a/content/browser/tracing/tracing_controller_impl.h
+++ b/content/browser/tracing/tracing_controller_impl.h
@@ -47,6 +47,7 @@
class TracingControllerImpl
: public TracingController,
+ public base::trace_event::MemoryDumpManagerDelegate,
public base::trace_event::TracingAgent {
public:
// Create an endpoint that may be supplied to any TraceDataSink to
@@ -87,6 +88,12 @@
const std::string& sync_id,
const RecordClockSyncMarkerCallback& callback) override;
+ // base::trace_event::MemoryDumpManagerDelegate implementation.
+ void RequestGlobalMemoryDump(
+ const base::trace_event::MemoryDumpRequestArgs& args,
+ const base::trace_event::MemoryDumpCallback& callback) override;
+ uint64_t GetTracingProcessId() const override;
+
class TraceMessageFilterObserver {
public:
virtual void OnTraceMessageFilterAdded(TraceMessageFilter* filter) = 0;
@@ -99,6 +106,16 @@
friend struct base::DefaultLazyInstanceTraits<TracingControllerImpl>;
friend class TraceMessageFilter;
+ // The arguments and callback for an queued global memory dump request.
+ struct QueuedMemoryDumpRequest {
+ QueuedMemoryDumpRequest(
+ const base::trace_event::MemoryDumpRequestArgs& args,
+ const base::trace_event::MemoryDumpCallback& callback);
+ ~QueuedMemoryDumpRequest();
+ const base::trace_event::MemoryDumpRequestArgs args;
+ const base::trace_event::MemoryDumpCallback callback;
+ };
+
TracingControllerImpl();
~TracingControllerImpl() override;
@@ -121,6 +138,8 @@
bool can_get_trace_buffer_usage() const {
return pending_trace_buffer_usage_callback_.is_null();
}
+
+ void PerformNextQueuedGlobalMemoryDump();
// Methods for use by TraceMessageFilter.
void AddTraceMessageFilter(TraceMessageFilter* trace_message_filter);
@@ -151,6 +170,14 @@
void OnTraceLogStatusReply(TraceMessageFilter* trace_message_filter,
const base::trace_event::TraceLogStatus& status);
+ void OnProcessMemoryDumpResponse(TraceMessageFilter* trace_message_filter,
+ uint64_t dump_guid,
+ bool success);
+
+ // Callback of MemoryDumpManager::CreateProcessDump().
+ void OnBrowserProcessMemoryDumpDone(uint64_t dump_guid, bool success);
+
+ void FinalizeGlobalMemoryDumpIfAllProcessesReplied();
void SetEnabledOnFileThread(
const base::trace_event::TraceConfig& trace_config,
@@ -191,6 +218,12 @@
float maximum_trace_buffer_usage_;
size_t approximate_event_count_;
+ // Pending acks for memory RequestGlobalDumpPoint.
+ int pending_memory_dump_ack_count_;
+ int failed_memory_dump_count_;
+ TraceMessageFilterSet pending_memory_dump_filters_;
+ std::list<QueuedMemoryDumpRequest> queued_memory_dump_requests_;
+
std::vector<base::trace_event::TracingAgent*> additional_tracing_agents_;
int pending_clock_sync_ack_count_;
base::OneShotTimer clock_sync_timer_;
« no previous file with comments | « content/browser/tracing/trace_message_filter.cc ('k') | content/browser/tracing/tracing_controller_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698