24 Dec, 2011

1 commit

  • I get such truncated annotation results in 'perf top':

    : Disassembly of section .text: ▒
    : ▒
    : ffffffff810966a8 : ▒
    4.94 : ffffffff810966a8: movslq %edi,%rdi ▒
    3.70 : ffffffff810966ab: mov $0x13700,%rax ▒
    0.00 : ffffffff810966b2: add -0x7e32cb00(,%rdi,8),%rax ▒
    8.64 : ffffffff810966ba: mov 0x7e0(%rax),%eax ▒
    82.72 : ffffffff810966c0: cltq ▒

    Note the missing 'retq' which is there in the original function:

    ffffffff810966a8 :
    ffffffff810966a8: 48 63 ff movslq %edi,%rdi
    ffffffff810966ab: 48 c7 c0 00 37 01 00 mov $0x13700,%rax
    ffffffff810966b2: 48 03 04 fd 00 35 cd add -0x7e32cb00(,%rdi,8),%rax
    ffffffff810966b9: 81
    ffffffff810966ba: 8b 80 e0 07 00 00 mov 0x7e0(%rax),%eax
    ffffffff810966c0: 48 98 cltq
    ffffffff810966c2: c3 retq

    ffffffff810966c3 :

    I'm using a fairly recent binutils:

    GNU objdump version 2.21.51.0.6-2.fc16 20110118

    AFAICS the bug is simply that sym->end points to the last byte
    of the symbol in question - while objdump's --stop-address
    expects the last byte plus 1 to disassemble the full range.

    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20111223130804.GA24305@elte.hu
    Signed-off-by: Ingo Molnar
    Signed-off-by: Arnaldo Carvalho de Melo

    Ingo Molnar
     

28 Nov, 2011

1 commit

  • Since symbol__alloc_hists need it, to avoid passing it around in many
    functions have it in the symbol_conf struct.

    Cc: David Ahern
    Cc: Frederic Weisbecker
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Link: http://lkml.kernel.org/n/tip-cwv8ysvpywzjq4v3xtbd4zwv@git.kernel.org
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

26 Oct, 2011

1 commit


30 Sep, 2011

1 commit

  • Add -M option to report/annotate to pass directly to objdump. This
    allows to use -M intel for intel style disassembler syntax, which is
    useful for people who are very used to the Intel syntax.

    Link: http://lkml.kernel.org/r/1316122302-24306-2-git-send-email-andi@firstfloor.org
    [committer note: Add missing Documentation bits, fixup conflicts with 3e6a2a7]
    Cc: Frederic Weisbecker
    Cc: Stephane Eranian
    Signed-off-by: Andi Kleen
    Signed-off-by: Arnaldo Carvalho de Melo

    Andi Kleen
     

18 Aug, 2011

1 commit

  • This patch adds two new options to perf annotate:
    - --no-asm-raw : Do not display raw instruction encodings
    - --no-source : Do not interleave source code with assembly code

    We believe those options make the output of annotate more readable.

    Systematically displaying source can make it hard to follow code and
    especially optimized code.

    Raw encodings are not useful in most cases.

    Cc: Ingo Molnar
    Cc: Peter Zijlstra
    Link: http://lkml.kernel.org/r/20110517153207.GA9834@quad
    Signed-off-by: Stephane Eranian
    [committer note: Use the 'no-' option inverting logic]
    Signed-off-by: Arnaldo Carvalho de Melo

    Stephane Eranian
     

12 Mar, 2011

1 commit


23 Feb, 2011

1 commit

  • In both --tui and --stdio, in 'annotate', 'top', 'report' when trying to
    annotate a kernel symbol having just access to a kallsyms file, that
    doesn't have the DWARF info needed for annotation.

    Suggested-by: Ingo Molnar
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Tom Zanussi
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

17 Feb, 2011

1 commit


09 Feb, 2011

3 commits

  • The live annotation done in 'perf top' needs to limit the context before
    lines that aren't filtered out by the min percent filter, if we don't do
    that, the screen in a tty often is not enough for showing what is
    interesting: lines with hits and a few source code lines before it.

    Reported-by: Mike Galbraith
    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Tom Zanussi
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • Since we'll need it when implementing the live annotate TUI browser.

    This also simplifies things a bit by having the list head for the source
    code to be in the dynamicly allocated part of struct annotation, that
    way we don't have to pass it around, it can be found from the struct
    symbol that is passed everywhere.

    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Tom Zanussi
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • The checks for not using a max_lines parameter were b0rked, problem
    introduced in 3653246.

    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Tom Zanussi
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

07 Feb, 2011

2 commits

  • GCC 4.6.0 in Fedora rawhide turned up some compile errors in tools/perf
    due to the -Werror=unused-but-set-variable flag.

    I've gone through and annotated some of the assignments that had side
    effects (ie: return value from a function) with the __used annotation,
    and in some cases, just removed unused code.

    In a few cases, we were assigning something useful, but not using it in
    later parts of the function.

    kyle@dreadnought:~/src% gcc --version
    gcc (GCC) 4.6.0 20110122 (Red Hat 4.6.0-0.3)

    Cc: Ingo Molnar
    LKML-Reference:
    Signed-off-by: Kyle McMartin
    [ committer note: Fixed up the annotation fixes, as that code moved recently ]
    Signed-off-by: Arnaldo Carvalho de Melo

    Kyle McMartin
     
  • Next step: Live TUI annotation in perf top, just press enter on a symbol
    line.

    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Tom Zanussi
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     

06 Feb, 2011

2 commits


05 Feb, 2011

2 commits

  • The perf annotate tool continues aggregating everything on just one
    histograms, but to support the top model add support for one histogram
    perf evsel in the evlist.

    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Tom Zanussi
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo
     
  • They will be used by perf top, so that we have just one set of routines
    to do annotation.

    Rename "struct sym_priv" to "struct annotation", etc, to clarify this
    code a bit.

    Rename "struct sym_ext" to "struct source_line", to give it a meaningful
    name, that clarifies that it is a the result of an addr2line call, that
    is sorted by percentage one particular source code line appeared in the
    annotation.

    And since we're moving things around also rename 'sym_hist->ip' to
    'sym_hist->addr' as we want to do data structure annotation at some
    point.

    Cc: Frederic Weisbecker
    Cc: Ingo Molnar
    Cc: Mike Galbraith
    Cc: Paul Mackerras
    Cc: Peter Zijlstra
    Cc: Stephane Eranian
    Cc: Tom Zanussi
    LKML-Reference:
    Signed-off-by: Arnaldo Carvalho de Melo

    Arnaldo Carvalho de Melo