OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
11 // This file defines the interface for event tracing in WebRTC. | 11 // This file defines the interface for event tracing in WebRTC. |
12 // | 12 // |
13 // Event log handlers are set through SetupEventTracer(). User of this API will | 13 // Event log handlers are set through SetupEventTracer(). User of this API will |
14 // provide two function pointers to handle event tracing calls. | 14 // provide two function pointers to handle event tracing calls. |
15 // | 15 // |
16 // * GetCategoryEnabledPtr | 16 // * GetCategoryEnabledPtr |
17 // Event tracing system calls this function to determine if a particular | 17 // Event tracing system calls this function to determine if a particular |
18 // event category is enabled. | 18 // event category is enabled. |
19 // | 19 // |
20 // * AddTraceEventPtr | 20 // * AddTraceEventPtr |
21 // Adds a tracing event. It is the user's responsibility to log the data | 21 // Adds a tracing event. It is the user's responsibility to log the data |
22 // provided. | 22 // provided. |
23 // | 23 // |
24 // Parameters for the above two functions are described in trace_event.h. | 24 // Parameters for the above two functions are described in trace_event.h. |
25 | 25 |
26 #ifndef WEBRTC_BASE_EVENT_TRACER_H_ | 26 #ifndef WEBRTC_RTC_BASE_EVENT_TRACER_H_ |
27 #define WEBRTC_BASE_EVENT_TRACER_H_ | 27 #define WEBRTC_RTC_BASE_EVENT_TRACER_H_ |
28 | 28 |
29 #include <stdio.h> | 29 #include <stdio.h> |
30 | 30 |
31 namespace webrtc { | 31 namespace webrtc { |
32 | 32 |
33 typedef const unsigned char* (*GetCategoryEnabledPtr)(const char* name); | 33 typedef const unsigned char* (*GetCategoryEnabledPtr)(const char* name); |
34 typedef void (*AddTraceEventPtr)(char phase, | 34 typedef void (*AddTraceEventPtr)(char phase, |
35 const unsigned char* category_enabled, | 35 const unsigned char* category_enabled, |
36 const char* name, | 36 const char* name, |
37 unsigned long long id, | 37 unsigned long long id, |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 // Set up internal event tracer. | 75 // Set up internal event tracer. |
76 void SetupInternalTracer(); | 76 void SetupInternalTracer(); |
77 bool StartInternalCapture(const char* filename); | 77 bool StartInternalCapture(const char* filename); |
78 void StartInternalCaptureToFile(FILE* file); | 78 void StartInternalCaptureToFile(FILE* file); |
79 void StopInternalCapture(); | 79 void StopInternalCapture(); |
80 // Make sure we run this, this will tear down the internal tracing. | 80 // Make sure we run this, this will tear down the internal tracing. |
81 void ShutdownInternalTracer(); | 81 void ShutdownInternalTracer(); |
82 } // namespace tracing | 82 } // namespace tracing |
83 } // namespace rtc | 83 } // namespace rtc |
84 | 84 |
85 #endif // WEBRTC_BASE_EVENT_TRACER_H_ | 85 #endif // WEBRTC_RTC_BASE_EVENT_TRACER_H_ |
OLD | NEW |