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

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

Issue 8491043: Allow linker initialization of lazy instance (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: willchan comments + rebase Created 9 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | base/files/file_path_watcher_linux.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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.h" 5 #include "base/debug/trace_event.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/format_macros.h" 10 #include "base/format_macros.h"
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 &g_categories[0]; 54 &g_categories[0];
55 const TraceCategory* const g_category_categories_exhausted = 55 const TraceCategory* const g_category_categories_exhausted =
56 &g_categories[1]; 56 &g_categories[1];
57 const TraceCategory* const g_category_metadata = 57 const TraceCategory* const g_category_metadata =
58 &g_categories[2]; 58 &g_categories[2];
59 int g_category_index = 3; // skip initial 3 categories 59 int g_category_index = 3; // skip initial 3 categories
60 60
61 // The most-recently captured name of the current thread 61 // The most-recently captured name of the current thread
62 LazyInstance<ThreadLocalPointer<char>, 62 LazyInstance<ThreadLocalPointer<char>,
63 LeakyLazyInstanceTraits<ThreadLocalPointer<char> > > 63 LeakyLazyInstanceTraits<ThreadLocalPointer<char> > >
64 g_current_thread_name(LINKER_INITIALIZED); 64 g_current_thread_name = LAZY_INSTANCE_INITIALIZER;
65 65
66 } // namespace 66 } // namespace
67 67
68 //////////////////////////////////////////////////////////////////////////////// 68 ////////////////////////////////////////////////////////////////////////////////
69 // 69 //
70 // TraceValue 70 // TraceValue
71 // 71 //
72 //////////////////////////////////////////////////////////////////////////////// 72 ////////////////////////////////////////////////////////////////////////////////
73 73
74 void TraceValue::AppendAsJSON(std::string* out) const { 74 void TraceValue::AppendAsJSON(std::string* out) const {
(...skipping 630 matching lines...) Expand 10 before | Expand all | Expand 10 after
705 NULL, 0, NULL, 0, 705 NULL, 0, NULL, 0,
706 p_data_->threshold_begin_id, p_data_->threshold, 706 p_data_->threshold_begin_id, p_data_->threshold,
707 TraceLog::EVENT_FLAG_NONE); 707 TraceLog::EVENT_FLAG_NONE);
708 } 708 }
709 } 709 }
710 710
711 } // namespace internal 711 } // namespace internal
712 712
713 } // namespace debug 713 } // namespace debug
714 } // namespace base 714 } // namespace base
OLDNEW
« no previous file with comments | « no previous file | base/files/file_path_watcher_linux.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698