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]

[Fwd: Re: [Bug translator/3534] New: support wildcarded linenumber probe syntax]


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




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