lkml.org 
[lkml]   [2011]   [Jan]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    From
    SubjectRe: [PATCH] perf-probe: make "perf-probe -L <function>" display the absolute path and absolute line number
    Date
    Masami Hiramatsu <masami.hiramatsu.pt@hitachi.com> writes:

    > (2011/01/13 19:20), Franck Bui-Huu wrote:
    >> From: Franck Bui-Huu <fbuihuu@gmail.com>
    >>
    >> It should be more usefull to get the full location of the function
    >
    >> (absolute line number + full path) instead of repeating the name of
    >> the function and the start line number given by the command line.
    >>
    >> So we had before:
    >>
    >> $ perf probe -L schedule | head -n3
    >> <schedule:0>
    >> 0 asmlinkage void __sched schedule(void)
    >> 1 {
    >>
    >> and now we get:
    >>
    >> $ perf probe -L schedule | head -n3
    >> </usr/src/debug/kernel-2.6.35.fc14/linux-2.6.35.x86_64/kernel/sched.c:3813>
    >> 0 asmlinkage void __sched schedule(void)
    >> 1 {
    >
    > Indeed, it could be useful for users to see where the function is...
    >
    > However, I think that should be optional, because the output lines
    > have the relative line numbers from the function, and those numbers
    > are important for users who want to probe a specific line by using
    > function relative line numbers. e.g. "schedule:10"
    >
    > And with that option, I'd suggest to show absolute line numbers on each line.
    >
    > $ perf probe -L schedule:0-1 --by-source
    > </usr/src/debug/kernel-2.6.35.fc14/linux-2.6.35.x86_64/kernel/sched.c:3813>
    > 3813 asmlinkage void __sched schedule(void)
    > 3814 {
    >
    > Or, just show source file as an additional information.
    >
    > $ perf probe -L schedule:0-1
    > <schedule@/usr/src/debug/kernel-2.6.35.fc14/linux-2.6.35.x86_64/kernel/sched.c:0>
    > 0 asmlinkage void __sched schedule(void)
    > 1 {
    >
    > I just would like to keep the consistency of the output/input format.

    Well, for consistency, I thought that the additional information (given
    inside angle brackets) should always be the same: a full path and an
    absolute line number which clearly identify which source file perf-probe
    is listing.

    --
    Franck


    \
     
     \ /
      Last update: 2011-01-13 23:37    [W:0.039 / U:89.932 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site