From d3066e47b13f3a46ae76a0612abbe25d4d80ddbf Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 5 Aug 2013 19:49:02 -0400 Subject: runtime/pprof: test multithreaded profile, remove OS X workarounds This means that pprof will no longer report profiles on OS X. That's unfortunate, but the profiles were often wrong and, worse, it was difficult to tell whether the profile was wrong or not. The workarounds were making the scheduler more complex, possibly caused a deadlock (see issue 5519), and did not actually deliver reliable results. It may be possible for adventurous users to apply a patch to their kernels to get working results, or perhaps having no results will encourage someone to do the work of creating a profiling thread like on Windows. Issue 6047 has details. Fixes #5519. Fixes #6047. R=golang-dev, bradfitz, r CC=golang-dev https://golang.org/cl/12429045 --- src/pkg/runtime/proc.c | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'src/pkg/runtime/proc.c') diff --git a/src/pkg/runtime/proc.c b/src/pkg/runtime/proc.c index b0aa428e99..a8b98b73db 100644 --- a/src/pkg/runtime/proc.c +++ b/src/pkg/runtime/proc.c @@ -1384,9 +1384,6 @@ void // but can have inconsistent g->sched, do not let GC observe it. m->locks++; - if(m->profilehz > 0) - runtime·setprof(false); - // Leave SP around for gc and traceback. save(runtime·getcallerpc(&dummy), runtime·getcallersp(&dummy)); @@ -1439,9 +1436,6 @@ void m->locks++; // see comment in entersyscall - if(m->profilehz > 0) - runtime·setprof(false); - // Leave SP around for gc and traceback. save(runtime·getcallerpc(&dummy), runtime·getcallersp(&dummy)); g->gcsp = g->sched.sp; @@ -1477,10 +1471,6 @@ runtime·exitsyscall(void) { m->locks++; // see comment in entersyscall - // Check whether the profiler needs to be turned on. - if(m->profilehz > 0) - runtime·setprof(true); - if(g->isbackground) // do not consider blocked scavenger for deadlock detection inclocked(-1); -- cgit v1.3-5-g9baa