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

Unified Diff: third_party/tcmalloc/chromium/src/heap-checker.cc

Issue 1076002: Revert 41938 - Merged third_party/tcmalloc/vendor/src(googleperftools r87) in... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 9 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
Index: third_party/tcmalloc/chromium/src/heap-checker.cc
===================================================================
--- third_party/tcmalloc/chromium/src/heap-checker.cc (revision 41940)
+++ third_party/tcmalloc/chromium/src/heap-checker.cc (working copy)
@@ -47,9 +47,11 @@
#ifdef HAVE_PTHREAD
#include <pthread.h>
#endif
+#ifdef HAVE_POLL_H
+#include <poll.h>
+#endif
#include <sys/stat.h>
#include <sys/types.h>
-#include <time.h>
#include <assert.h>
#ifdef HAVE_LINUX_PTRACE_H
@@ -1832,9 +1834,7 @@
//
/*static*/ void HeapLeakChecker::InternalInitStart() {
{ SpinLockHolder l(&heap_checker_lock);
- RAW_CHECK(!internal_init_start_has_run,
- "Heap-check constructor called twice. Perhaps you both linked"
- " in the heap checker, and also used LD_PRELOAD to load it?");
+ RAW_CHECK(!internal_init_start_has_run, "Only one call is expected");
internal_init_start_has_run = true;
if (FLAGS_heap_check.empty()) {
@@ -2298,8 +2298,7 @@
}
if (FLAGS_heap_check_after_destructors) {
if (HeapLeakChecker::DoMainHeapCheck()) {
- const struct timespec sleep_time = { 0, 500000000 }; // 500 ms
- nanosleep(&sleep_time, NULL);
+ poll(0, 0, 500);
// Need this hack to wait for other pthreads to exit.
// Otherwise tcmalloc find errors
// on a free() call from pthreads.
« no previous file with comments | « third_party/tcmalloc/chromium/src/google/tcmalloc.h.in ('k') | third_party/tcmalloc/chromium/src/heap-profile-table.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698