summaryrefslogtreecommitdiff
path: root/src/pkg/runtime/mprof.cgo
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/runtime/mprof.cgo')
-rw-r--r--src/pkg/runtime/mprof.cgo10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/pkg/runtime/mprof.cgo b/src/pkg/runtime/mprof.cgo
index 0cddb243d..61a5132b7 100644
--- a/src/pkg/runtime/mprof.cgo
+++ b/src/pkg/runtime/mprof.cgo
@@ -65,7 +65,7 @@ stkbucket(uintptr *stk, int32 nstk)
mcmp((byte*)b->stk, (byte*)stk, nstk*sizeof stk[0]) == 0)
return b;
- b = mallocgc(sizeof *b + nstk*sizeof stk[0], RefNoProfiling, 0, 1, 0);
+ b = mallocgc(sizeof *b + nstk*sizeof stk[0], RefNoProfiling, 0, 1);
bucketmem += sizeof *b + nstk*sizeof stk[0];
memmove(b->stk, stk, nstk*sizeof stk[0]);
b->hash = h;
@@ -132,7 +132,7 @@ setaddrbucket(uintptr addr, Bucket *b)
if(ah->addr == (addr>>20))
goto found;
- ah = mallocgc(sizeof *ah, RefNoProfiling, 0, 1, 0);
+ ah = mallocgc(sizeof *ah, RefNoProfiling, 0, 1);
addrmem += sizeof *ah;
ah->next = addrhash[h];
ah->addr = addr>>20;
@@ -140,7 +140,7 @@ setaddrbucket(uintptr addr, Bucket *b)
found:
if((e = addrfree) == nil) {
- e = mallocgc(64*sizeof *e, RefNoProfiling, 0, 0, 0);
+ e = mallocgc(64*sizeof *e, RefNoProfiling, 0, 0);
addrmem += 64*sizeof *e;
for(i=0; i+1<64; i++)
e[i].next = &e[i+1];
@@ -185,7 +185,7 @@ found:
// Called by malloc to record a profiled block.
void
-MProf_Malloc(int32 skip, void *p, uintptr size)
+MProf_Malloc(void *p, uintptr size)
{
int32 nstk;
uintptr stk[32];
@@ -195,7 +195,7 @@ MProf_Malloc(int32 skip, void *p, uintptr size)
return;
m->nomemprof++;
- nstk = callers(1+skip, stk, 32);
+ nstk = callers(1, stk, 32);
lock(&proflock);
b = stkbucket(stk, nstk);
b->allocs++;