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

Unified Diff: third_party/tcmalloc/chromium/src/base/sysinfo.cc

Issue 6532051: Fix heap profiler to always append the process id to the heap dump.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 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 | « no previous file | third_party/tcmalloc/chromium/src/heap-profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/tcmalloc/chromium/src/base/sysinfo.cc
===================================================================
--- third_party/tcmalloc/chromium/src/base/sysinfo.cc (revision 86078)
+++ third_party/tcmalloc/chromium/src/base/sysinfo.cc (working copy)
@@ -176,6 +176,9 @@
// in their first character! If that assumption is violated, we'll
// still get a profile, but one with an unexpected name.
// TODO(csilvers): set an envvar instead when we can do it reliably.
+//
+// In Chromium this hack is intentionally disabled, because the path is not
+// re-initialized upon fork.
bool GetUniquePathFromEnv(const char* env_name, char* path) {
char* envval = getenv(env_name);
if (envval == NULL || *envval == '\0')
@@ -185,7 +188,9 @@
envval[0] & 127, envval+1, (unsigned int)(getpid()));
} else {
snprintf(path, PATH_MAX, "%s", envval);
+#if 0
envval[0] |= 128; // set high bit for kids to see
+#endif
}
return true;
}
« no previous file with comments | « no previous file | third_party/tcmalloc/chromium/src/heap-profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698