Commit c19bd769 by Ian Lance Taylor

libgo: Add back tests of syscall time.

From-SVN: r182075
parent 598fd331
...@@ -18,11 +18,8 @@ var F64toint = f64toint ...@@ -18,11 +18,8 @@ var F64toint = f64toint
func entersyscall() func entersyscall()
func exitsyscall() func exitsyscall()
func LockedOSThread() bool func golockedOSThread() bool
/* Useless for gccgo.
var Entersyscall = entersyscall var Entersyscall = entersyscall
var Exitsyscall = exitsyscall var Exitsyscall = exitsyscall
var LockedOSThread = golockedOSThread
*/
...@@ -74,8 +74,6 @@ func BenchmarkStackGrowth(b *testing.B) { ...@@ -74,8 +74,6 @@ func BenchmarkStackGrowth(b *testing.B) {
} }
} }
/* These benchmarks are meaningless for gccgo.
func BenchmarkSyscall(b *testing.B) { func BenchmarkSyscall(b *testing.B) {
const CallsPerSched = 1000 const CallsPerSched = 1000
procs := runtime.GOMAXPROCS(-1) procs := runtime.GOMAXPROCS(-1)
...@@ -125,5 +123,3 @@ func BenchmarkSyscallWork(b *testing.B) { ...@@ -125,5 +123,3 @@ func BenchmarkSyscallWork(b *testing.B) {
<-c <-c
} }
} }
*/
...@@ -1156,6 +1156,26 @@ runtime_malg(int32 stacksize, byte** ret_stack, size_t* ret_stacksize) ...@@ -1156,6 +1156,26 @@ runtime_malg(int32 stacksize, byte** ret_stack, size_t* ret_stacksize)
return newg; return newg;
} }
/* For runtime package testing. */
void runtime_testing_entersyscall(void)
__asm__("libgo_runtime.runtime.entersyscall");
void
runtime_testing_entersyscall()
{
runtime_entersyscall();
}
void runtime_testing_exitsyscall(void)
__asm__("libgo_runtime.runtime.exitsyscall");
void
runtime_testing_exitsyscall()
{
runtime_exitsyscall();
}
G* G*
__go_go(void (*fn)(void*), void* arg) __go_go(void (*fn)(void*), void* arg)
{ {
...@@ -1330,6 +1350,17 @@ runtime_lockedOSThread(void) ...@@ -1330,6 +1350,17 @@ runtime_lockedOSThread(void)
return g->lockedm != nil && m->lockedg != nil; return g->lockedm != nil && m->lockedg != nil;
} }
// for testing of callbacks
_Bool runtime_golockedOSThread(void)
asm("libgo_runtime.runtime.golockedOSThread");
_Bool
runtime_golockedOSThread(void)
{
return runtime_lockedOSThread();
}
// for testing of wire, unwire // for testing of wire, unwire
uint32 uint32
runtime_mid() runtime_mid()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment