[Fwd: Re: [Bug translator/3534] New: support wildcarded linenumber probe syntax]
Vara Prasad
prasadav@us.ibm.com
Fri Nov 17 12:35:00 GMT 2006
Sorry earlier posting expanded line no's to html links, please ignore
that, here is a more readable version.
fche at redhat dot com wrote:
>Idea: probe kernel.function("function@*:*") would put a probe at
>every ~instruction (line record) boundary within the function.
>This would allow a script to collect detailed profile/coverage
>information (albeit at a considerable trapping overhead cost).
>
>
>
I am not sure i followed your idea. For example if I have the following
function If i specify probe kernel.statement("get_symbol_offset@kernel.kallsyms.c:*"), the above
feature will place probes for every instruction of an executable
statement in this case line nos 139, 145,146 and 148.
Did i get your proposal correct?
If i got your above idea correct, is this proposal is to support tracing
of a function without tracing other functions it calls. In other words
i am trying to understand what is the underlying motivation for this
proposal.
132 static unsigned int get_symbol_offset(unsigned long pos)
133 {
134 u8 *name;
135 int i;
136
137 /* use the closest marker we have. We have markers every 256 positions,
138 * so that should be close enough */
139 name = &kallsyms_names[ kallsyms_markers[pos>>8] ];
140
141 /* sequentially scan all the symbols up to the point we're searching for.
142 * Every symbol is stored in a [<len>][<len> bytes of data] format, so we
143 * just need to add the len to the current pointer for every symbol we
144 * wish to skip */
145 for(i = 0; i < (pos&0xFF); i++)
146 name = name + (*name) + 1;
147
148 return name - kallsyms_names;
149 }
bye,
Vara Prasad
More information about the Systemtap
mailing list