Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(983)

Unified Diff: src/pkg/runtime/mprof.cgo

Issue 855046: code review 855046: runtime: delete malx, skip_depth argument to malloc (Closed)
Patch Set: code review 855046: runtime: delete malx, skip_depth argument to malloc Created 14 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/pkg/runtime/mfinal.c ('k') | src/pkg/runtime/runtime.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pkg/runtime/mprof.cgo
===================================================================
--- a/src/pkg/runtime/mprof.cgo
+++ b/src/pkg/runtime/mprof.cgo
@@ -65,7 +65,7 @@
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 @@
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 @@
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 @@
// 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 @@
return;
m->nomemprof++;
- nstk = callers(1+skip, stk, 32);
+ nstk = callers(1, stk, 32);
lock(&proflock);
b = stkbucket(stk, nstk);
b->allocs++;
« no previous file with comments | « src/pkg/runtime/mfinal.c ('k') | src/pkg/runtime/runtime.h » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b