• Andi Kleen's avatar
    perf stat: Fix --no-scale · 75998bb2
    Andi Kleen authored
    The -c option to enable multiplex scaling has been useless for quite
    some time because scaling is default.
    
    It's only useful as --no-scale to disable scaling. But the non scaling
    code path has bitrotted and doesn't print anything because perf output
    code relies on value run/ena information.
    
    Also even when we don't want to scale a value it's still useful to show
    its multiplex percentage.
    
    This patch:
      - Fixes help and documentation to show --no-scale instead of -c
      - Removes -c, only keeps the long option because -c doesn't support negatives.
      - Enables running/enabled even with --no-scale
      - And fixes some other problems in the no-scale output.
    
    Before:
    
      $ perf stat --no-scale -e cycles true
    
       Performance counter stats for 'true':
    
           <not counted>      cycles
    
             0.000984154 seconds time elapsed
    
    After:
    
      $ ./perf stat --no-scale -e cycles true
    
       Performance counter stats for 'true':
    
                 706,070      cycles
    
             0.001219821 seconds time elapsed
    Signed-off-by: default avatarAndi Kleen <ak@linux.intel.com>
    Acked-by: default avatarJiri Olsa <jolsa@kernel.org>
    Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    LPU-Reference: 20190314225002.30108-9-andi@firstfloor.org
    Link: https://lkml.kernel.org/n/tip-xggjvwcdaj2aqy8ib3i4b1g6@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    75998bb2
builtin-stat.c 49.5 KB