summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-10-17 10:11:03 -0400
committerRuss Cox <rsc@golang.org>2014-10-17 10:11:03 -0400
commitc0dc4bec602ecaa539c414870c300599ed6a5ee8 (patch)
treefed14322b7b1e923544252d122106018f6625279
parent9d7074acade701c97219c5aafb68a908ae76fb47 (diff)
downloadgo-c0dc4bec602ecaa539c414870c300599ed6a5ee8.tar.gz
undo CL 159990043 / 421fadcef39a
Dmitriy believes this broke Windows. It looks like build.golang.org stopped before that, but it's worth a shot. ??? original CL description runtime: make pprof a little nicer Update issue 8942 This does not fully address issue 8942 but it does make the profiles much more useful, until that issue can be fixed completely. LGTM=dvyukov R=r, dvyukov CC=golang-codereviews https://codereview.appspot.com/159990043 ??? TBR=dvyukov CC=golang-codereviews https://codereview.appspot.com/160030043
-rw-r--r--src/runtime/proc.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/runtime/proc.c b/src/runtime/proc.c
index 332121e90..1426790f4 100644
--- a/src/runtime/proc.c
+++ b/src/runtime/proc.c
@@ -2436,7 +2436,7 @@ extern byte runtime·etext[];
void
runtime·sigprof(uint8 *pc, uint8 *sp, uint8 *lr, G *gp, M *mp)
{
- int32 n, off;
+ int32 n;
bool traceback;
// Do not use global m in this function, use mp instead.
// On windows one m is sending reports about all the g's, so m means a wrong thing.
@@ -2530,20 +2530,9 @@ runtime·sigprof(uint8 *pc, uint8 *sp, uint8 *lr, G *gp, M *mp)
((uint8*)runtime·gogo <= pc && pc < (uint8*)runtime·gogo + RuntimeGogoBytes))
traceback = false;
- off = 0;
- if(gp == mp->g0 && mp->curg != nil) {
- stk[0] = (uintptr)pc;
- off = 1;
- gp = mp->curg;
- pc = (uint8*)gp->sched.pc;
- sp = (uint8*)gp->sched.sp;
- lr = 0;
- traceback = true;
- }
-
n = 0;
if(traceback)
- n = runtime·gentraceback((uintptr)pc, (uintptr)sp, (uintptr)lr, gp, 0, stk+off, nelem(stk)-off, nil, nil, false);
+ n = runtime·gentraceback((uintptr)pc, (uintptr)sp, (uintptr)lr, gp, 0, stk, nelem(stk), nil, nil, false);
if(!traceback || n <= 0) {
// Normal traceback is impossible or has failed.
// See if it falls into several common cases.