aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/testdata/testprogcgo/threadpprof.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/testdata/testprogcgo/threadpprof.go')
-rw-r--r--src/runtime/testdata/testprogcgo/threadpprof.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/runtime/testdata/testprogcgo/threadpprof.go b/src/runtime/testdata/testprogcgo/threadpprof.go
index 3da82961b9..37a2a1ab65 100644
--- a/src/runtime/testdata/testprogcgo/threadpprof.go
+++ b/src/runtime/testdata/testprogcgo/threadpprof.go
@@ -30,6 +30,9 @@ void cpuHogThread() {
threadSalt2 = foo;
}
+void cpuHogThread2() {
+}
+
static int cpuHogThreadCount;
struct cgoTracebackArg {
@@ -44,7 +47,8 @@ struct cgoTracebackArg {
void pprofCgoThreadTraceback(void* parg) {
struct cgoTracebackArg* arg = (struct cgoTracebackArg*)(parg);
arg->buf[0] = (uintptr_t)(cpuHogThread) + 0x10;
- arg->buf[1] = 0;
+ arg->buf[1] = (uintptr_t)(cpuHogThread2) + 0x4;
+ arg->buf[2] = 0;
__sync_add_and_fetch(&cpuHogThreadCount, 1);
}