Created
June 16, 2017 20:03
-
-
Save larytet/9dd379de2dbfd09d218d9123d70af33b to your computer and use it in GitHub Desktop.
Define symbol in STAP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@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() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Based on https://sourceware.org/ml/systemtap/2017-q2/msg00123.html