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

Unified Diff: base/debug/trace_event_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 comments 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
« no previous file with comments | « no previous file | base/debug/trace_event_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/debug/trace_event_impl.h
diff --git a/base/debug/trace_event_impl.h b/base/debug/trace_event_impl.h
index 6075e2dee78698a897ed2e5485d20a59de721edf..dc85c2cae011efd60c17543dadf9588dcdfe914c 100644
--- a/base/debug/trace_event_impl.h
+++ b/base/debug/trace_event_impl.h
@@ -495,7 +495,8 @@ class BASE_EXPORT TraceLog {
void RemoveEnabledStateObserver(EnabledStateObserver* listener);
bool HasEnabledStateObserver(EnabledStateObserver* listener) const;
- float GetBufferPercentFull() const;
+ void GetBufferUsage(float* percent_full,
caseq 2014/11/13 17:16:21 nit: we could probably keep several callsites less
yurys 2014/11/14 10:06:59 Done.
+ size_t* approximate_event_count) const;
bool BufferIsFull() const;
// Not using base::Callback because of its limited by 7 parameters.
@@ -603,7 +604,6 @@ class BASE_EXPORT TraceLog {
static void DeleteForTesting();
// Allow tests to inspect TraceEvents.
- size_t GetEventsSize() const { return logged_events_->Size(); }
TraceEvent* GetEventByHandle(TraceEventHandle handle);
void SetProcessID(int process_id);
« no previous file with comments | « no previous file | base/debug/trace_event_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698