lkml.org 
[lkml]   [2010]   [Mar]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: [RFC] Unify KVM kernel-space and user-space code into a single project
    Em Wed, Mar 24, 2010 at 06:09:30PM +0200, Avi Kivity escreveu:
    > Doesn't perf already has a dependency on naming conventions for finding
    > debug information?

    It looks at several places, from most symbol rich (/usr/lib/debug/, aka
    -debuginfo packages, where we have full symtabs) to poorest (the
    packaged binary, where we may just have a .dynsym).

    In an ideal world, it would just get the build-id (a SHA1 cookie that is
    in an ELF session inserted in every binary (aka DSOs), kernel module,
    kallsyms or vmlinux file) and use that to look first in a local cache
    (implemented in perf for a long time already) or in some symbol server.

    For instance, for a random perf.data file I collected here in my machine
    I have:

    [acme@doppio linux-2.6-tip]$ perf buildid-list | grep libpthread
    5c68f7afeb33309c78037e374b0deee84dd441f6 /lib64/libpthread-2.10.2.so
    [acme@doppio linux-2.6-tip]$

    So I don't have to access /lib64/libpthread-2.10.2.so directly, nor some
    convention to get a debuginfo in a local file like:

    /usr/lib/debug/lib64/libpthread-2.10.2.so.debug

    Instead the tools look at:

    [acme@doppio linux-2.6-tip]$ l ~/.debug/.build-id/5c/68f7afeb33309c78037e374b0deee84dd441f6
    lrwxrwxrwx 1 acme acme 73 2010-01-06 18:53 /home/acme/.debug/.build-id/5c/68f7afeb33309c78037e374b0deee84dd441f6 -> ../../lib64/libpthread-2.10.2.so/5c68f7afeb33309c78037e374b0deee84dd441f6*

    To find the file for that specific build-id, not the one installed in my
    machine (or on the different machine, of a different architecture) that
    may be completely unrelated, a new one, or one for a different arch.

    - Arnaldo


    \
     
     \ /
      Last update: 2010-03-24 18:49    [W:4.166 / U:0.312 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site