Skip to content

Instantly share code, notes, and snippets.

@argonlaser
Last active February 6, 2018 06:03
Show Gist options
  • Save argonlaser/b241b65d2eecfe9cc31abfecbc81ec74 to your computer and use it in GitHub Desktop.
Save argonlaser/b241b65d2eecfe9cc31abfecbc81ec74 to your computer and use it in GitHub Desktop.
Syscalls for a simple C program
#include <stdio.h>
int main() {
int x = 1;
printf("value of x is %d\n", x);
return 0;
}
value of x is 1
% time seconds usecs/call calls errors syscall
------ ----------- ----------- --------- --------- ----------------
0.00 0.000000 0 1 read
0.00 0.000000 0 1 write
0.00 0.000000 0 10 8 open
0.00 0.000000 0 2 close
0.00 0.000000 0 8 7 stat
0.00 0.000000 0 3 fstat
0.00 0.000000 0 7 mmap
0.00 0.000000 0 4 mprotect
0.00 0.000000 0 1 munmap
0.00 0.000000 0 1 brk
0.00 0.000000 0 3 3 access
0.00 0.000000 0 1 execve
0.00 0.000000 0 1 arch_prctl
------ ----------- ----------- --------- --------- ----------------
100.00 0.000000 43 18 total
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment