Skip to content

Instantly share code, notes, and snippets.

@scriptnull
Created February 6, 2018 01:10
Show Gist options
  • Select an option

  • Save scriptnull/7da2694101b80bbc23965065f0b33d31 to your computer and use it in GitHub Desktop.

Select an option

Save scriptnull/7da2694101b80bbc23965065f0b33d31 to your computer and use it in GitHub Desktop.
experimenting strace on go
package main
import "fmt"
func main() {
x := 1
fmt.Println("value of x is ", x)
}
value of x is 1
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
0.00 0.000000 0 1 write
0.00 0.000000 0 8 mmap
0.00 0.000000 0 1 munmap
0.00 0.000000 0 114 rt_sigaction
0.00 0.000000 0 6 rt_sigprocmask
0.00 0.000000 0 2 clone
0.00 0.000000 0 1 execve
0.00 0.000000 0 2 sigaltstack
0.00 0.000000 0 1 arch_prctl
0.00 0.000000 0 1 gettid
0.00 0.000000 0 1 futex
0.00 0.000000 0 1 sched_getaffinity
0.00 0.000000 0 1 readlinkat
------ ----------- ----------- --------- --------- ----------------
100.00 0.000000 140 total
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment