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

Unified Diff: third_party/tcmalloc/chromium/src/symbolize.cc

Issue 286953011: tcmalloc: Let DEFINE_string define char arrays. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: * Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/tcmalloc/chromium/src/base/commandlineflags.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/tcmalloc/chromium/src/symbolize.cc
diff --git a/third_party/tcmalloc/chromium/src/symbolize.cc b/third_party/tcmalloc/chromium/src/symbolize.cc
index 65150f31caf72b3994e168f6783af0c8c3139394..a1583ec6e25f8b720304943ecf37da1bf5f45f8e 100644
--- a/third_party/tcmalloc/chromium/src/symbolize.cc
+++ b/third_party/tcmalloc/chromium/src/symbolize.cc
@@ -68,11 +68,6 @@ DEFINE_string(symbolize_pprof,
EnvToString("PPROF_PATH", "pprof"),
"Path to pprof to call for reporting function names.");
-// heap_profile_table_pprof may be referenced after destructors are
-// called (since that's when leak-checking is done), so we make
-// a more-permanent copy that won't ever get destroyed.
-static string* g_pprof_path = new string(FLAGS_symbolize_pprof);
-
// Returns NULL if we're on an OS where we can't get the invocation name.
// Using a static var is ok because we're not called from a thread.
static char* GetProgramInvocationName() {
@@ -129,7 +124,7 @@ int SymbolTable::Symbolize() {
PrintError("Cannot figure out the name of this executable (argv0)");
return 0;
}
- if (access(g_pprof_path->c_str(), R_OK) != 0) {
+ if (access(FLAGS_symbolize_pprof, R_OK) != 0) {
PrintError("Cannot find 'pprof' (is PPROF_PATH set correctly?)");
return 0;
}
@@ -191,7 +186,7 @@ int SymbolTable::Symbolize() {
unsetenv("HEAPPROFILE");
unsetenv("HEAPCHECK");
unsetenv("PERFTOOLS_VERBOSE");
- execlp(g_pprof_path->c_str(), g_pprof_path->c_str(),
+ execlp(FLAGS_symbolize_pprof, FLAGS_symbolize_pprof,
"--symbols", argv0, NULL);
_exit(3); // if execvp fails, it's bad news for us
}
« no previous file with comments | « third_party/tcmalloc/chromium/src/base/commandlineflags.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698