1
0
mirror of https://github.com/golang/go synced 2024-10-05 10:31:22 -06:00
go/src/pkg/runtime/race0.c
Rémy Oudompheng ccc61eadd5 runtime: implement range access functions in race detector.
Range access functions are already available in TSan library
but were not yet used.

Time for go test -race -short:

Before:
compress/flate 24.244s
exp/norm       >200s
go/printer     78.268s

After:
compress/flate 17.760s
exp/norm        5.537s
go/printer      5.738s

Fixes #4250.

R=dvyukov, golang-dev, fullung
CC=golang-dev
https://golang.org/cl/7229044
2013-01-30 01:55:02 +01:00

134 lines
1.6 KiB
C

// Copyright 2011 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
// Stub implementation of the race detector API.
// +build !race
#include "runtime.h"
void
runtime·raceinit(void)
{
}
void
runtime·racefini(void)
{
}
void
runtime·racemapshadow(void *addr, uintptr size)
{
USED(addr);
USED(size);
}
void
runtime·racewritepc(void *addr, void *callpc, void *pc)
{
USED(addr);
USED(callpc);
USED(pc);
}
void
runtime·racereadpc(void *addr, void *callpc, void *pc)
{
USED(addr);
USED(callpc);
USED(pc);
}
void
runtime·racewriterangepc(void *addr, uintptr sz, uintptr step, void *callpc, void *pc)
{
USED(addr);
USED(sz);
USED(step);
USED(callpc);
USED(pc);
}
void
runtime·racereadrangepc(void *addr, uintptr sz, uintptr step, void *callpc, void *pc)
{
USED(addr);
USED(sz);
USED(step);
USED(callpc);
USED(pc);
}
void
runtime·raceacquire(void *addr)
{
USED(addr);
}
void
runtime·raceacquireg(G *gp, void *addr)
{
USED(gp);
USED(addr);
}
void
runtime·racerelease(void *addr)
{
USED(addr);
}
void
runtime·racereleaseg(G *gp, void *addr)
{
USED(gp);
USED(addr);
}
void
runtime·racereleasemerge(void *addr)
{
USED(addr);
}
void
runtime·racereleasemergeg(G *gp, void *addr)
{
USED(gp);
USED(addr);
}
void
runtime·racefingo(void)
{
}
void
runtime·racemalloc(void *p, uintptr sz, void *pc)
{
USED(p);
USED(sz);
USED(pc);
}
void
runtime·racefree(void *p)
{
USED(p);
}
void
runtime·racegostart(int32 goid, void *pc)
{
USED(goid);
USED(pc);
}
void
runtime·racegoend(int32 goid)
{
USED(goid);
}