Skip to content

Instantly share code, notes, and snippets.

@larytet
Created June 16, 2017 20:03
Show Gist options
  • Save larytet/9dd379de2dbfd09d218d9123d70af33b to your computer and use it in GitHub Desktop.
Save larytet/9dd379de2dbfd09d218d9123d70af33b to your computer and use it in GitHub Desktop.
Define symbol in STAP
@define cc1 %( "/usr/libexec/gcc/x86_64-redhat-linux/6.3.1/cc1" %)
global insns
probe perf.hw.instructions.process(@cc1).counter("foo") {}
probe process(@cc1).function("*").return {
insns[execname(),tid()] = @perf("foo") // implicit max()
}
@larytet
Copy link
Author

larytet commented Jun 16, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment