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

Side by Side 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: 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 unified diff | Download patch
« no previous file with comments | « no previous file | base/debug/trace_event_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 5
6 #ifndef BASE_DEBUG_TRACE_EVENT_IMPL_H_ 6 #ifndef BASE_DEBUG_TRACE_EVENT_IMPL_H_
7 #define BASE_DEBUG_TRACE_EVENT_IMPL_H_ 7 #define BASE_DEBUG_TRACE_EVENT_IMPL_H_
8 8
9 #include <stack> 9 #include <stack>
10 #include <string> 10 #include <string>
(...skipping 477 matching lines...) Expand 10 before | Expand all | Expand 10 after
488 virtual void OnTraceLogEnabled() = 0; 488 virtual void OnTraceLogEnabled() = 0;
489 489
490 // Called just after the tracing system disables, outside of the |lock_|. 490 // Called just after the tracing system disables, outside of the |lock_|.
491 // TraceLog::IsEnabled() is false at this point. 491 // TraceLog::IsEnabled() is false at this point.
492 virtual void OnTraceLogDisabled() = 0; 492 virtual void OnTraceLogDisabled() = 0;
493 }; 493 };
494 void AddEnabledStateObserver(EnabledStateObserver* listener); 494 void AddEnabledStateObserver(EnabledStateObserver* listener);
495 void RemoveEnabledStateObserver(EnabledStateObserver* listener); 495 void RemoveEnabledStateObserver(EnabledStateObserver* listener);
496 bool HasEnabledStateObserver(EnabledStateObserver* listener) const; 496 bool HasEnabledStateObserver(EnabledStateObserver* listener) const;
497 497
498 size_t GetBufferUsage() const;
caseq 2014/11/12 20:52:49 Can we get more descriptive -- e.g. GetApproximate
yurys 2014/11/13 15:54:33 Done.
498 float GetBufferPercentFull() const; 499 float GetBufferPercentFull() const;
499 bool BufferIsFull() const; 500 bool BufferIsFull() const;
500 501
501 // Not using base::Callback because of its limited by 7 parameters. 502 // Not using base::Callback because of its limited by 7 parameters.
502 // Also, using primitive type allows directly passing callback from WebCore. 503 // Also, using primitive type allows directly passing callback from WebCore.
503 // WARNING: It is possible for the previously set callback to be called 504 // WARNING: It is possible for the previously set callback to be called
504 // after a call to SetEventCallbackEnabled() that replaces or a call to 505 // after a call to SetEventCallbackEnabled() that replaces or a call to
505 // SetEventCallbackDisabled() that disables the callback. 506 // SetEventCallbackDisabled() that disables the callback.
506 // This callback may be invoked on any thread. 507 // This callback may be invoked on any thread.
507 // For TRACE_EVENT_PHASE_COMPLETE events, the client will still receive pairs 508 // For TRACE_EVENT_PHASE_COMPLETE events, the client will still receive pairs
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after
799 scoped_refptr<MessageLoopProxy> flush_message_loop_proxy_; 800 scoped_refptr<MessageLoopProxy> flush_message_loop_proxy_;
800 subtle::AtomicWord generation_; 801 subtle::AtomicWord generation_;
801 802
802 DISALLOW_COPY_AND_ASSIGN(TraceLog); 803 DISALLOW_COPY_AND_ASSIGN(TraceLog);
803 }; 804 };
804 805
805 } // namespace debug 806 } // namespace debug
806 } // namespace base 807 } // namespace base
807 808
808 #endif // BASE_DEBUG_TRACE_EVENT_IMPL_H_ 809 #endif // BASE_DEBUG_TRACE_EVENT_IMPL_H_
OLDNEW
« 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