OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 to track application performance. Events consist of a name | 5 // Trace events to track application performance. Events consist of a name |
6 // a type (BEGIN, END or INSTANT), a tracking id and extra string data. | 6 // a type (BEGIN, END or INSTANT), a tracking id and extra string data. |
7 // In addition, the current process id, thread id, a timestamp down to the | 7 // In addition, the current process id, thread id, a timestamp down to the |
8 // microsecond and a file and line number of the calling location. | 8 // microsecond and a file and line number of the calling location. |
9 // | 9 // |
10 // The current implementation logs these events into a log file of the form | 10 // The current implementation logs these events into a log file of the form |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 bool OpenLogFile(); | 118 bool OpenLogFile(); |
119 void CloseLogFile(); | 119 void CloseLogFile(); |
120 bool Start(); | 120 bool Start(); |
121 void Stop(); | 121 void Stop(); |
122 void Heartbeat(); | 122 void Heartbeat(); |
123 void Log(const std::string& msg); | 123 void Log(const std::string& msg); |
124 | 124 |
125 bool enabled_; | 125 bool enabled_; |
126 FILE* log_file_; | 126 FILE* log_file_; |
127 Lock file_lock_; | 127 Lock file_lock_; |
128 TimeTicks trace_start_time_; | 128 base::TimeTicks trace_start_time_; |
129 scoped_ptr<process_util::ProcessMetrics> process_metrics_; | 129 scoped_ptr<process_util::ProcessMetrics> process_metrics_; |
130 RepeatingTimer<TraceLog> timer_; | 130 RepeatingTimer<TraceLog> timer_; |
131 }; | 131 }; |
132 | 132 |
133 } // namespace base | 133 } // namespace base |
134 | 134 |
135 #endif // BASE_TRACE_EVENT_H_ | 135 #endif // BASE_TRACE_EVENT_H_ |
OLD | NEW |