aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/testdata/testprogcgo/pprof.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/testdata/testprogcgo/pprof.go')
-rw-r--r--src/runtime/testdata/testprogcgo/pprof.go11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/runtime/testdata/testprogcgo/pprof.go b/src/runtime/testdata/testprogcgo/pprof.go
index 3b73fa0bdd..8870d0c415 100644
--- a/src/runtime/testdata/testprogcgo/pprof.go
+++ b/src/runtime/testdata/testprogcgo/pprof.go
@@ -29,8 +29,6 @@ void cpuHog() {
void cpuHog2() {
}
-static int cpuHogCount;
-
struct cgoTracebackArg {
uintptr_t context;
uintptr_t sigContext;
@@ -47,13 +45,6 @@ void pprofCgoTraceback(void* parg) {
arg->buf[0] = (uintptr_t)(cpuHog) + 0x10;
arg->buf[1] = (uintptr_t)(cpuHog2) + 0x4;
arg->buf[2] = 0;
- ++cpuHogCount;
-}
-
-// getCpuHogCount fetches the number of times we've seen cpuHog in the
-// traceback.
-int getCpuHogCount() {
- return cpuHogCount;
}
*/
import "C"
@@ -86,7 +77,7 @@ func CgoPprof() {
}
t0 := time.Now()
- for C.getCpuHogCount() < 2 && time.Since(t0) < time.Second {
+ for time.Since(t0) < time.Second {
C.cpuHog()
}