Skip to content

Instantly share code, notes, and snippets.

@tjfontaine
Created April 8, 2013 22:30
Show Gist options
  • Save tjfontaine/5341123 to your computer and use it in GitHub Desktop.
Save tjfontaine/5341123 to your computer and use it in GitHub Desktop.
#include "a.h"
void afoo() {
A_APROBE(1);
}
provider a {
probe aprobe(int i);
};
#include "b.h"
void bfoo() {
B_BPROBE(1);
}
provider b {
probe bprobe(int i);
};
int main()
{
afoo();
bfoo();
while(1) {}
return 0;
}
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