Created
April 8, 2013 22:30
-
-
Save tjfontaine/5341123 to your computer and use it in GitHub Desktop.
This file contains 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
#include "a.h" | |
void afoo() { | |
A_APROBE(1); | |
} |
This file contains 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
provider a { | |
probe aprobe(int i); | |
}; |
This file contains 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
#include "b.h" | |
void bfoo() { | |
B_BPROBE(1); | |
} |
This file contains 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
provider b { | |
probe bprobe(int i); | |
}; |
This file contains 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
int main() | |
{ | |
afoo(); | |
bfoo(); | |
while(1) {} | |
return 0; | |
} |
This file contains 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
all: a b | |
gcc -c main.c | |
gcc -o testit \ | |
main.o \ | |
a.o \ | |
b.o \ | |
b.dtrace.o \ | |
a.dtrace.o | |
a: | |
dtrace -h -xnolibs -s a.d -o a.h | |
gcc -c a.c | |
dtrace -G -s a.d a.o -o a.dtrace.o | |
b: | |
dtrace -h -xnolibs -s b.d -o b.h | |
gcc -c b.c | |
dtrace -G -s b.d b.o -o b.dtrace.o | |
clean: | |
rm -rf *.o *.h testit |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment