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

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

Issue 717083003: Report trace buffer usage as number of events, not only percentage (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed comment Created 6 years, 1 month 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: 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 9bd84200d45f276f9c5b84886afa5d9290964818..0baf4a98218bb1d33944c9467ed0692ec6f11bdb 100644
--- a/content/browser/tracing/tracing_controller_impl.h
+++ b/content/browser/tracing/tracing_controller_impl.h
@@ -43,8 +43,8 @@ class TracingControllerImpl : public TracingController {
base::debug::TraceOptions* out_trace_options) override;
bool CaptureMonitoringSnapshot(
const scoped_refptr<TraceDataSink>& sink) override;
- bool GetTraceBufferPercentFull(
- const GetTraceBufferPercentFullCallback& callback) override;
+ bool GetTraceBufferUsage(
+ const GetTraceBufferUsageCallback& callback) override;
bool SetWatchEvent(const std::string& category_name,
const std::string& event_name,
const WatchEventCallback& callback) override;
@@ -116,9 +116,9 @@ class TracingControllerImpl : public TracingController {
void OnCaptureMonitoringSnapshotAcked(
TraceMessageFilter* trace_message_filter);
- void OnTraceBufferPercentFullReply(
- TraceMessageFilter* trace_message_filter,
- float percent_full);
+ void OnTraceBufferUsageReply(TraceMessageFilter* trace_message_filter,
+ float percent_full,
+ size_t approximate_event_count);
void OnWatchEventMatched();
@@ -148,10 +148,11 @@ class TracingControllerImpl : public TracingController {
// Pending acks for CaptureMonitoringSnapshot.
int pending_capture_monitoring_snapshot_ack_count_;
TraceMessageFilterSet pending_capture_monitoring_filters_;
- // Pending acks for GetTraceBufferPercentFull.
+ // Pending acks for GetTraceBufferUsage.
int pending_trace_buffer_percent_full_ack_count_;
alph 2014/11/14 10:59:31 s/percent_full/buffer_usage/
yurys 2014/11/14 13:03:47 Done.
TraceMessageFilterSet pending_trace_buffer_percent_full_filters_;
alph 2014/11/14 10:59:30 ditto
yurys 2014/11/14 13:03:47 Done.
float maximum_trace_buffer_percent_full_;
+ size_t approximate_event_count_;
#if defined(OS_CHROMEOS) || defined(OS_WIN)
bool is_system_tracing_;
@@ -161,7 +162,7 @@ class TracingControllerImpl : public TracingController {
base::debug::TraceOptions trace_options_;
GetCategoriesDoneCallback pending_get_categories_done_callback_;
- GetTraceBufferPercentFullCallback pending_trace_buffer_percent_full_callback_;
+ GetTraceBufferUsageCallback pending_trace_buffer_percent_full_callback_;
alph 2014/11/14 10:59:31 ditto
yurys 2014/11/14 13:03:47 Done.
std::string watch_category_name_;
std::string watch_event_name_;

Powered by Google App Engine
This is Rietveld 408576698