• Arnaldo Carvalho de Melo's avatar
    perf ui stdio: No need to use 'spaces' to left align · b598c34f
    Arnaldo Carvalho de Melo authored
    We can just use the 'field width' for the %s used to print the
    alignment, this way we'll get the same result without requiring having a
    variable with just lots of space chars.
    
    No way to do that for the dots tho, we still need that variable filled
    with dot chars.
    
      # perf report --stdio --hierarchy > before
      # perf report --stdio --hierarchy > after
      # diff before after
      #
    
    I.e. it continues as:
    
      # perf report --stdio --hierarchy | head -15
      # To display the perf.data header info, please use --header/--header-only options.
      #
      #
      # Total Lost Samples: 0
      #
      # Samples: 107  of event 'cycles'
      # Event count (approx.): 31378313
      #
      #       Overhead  Command / Shared Object / Symbol
      # ..............  ............................................
      #
          80.13%        swapper
             72.29%        [kernel.vmlinux]
                49.85%        [k] intel_idle
                 9.05%        [k] tick_nohz_next_event
      #
    
    Cc: Adrian Hunter <adrian.hunter@intel.com>
    Cc: Jiri Olsa <jolsa@kernel.org>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Link: https://lkml.kernel.org/n/tip-9s1dxik37waveor7c84hqti2@git.kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    b598c34f
hist.c 20.1 KB