This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: static user probes


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]