• Namhyung Kim's avatar
    perf annotate: Add --insn-stat option for debugging · 58824fa0
    Namhyung Kim authored
    This is for a debugging purpose.  It'd be useful to see per-instrucion
    level success/failure stats.
    
      $ perf annotate --data-type --insn-stat
      Annotate Instruction stats
      total 264, ok 143 (54.2%), bad 121 (45.8%)
    
        Name      :  Good   Bad
      -----------------------------------------------------------
        movq      :    45    31
        movl      :    22    11
        popq      :     0    19
        cmpl      :    16     3
        addq      :     8     7
        cmpq      :    11     3
        cmpxchgl  :     3     7
        cmpxchgq  :     8     0
        incl      :     3     3
        movzbl    :     4     2
        incq      :     4     2
        decl      :     6     0
        ...
    
    Committer notes:
    
    So these are about being able to find the type for accesses from these
    instructions, we should improve the naming, but it is for debugging, we
    can improve this later:
    
      @@ -3726,6 +3759,10 @@ struct annotated_data_type *hist_entry__get_data_type(struct hist_entry *he)
                              c...
    58824fa0
builtin-annotate.c 25.6 KB