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/12276] New: lookup functions & uploaded-data for address->file:line mappings


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

           Summary: lookup functions & uploaded-data for
                    address->file:line mappings
           Product: systemtap
           Version: unspecified
            Status: NEW
          Severity: normal
          Priority: P2
         Component: translator
        AssignedTo: systemtap@sources.redhat.com
        ReportedBy: fche@redhat.com


In order to do finer-grain-than-function profiling, it's desirable
to map a random PC to something more precise than [u]symdata() gives.

It may be practical to upload subsets/variants of the .debug_line data,
in order to enable a [u]symfileline() function that would produce a
file:line# string.  With that, this ditty should give a nice
line-by-line profile, as in opannotate --assembly.

global prof
probe timer.profile {
  prof [(user_mode() ? usymfileline(uaddr()) : symfileline(addr() /*?*/)] <<< 1
}

probe end {
  foreach (fileline+ in prof) {
     printf("%20s %6d\n", fileline, @count(prof[fileline]))
  }
}

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- 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]