From fa4628346b78f8847f11166d52d250abb6cb50df Mon Sep 17 00:00:00 2001 From: Dmitriy Vyukov Date: Mon, 12 Aug 2013 21:48:19 +0400 Subject: runtime: remove unused m->racepc The original plan was to collect allocation stacks for all memory blocks. But it was never implemented and it's not in near plans and it's unclear how to do it at all. R=golang-dev, dave, bradfitz CC=golang-dev https://golang.org/cl/12724044 --- src/pkg/runtime/malloc.goc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'src/pkg/runtime/malloc.goc') diff --git a/src/pkg/runtime/malloc.goc b/src/pkg/runtime/malloc.goc index 9ab8e0756d..b146ae2540 100644 --- a/src/pkg/runtime/malloc.goc +++ b/src/pkg/runtime/malloc.goc @@ -141,10 +141,8 @@ runtime·mallocgc(uintptr size, uintptr typ, uint32 flag) if(!(flag & FlagNoInvokeGC) && mstats.heap_alloc >= mstats.next_gc) runtime·gc(0); - if(raceenabled) { - runtime·racemalloc(v, size, m->racepc); - m->racepc = nil; - } + if(raceenabled) + runtime·racemalloc(v, size); return v; } @@ -702,8 +700,6 @@ runtime·mal(uintptr n) void runtime·new(Type *typ, uint8 *ret) { - if(raceenabled) - m->racepc = runtime·getcallerpc(&typ); ret = runtime·mallocgc(typ->size, (uintptr)typ | TypeInfo_SingleObject, typ->kind&KindNoPointers ? FlagNoPointers : 0); FLUSH(&ret); } -- cgit v1.3-5-g9baa