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: Forw: function and source matching


> No.  I mean a natural source-centric search predicate, operating upon
> all functions defined within (CUs of) the kernel or a module.  

Does "all functions" mean all functions at CU scope (in C, file-scope
static, or extern), or all functions at any scope?  (The former is what we
currently have implemented, I believe.)

> The predicate would select those functions that match the given name
> pattern, were defined in a file that matches the given pattern, 

Does "defined in" mean the defining declaration (prototype) is in that
file, or something not precisely that?  Please do not avoid answering by
saying, "Do what I mean."  To ask for "natural source-centric", you have to
specify what the "natural" way to think about the source is to you.  I
can't read your mind.  If you think it's some fuzzy heuristic and you
haven't decided what the heuristic is, then say that.  If you think that
Graydon should decide what it means while he implements it, then say that.

> and that definition spanned the given line number (if given).

Does "definition spanned" mean that either the declaration or any source
lines associated with PCs in the body of the function appear at that line?

> It is OK if for convoluted cases (e.g. function bodies partially
> coming from headers), heuristics are applied to approach that idea.
> It is OK if dwarf data limitations force heuristics or approximations.
> It is OK if libelf does not provide an all-inclusive search
> megafunction, as long as systemtap can perform iteration and predicate
> evaluation on its own.

So far I am only trying to get information on what your syntax means that's
adequate to answer Graydon's questions about how to search the DWARF data
to implement it.  With the simple clarifications I've asked above, I think
we will know enough to implement something we think does what you want in
all the cases, and thus figure out what heuristics and approximations are
required.  After that all works well enough, I will look at how parts of
the work can be factored out into library code that is useful for other
applications too.


Thanks,
Roland


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