iovisor / iovisor/bcc

Userspace stack missing detail

Open
#2,995 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
22.7k
Forks
4.1k
Avg merge
10d 4h
Merged PRs (30d)
3

Description

here is my golang demo

```
package main

import (
"log"
"time"
)`

func main() {
for {
log.Printf("hello world")
add(1, 1)
del(1, 1)
time.Sleep(time.Millisecond * 100)
}
}

func add(x int, y int) int {
return x + y
}

func del(x int, y int) int {
return x - y
}
```
I compile it like that
`gccgo -O0 -fno-omit-frameointer -o main main.go`

I run it and use the offcputime tool to mesurement it. However, the userspace stack seems not correct
`./offcputime -U -p 3303`
And get the result is
````
write
[unknown]
- main (3372)
1915

select
- main (3371)
11303

syscall
- main (3371)
3824106

syscall
- main (3372)
3829608

syscall
- main (3373)
3836335
````
It looks like -O0 and -fno-omit-frameointer makes no sense. I just get a main stack what I expect get should contains add function and del function's stack. Is there any idea about it?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.