aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Gerrand <adg@golang.org>2013-11-01 10:51:42 +1100
committerAndrew Gerrand <adg@golang.org>2013-11-01 10:51:42 +1100
commit000c1c5127034e0d3af897c43e79f7ce952ea184 (patch)
tree918dfd8680a6b32835ef1caa019ddb6a4ddec333
parentc1792398d40979beadf97f88c0954a67b0a70b1e (diff)
downloadgo-000c1c5127034e0d3af897c43e79f7ce952ea184.tar.gz
go-000c1c5127034e0d3af897c43e79f7ce952ea184.zip
[release-branch.go1.2] runtime: remove nomemprof
««« CL 14695044 / 35d5bae6aac8 runtime: remove nomemprof Nomemprof seems to be unneeded now, there is no recursion. If the recursion will be re-introduced, it will break loudly by deadlocking. Fixes #6566. R=golang-dev, minux.ma, rsc CC=golang-dev https://golang.org/cl/14695044 »»» R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/20540043
-rw-r--r--src/pkg/runtime/mprof.goc10
-rw-r--r--src/pkg/runtime/proc.c2
-rw-r--r--src/pkg/runtime/runtime.h1
3 files changed, 0 insertions, 13 deletions
diff --git a/src/pkg/runtime/mprof.goc b/src/pkg/runtime/mprof.goc
index a8d57e7635..5b92cec95c 100644
--- a/src/pkg/runtime/mprof.goc
+++ b/src/pkg/runtime/mprof.goc
@@ -255,10 +255,6 @@ runtime·MProf_Malloc(void *p, uintptr size)
uintptr stk[32];
Bucket *b;
- if(m->nomemprof > 0)
- return;
-
- m->nomemprof++;
nstk = runtime·callers(1, stk, 32);
runtime·lock(&proflock);
b = stkbucket(MProf, stk, nstk, true);
@@ -266,7 +262,6 @@ runtime·MProf_Malloc(void *p, uintptr size)
b->recent_alloc_bytes += size;
setaddrbucket((uintptr)p, b);
runtime·unlock(&proflock);
- m->nomemprof--;
}
// Called when freeing a profiled block.
@@ -275,10 +270,6 @@ runtime·MProf_Free(void *p, uintptr size)
{
Bucket *b;
- if(m->nomemprof > 0)
- return;
-
- m->nomemprof++;
runtime·lock(&proflock);
b = getaddrbucket((uintptr)p);
if(b != nil) {
@@ -286,7 +277,6 @@ runtime·MProf_Free(void *p, uintptr size)
b->recent_free_bytes += size;
}
runtime·unlock(&proflock);
- m->nomemprof--;
}
int64 runtime·blockprofilerate; // in CPU ticks
diff --git a/src/pkg/runtime/proc.c b/src/pkg/runtime/proc.c
index eb3263fc91..de26c72d3d 100644
--- a/src/pkg/runtime/proc.c
+++ b/src/pkg/runtime/proc.c
@@ -133,7 +133,6 @@ runtime·schedinit(void)
runtime·sched.maxmcount = 10000;
runtime·precisestack = haveexperiment("precisestack");
- m->nomemprof++;
runtime·mprofinit();
runtime·mallocinit();
mcommoninit(m);
@@ -163,7 +162,6 @@ runtime·schedinit(void)
procresize(procs);
mstats.enablegc = 1;
- m->nomemprof--;
if(raceenabled)
g->racectx = runtime·raceinit();
diff --git a/src/pkg/runtime/runtime.h b/src/pkg/runtime/runtime.h
index c989edcf8d..f7c2adb121 100644
--- a/src/pkg/runtime/runtime.h
+++ b/src/pkg/runtime/runtime.h
@@ -310,7 +310,6 @@ struct M
int32 throwing;
int32 gcing;
int32 locks;
- int32 nomemprof;
int32 dying;
int32 profilehz;
int32 helpgc;