diff options
Diffstat (limited to 'base/debug/trace_event_win.cc')
-rw-r--r-- | base/debug/trace_event_win.cc | 47 |
1 files changed, 23 insertions, 24 deletions
diff --git a/base/debug/trace_event_win.cc b/base/debug/trace_event_win.cc index bba4713..4929944 100644 --- a/base/debug/trace_event_win.cc +++ b/base/debug/trace_event_win.cc @@ -1,6 +1,7 @@ // Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. + #include "base/debug/trace_event_win.h" #include "base/logging.h" @@ -26,26 +27,24 @@ const GUID kTraceEventClass64 = { 0x97be602d, 0x2930, 0x4ac3, 0x80, 0x46, 0xb6, 0x76, 0x3b, 0x63, 0x1d, 0xfe}; -TraceEventETWProvider::TraceEventETWProvider() : - EtwTraceProvider(kChromeTraceProviderName) { +TraceLog::TraceLog() : EtwTraceProvider(kChromeTraceProviderName) { Register(); } -TraceEventETWProvider* TraceEventETWProvider::GetInstance() { - return Singleton<TraceEventETWProvider, - StaticMemorySingletonTraits<TraceEventETWProvider> >::get(); +TraceLog* TraceLog::GetInstance() { + return Singleton<TraceLog, StaticMemorySingletonTraits<TraceLog> >::get(); } -bool TraceEventETWProvider::StartTracing() { +bool TraceLog::StartTracing() { return true; } -void TraceEventETWProvider::TraceEvent(const char* name, - size_t name_len, - TraceEventPhase type, - const void* id, - const char* extra, - size_t extra_len) { +void TraceLog::TraceEvent(const char* name, + size_t name_len, + EventType type, + const void* id, + const char* extra, + size_t extra_len) { // Make sure we don't touch NULL. if (name == NULL) name = ""; @@ -54,14 +53,14 @@ void TraceEventETWProvider::TraceEvent(const char* name, EtwEventType etw_type = 0; switch (type) { - case TRACE_EVENT_PHASE_BEGIN: + case TraceLog::EVENT_BEGIN: etw_type = kTraceEventTypeBegin; break; - case TRACE_EVENT_PHASE_END: + case TraceLog::EVENT_END: etw_type = kTraceEventTypeEnd; break; - case TRACE_EVENT_PHASE_INSTANT: + case TraceLog::EVENT_INSTANT: etw_type = kTraceEventTypeInstant; break; @@ -94,13 +93,13 @@ void TraceEventETWProvider::TraceEvent(const char* name, Log(event.get()); } -void TraceEventETWProvider::Trace(const char* name, - size_t name_len, - TraceEventPhase type, - const void* id, - const char* extra, - size_t extra_len) { - TraceEventETWProvider* provider = TraceEventETWProvider::GetInstance(); +void TraceLog::Trace(const char* name, + size_t name_len, + EventType type, + const void* id, + const char* extra, + size_t extra_len) { + TraceLog* provider = TraceLog::GetInstance(); if (provider && provider->IsTracing()) { // Compute the name & extra lengths if not supplied already. if (name_len == -1) @@ -112,8 +111,8 @@ void TraceEventETWProvider::Trace(const char* name, } } -void TraceEventETWProvider::Resurrect() { - StaticMemorySingletonTraits<TraceEventETWProvider>::Resurrect(); +void TraceLog::Resurrect() { + StaticMemorySingletonTraits<TraceLog>::Resurrect(); } } // namespace debug |