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

Side by Side Diff: base/debug/trace_event_impl.cc

Issue 621883002: Adding a ToPrettyString method to ConvertableToTracedValue. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « base/debug/trace_event_impl.h ('k') | cc/scheduler/scheduler_state_machine_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "base/debug/trace_event_impl.h" 5 #include "base/debug/trace_event_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/base_switches.h" 9 #include "base/base_switches.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 LeakySingletonTraits<base::debug::TraceLog> >::OnExit(0); 45 LeakySingletonTraits<base::debug::TraceLog> >::OnExit(0);
46 } 46 }
47 }; 47 };
48 48
49 // The thread buckets for the sampling profiler. 49 // The thread buckets for the sampling profiler.
50 BASE_EXPORT TRACE_EVENT_API_ATOMIC_WORD g_trace_state[3]; 50 BASE_EXPORT TRACE_EVENT_API_ATOMIC_WORD g_trace_state[3];
51 51
52 namespace base { 52 namespace base {
53 namespace debug { 53 namespace debug {
54 54
55 std::string ConvertableToTraceFormat::ToPrettyString() const {
56 return ToString();
57 }
58
55 namespace { 59 namespace {
56 60
57 // The overhead of TraceEvent above this threshold will be reported in the 61 // The overhead of TraceEvent above this threshold will be reported in the
58 // trace. 62 // trace.
59 const int kOverheadReportThresholdInMicroseconds = 50; 63 const int kOverheadReportThresholdInMicroseconds = 50;
60 64
61 // String options that can be used to initialize TraceOptions. 65 // String options that can be used to initialize TraceOptions.
62 const char kRecordUntilFull[] = "record-until-full"; 66 const char kRecordUntilFull[] = "record-until-full";
63 const char kRecordContinuously[] = "record-continuously"; 67 const char kRecordContinuously[] = "record-continuously";
64 const char kRecordAsMuchAsPossible[] = "record-as-much-as-possible"; 68 const char kRecordAsMuchAsPossible[] = "record-as-much-as-possible";
(...skipping 2506 matching lines...) Expand 10 before | Expand all | Expand 10 after
2571 } 2575 }
2572 2576
2573 ScopedTraceBinaryEfficient::~ScopedTraceBinaryEfficient() { 2577 ScopedTraceBinaryEfficient::~ScopedTraceBinaryEfficient() {
2574 if (*category_group_enabled_) { 2578 if (*category_group_enabled_) {
2575 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION(category_group_enabled_, 2579 TRACE_EVENT_API_UPDATE_TRACE_EVENT_DURATION(category_group_enabled_,
2576 name_, event_handle_); 2580 name_, event_handle_);
2577 } 2581 }
2578 } 2582 }
2579 2583
2580 } // namespace trace_event_internal 2584 } // namespace trace_event_internal
OLDNEW
« no previous file with comments | « base/debug/trace_event_impl.h ('k') | cc/scheduler/scheduler_state_machine_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698