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

Side by Side Diff: base/profiler.cc

Issue 3119022: Header cleanup in base.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 10 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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/profiler.h" 5 #include "base/profiler.h"
6 #include "base/string_util.h"
7 6
8 #if defined(USE_TCMALLOC) && defined(OS_LINUX) 7 #if defined(USE_TCMALLOC) && defined(OS_LINUX)
9 #include "third_party/tcmalloc/chromium/src/google/profiler.h" 8 #include "third_party/tcmalloc/chromium/src/google/profiler.h"
10 #endif 9 #endif
11 10
12 // When actually using quantify, uncomment the following line. 11 // When actually using quantify, uncomment the following line.
13 // #define QUANTIFY 12 // #define QUANTIFY
14 13
15 #ifdef QUANTIFY 14 #ifdef QUANTIFY
16 // this #define is used to prevent people from directly using pure.h 15 // this #define is used to prevent people from directly using pure.h
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 void Profiler::SetThreadName(const char *name) { 51 void Profiler::SetThreadName(const char *name) {
53 #ifdef QUANTIFY 52 #ifdef QUANTIFY
54 // make a copy since the Quantify function takes a char*, not const char* 53 // make a copy since the Quantify function takes a char*, not const char*
55 char buffer[512]; 54 char buffer[512];
56 base::snprintf(buffer, sizeof(buffer)-1, "%s", name); 55 base::snprintf(buffer, sizeof(buffer)-1, "%s", name);
57 QuantifySetThreadName(buffer); 56 QuantifySetThreadName(buffer);
58 #endif 57 #endif
59 } 58 }
60 59
61 } // namespace base 60 } // namespace base
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698