aboutsummaryrefslogtreecommitdiff
path: root/src/pkg/runtime/malloc.goc
diff options
context:
space:
mode:
authorDmitriy Vyukov <dvyukov@google.com>2013-08-12 21:48:19 +0400
committerDmitriy Vyukov <dvyukov@google.com>2013-08-12 21:48:19 +0400
commitfa4628346b78f8847f11166d52d250abb6cb50df (patch)
tree41a598c6c6236e853dfff0882a11f2551e7409e1 /src/pkg/runtime/malloc.goc
parentf3c1070fa4cb02c55b47b874076fe74879288a4c (diff)
downloadgo-fa4628346b78f8847f11166d52d250abb6cb50df.tar.xz
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
Diffstat (limited to 'src/pkg/runtime/malloc.goc')
-rw-r--r--src/pkg/runtime/malloc.goc8
1 files changed, 2 insertions, 6 deletions
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);
}