• Namhyung Kim's avatar
    perf stat: Do not align time prefix in CSV output · 8e55ae24
    Namhyung Kim authored
    We don't care about the alignment in the CSV output as it's intended for machine
    processing.  Let's get rid of it to make the output more compact.
    
    Before:
    
      # perf stat -a --summary -I 1 -x, true
           0.001149309,219.20,msec,cpu-clock,219322251,100.00,219.200,CPUs utilized
           0.001149309,144,,context-switches,219241902,100.00,656.935,/sec
           0.001149309,38,,cpu-migrations,219173705,100.00,173.358,/sec
           0.001149309,61,,page-faults,219093635,100.00,278.285,/sec
           0.001149309,10679310,,cycles,218746228,100.00,0.049,GHz
           0.001149309,6288296,,instructions,218589869,100.00,0.59,insn per cycle
           0.001149309,1386904,,branches,218428851,100.00,6.327,M/sec
           0.001149309,56863,,branch-misses,218219951,100.00,4.10,of all branches
               summary,219.20,msec,cpu-clock,219322251,100.00,20.025,CPUs utilized
               summary,144,,context-switches,219241902,100.00,656.935,/sec
               summary,38,,cpu-migrations,219173705,100.00,173.358,/sec
               summary,61,,page-faults,219093635,100.00,278.285,/sec
               summary,10679310,,cycles,218746228,100.00,0.049,GHz
               summary,6288296,,instructions,218589869,100.00,0.59,insn per cycle
               summary,1386904,,branches,218428851,100.00,6.327,M/sec
               summary,56863,,branch-misses,218219951,100.00,4.10,of all branches
    
    After:
    
      0.001148449,224.75,msec,cpu-clock,224870589,100.00,224.747,CPUs utilized
      0.001148449,176,,context-switches,224775564,100.00,783.103,/sec
      0.001148449,38,,cpu-migrations,224707428,100.00,169.079,/sec
      0.001148449,61,,page-faults,224629326,100.00,271.416,/sec
      0.001148449,12172071,,cycles,224266368,100.00,0.054,GHz
      0.001148449,6901907,,instructions,224108764,100.00,0.57,insn per cycle
      0.001148449,1515655,,branches,223946693,100.00,6.744,M/sec
      0.001148449,70027,,branch-misses,223735385,100.00,4.62,of all branches
      summary,224.75,msec,cpu-clock,224870589,100.00,21.066,CPUs utilized
      summary,176,,context-switches,224775564,100.00,783.103,/sec
      summary,38,,cpu-migrations,224707428,100.00,169.079,/sec
      summary,61,,page-faults,224629326,100.00,271.416,/sec
      summary,12172071,,cycles,224266368,100.00,0.054,GHz
      summary,6901907,,instructions,224108764,100.00,0.57,insn per cycle
      summary,1515655,,branches,223946693,100.00,6.744,M/sec
      summary,70027,,branch-misses,223735385,100.00,4.62,of all branches
    Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
    Acked-by: default avatarIan Rogers <irogers@google.com>
    Cc: Adrian Hunter <adrian.hunter@intel.com>
    Cc: Athira Jajeev <atrajeev@linux.vnet.ibm.com>
    Cc: Ingo Molnar <mingo@kernel.org>
    Cc: James Clark <james.clark@arm.com>
    Cc: Jiri Olsa <jolsa@kernel.org>
    Cc: Kan Liang <kan.liang@linux.intel.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
    Link: https://lore.kernel.org/r/20221123180208.2068936-4-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    8e55ae24
stat-display.c 35.7 KB