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 #include "webrtc/rtc_base/event_tracer.h" | 10 #include "webrtc/rtc_base/event_tracer.h" |
(...skipping 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 : kTraceArgBufferLength - 1; | 313 : kTraceArgBufferLength - 1; |
314 // This will hopefully be very close to nop. On most implementations, it | 314 // This will hopefully be very close to nop. On most implementations, it |
315 // just writes null byte and sets the length field of the string. | 315 // just writes null byte and sets the length field of the string. |
316 output.resize(output_length); | 316 output.resize(output_length); |
317 } | 317 } |
318 | 318 |
319 return output; | 319 return output; |
320 } | 320 } |
321 | 321 |
322 rtc::CriticalSection crit_; | 322 rtc::CriticalSection crit_; |
323 std::vector<TraceEvent> trace_events_ GUARDED_BY(crit_); | 323 std::vector<TraceEvent> trace_events_ RTC_GUARDED_BY(crit_); |
324 rtc::PlatformThread logging_thread_; | 324 rtc::PlatformThread logging_thread_; |
325 rtc::Event shutdown_event_; | 325 rtc::Event shutdown_event_; |
326 rtc::ThreadChecker thread_checker_; | 326 rtc::ThreadChecker thread_checker_; |
327 FILE* output_file_ = nullptr; | 327 FILE* output_file_ = nullptr; |
328 bool output_file_owned_ = false; | 328 bool output_file_owned_ = false; |
329 }; | 329 }; |
330 | 330 |
331 static void EventTracingThreadFunc(void* params) { | 331 static void EventTracingThreadFunc(void* params) { |
332 static_cast<EventLogger*>(params)->Log(); | 332 static_cast<EventLogger*>(params)->Log(); |
333 } | 333 } |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
405 RTC_DCHECK(old_logger); | 405 RTC_DCHECK(old_logger); |
406 RTC_CHECK(rtc::AtomicOps::CompareAndSwapPtr( | 406 RTC_CHECK(rtc::AtomicOps::CompareAndSwapPtr( |
407 &g_event_logger, old_logger, | 407 &g_event_logger, old_logger, |
408 static_cast<EventLogger*>(nullptr)) == old_logger); | 408 static_cast<EventLogger*>(nullptr)) == old_logger); |
409 delete old_logger; | 409 delete old_logger; |
410 webrtc::SetupEventTracer(nullptr, nullptr); | 410 webrtc::SetupEventTracer(nullptr, nullptr); |
411 } | 411 } |
412 | 412 |
413 } // namespace tracing | 413 } // namespace tracing |
414 } // namespace rtc | 414 } // namespace rtc |
OLD | NEW |