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

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

Issue 7778033: Add trace code to track all posted tasks in message_loop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: win trace tests Created 9 years, 3 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
« no previous file with comments | « no previous file | base/debug/trace_event.cc » ('j') | base/message_loop.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // Trace events are for tracking application performance. 5 // Trace events are for tracking application performance.
6 // 6 //
7 // Events are issued against categories. Whereas LOG's 7 // Events are issued against categories. Whereas LOG's
8 // categories are statically defined, TRACE categories are created 8 // categories are statically defined, TRACE categories are created
9 // implicitly with a string. For example: 9 // implicitly with a string. For example:
10 // TRACE_EVENT_INSTANT0("MY_SUBSYSTEM", "SomeImportantEvent") 10 // TRACE_EVENT_INSTANT0("MY_SUBSYSTEM", "SomeImportantEvent")
(...skipping 545 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 const char* name, 556 const char* name,
557 const void* id, 557 const void* id,
558 const char* extra); 558 const char* extra);
559 static void AddTraceEventEtw(TraceEventPhase phase, 559 static void AddTraceEventEtw(TraceEventPhase phase,
560 const char* name, 560 const char* name,
561 const void* id, 561 const void* id,
562 const std::string& extra); 562 const std::string& extra);
563 563
564 // Exposed for unittesting: 564 // Exposed for unittesting:
565 565
566 // Allows deleting our singleton instance.
567 static void DeleteForTesting();
568
566 // Allows resurrecting our singleton instance post-AtExit processing. 569 // Allows resurrecting our singleton instance post-AtExit processing.
567 static void Resurrect(); 570 static void Resurrect();
568 571
569 // Allow tests to inspect TraceEvents. 572 // Allow tests to inspect TraceEvents.
570 size_t GetEventsSize() const { return logged_events_.size(); } 573 size_t GetEventsSize() const { return logged_events_.size(); }
571 const TraceEvent& GetEventAt(size_t index) const { 574 const TraceEvent& GetEventAt(size_t index) const {
572 DCHECK(index < logged_events_.size()); 575 DCHECK(index < logged_events_.size());
573 return logged_events_[index]; 576 return logged_events_[index];
574 } 577 }
575 578
(...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 Data* p_data_; 666 Data* p_data_;
664 Data data_; 667 Data data_;
665 }; 668 };
666 669
667 } // namespace internal 670 } // namespace internal
668 671
669 } // namespace debug 672 } // namespace debug
670 } // namespace base 673 } // namespace base
671 674
672 #endif // BASE_DEBUG_TRACE_EVENT_H_ 675 #endif // BASE_DEBUG_TRACE_EVENT_H_
OLDNEW
« no previous file with comments | « no previous file | base/debug/trace_event.cc » ('j') | base/message_loop.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698