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]

[Bug translator/15781] New: improve pass-2 function suggestions


http://sourceware.org/bugzilla/show_bug.cgi?id=15781

            Bug ID: 15781
           Summary: improve pass-2 function suggestions
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
          Assignee: systemtap at sourceware dot org
          Reporter: jlebon at redhat dot com

In bug 15375, function suggestions were added when DWARF function probes could
not be resolved. There are two things that could be improved:

1. Also suggest things for optional probes

This is also mentioned in the code in tapsets.cxx:7189. In a nutshell, if a
probe contains optional probe points, then suggestions should also be offered
for the optional ones if none of the probe points could be resolved. A few
ideas on how we could go about this:
 - Always calculate suggestions, regardless of optionality, except for
process(glob) and library(glob) recursive calls to build()
 - To distinguish between truly script optional probe points (appended with ?)
and optional probes that were synthesized from process(glob) and library(glob)
components, instead of overriding the optional parameter, create another field
in the probe_point struct (or change optional member to an enum?)
 - Buffer the suggestions in the original derive_probes() call and print them
out at the end only, if all probe points failed.

2. Improve levenshtein() algorithm

- Since we're only going to be printing MAXFUNCS functions, we can abort the
calculations in levenshtein() at any point we know that the final score will be
higher than the top MAXFUNCS functions already calculated. This is also
mentioned in the code in util.cxx:1087.
- An easy way to quickly improve performance is to compare the length of the
strings right from the start. If their diff is larger than the max, then abort.
- Other possible tips available in these pages:

http://en.wikipedia.org/wiki/Levenshtein_distance
http://stackoverflow.com/questions/3183149/
http://markos.gaivo.net/blog/?p=211

-- 
You are receiving this mail because:
You are the assignee for the bug.


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