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

Side by Side Diff: base/debug/trace_event_impl.h

Issue 15418002: Record Chrome trace events in tcmalloc heap profiles (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review comments 4 Created 7 years, 5 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 unified diff | Download patch | Annotate | Revision Log
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 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 // Called just after the tracing system becomes enabled, outside of the 337 // Called just after the tracing system becomes enabled, outside of the
338 // |lock_|. TraceLog::IsEnabled() is true at this point. 338 // |lock_|. TraceLog::IsEnabled() is true at this point.
339 virtual void OnTraceLogEnabled() = 0; 339 virtual void OnTraceLogEnabled() = 0;
340 340
341 // Called just after the tracing system disables, outside of the |lock_|. 341 // Called just after the tracing system disables, outside of the |lock_|.
342 // TraceLog::IsEnabled() is false at this point. 342 // TraceLog::IsEnabled() is false at this point.
343 virtual void OnTraceLogDisabled() = 0; 343 virtual void OnTraceLogDisabled() = 0;
344 }; 344 };
345 void AddEnabledStateObserver(EnabledStateObserver* listener); 345 void AddEnabledStateObserver(EnabledStateObserver* listener);
346 void RemoveEnabledStateObserver(EnabledStateObserver* listener); 346 void RemoveEnabledStateObserver(EnabledStateObserver* listener);
347 bool HasEnabledStateObserver(EnabledStateObserver* listener) const;
347 348
348 float GetBufferPercentFull() const; 349 float GetBufferPercentFull() const;
349 350
350 // Set the thread-safe notification callback. The callback can occur at any 351 // Set the thread-safe notification callback. The callback can occur at any
351 // time and from any thread. WARNING: It is possible for the previously set 352 // time and from any thread. WARNING: It is possible for the previously set
352 // callback to be called during OR AFTER a call to SetNotificationCallback. 353 // callback to be called during OR AFTER a call to SetNotificationCallback.
353 // Therefore, the target of the callback must either be a global function, 354 // Therefore, the target of the callback must either be a global function,
354 // ref-counted object or a LazyInstance with Leaky traits (or equivalent). 355 // ref-counted object or a LazyInstance with Leaky traits (or equivalent).
355 typedef base::Callback<void(int)> NotificationCallback; 356 typedef base::Callback<void(int)> NotificationCallback;
356 void SetNotificationCallback(const NotificationCallback& cb); 357 void SetNotificationCallback(const NotificationCallback& cb);
(...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after
562 563
563 CategoryFilter category_filter_; 564 CategoryFilter category_filter_;
564 565
565 DISALLOW_COPY_AND_ASSIGN(TraceLog); 566 DISALLOW_COPY_AND_ASSIGN(TraceLog);
566 }; 567 };
567 568
568 } // namespace debug 569 } // namespace debug
569 } // namespace base 570 } // namespace base
570 571
571 #endif // BASE_DEBUG_TRACE_EVENT_IMPL_H_ 572 #endif // BASE_DEBUG_TRACE_EVENT_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698