This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: static user probes
- From: Maneesh Soni <maneesh at in dot ibm dot com>
- To: Stan Cox <scox at redhat dot com>
- Cc: systemtap at sources dot redhat dot com
- Date: Mon, 13 Oct 2008 11:20:05 +0530
- Subject: Re: static user probes
- References: <48E53DE7.4060103@redhat.com>
- Reply-to: maneesh at in dot ibm dot com
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.