static user probes
Maneesh Soni
maneesh@in.ibm.com
Mon Oct 13 05:50:00 GMT 2008
On Thu, Oct 02, 2008 at 05:32:23PM -0400, Stan Cox wrote:
[..]
> stap mockup:
> all: tstlabel.x
> stap-probes-tstlabel.c: tstlabel.d tstlabel.c
> python stap-probes.py $^
> stap-probes-tstlabel.o: stap-probes-tstlabel.c
> $(CC) $^ -c -g
> tstlabel.x: tstlabel.o stap-probes.o stap-probes-tstlabel.o
> $(CC) $^ -o $@
> tstlabel.o: tstlabel.c stap-probes.h
> $(CC) tstlabel.c -c
> stap-probes.o: stap-probes.c
> $(CC) $^ -c
>
Which is stap-probes.c file and why is this required?
> tstlabel.d:
> provider tstlabel {
> probe label1();
> probe label2();
> probe label3(int, char*);
> };
>
Is this .d file written by the user or generated automatically?
what is the use of it?
> tstlabel.c:
> foo ()
> {
> STAP_PROBE(tstlabel,label1);
> }
> bar ()
> {
> STAP_PROBE(tstlabel,label2);
> }
> baz ()
> {
> STAP_PROBE(tstlabel,label3);
> }
> main ()
> {
> foo();
> bar();
> baz();
>
> stap-probes.py generates tstlabel.c:
Do you mean, stap-probes-tstlable.c? Could you also share the .py?
> _stap_probe_label1 ()
> {}
> _stap_probe_label2 ()
> {}
> _stap_probe_label3 (int a, char* b)
> {}
>
Thanks
Maneesh
--
Maneesh Soni
Linux Technology Center
IBM India Systems and Technology Lab,
Bangalore, India.
More information about the Systemtap
mailing list