lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20221114230227.1255976-10-namhyung@kernel.org>
Date:   Mon, 14 Nov 2022 15:02:17 -0800
From:   Namhyung Kim <namhyung@...nel.org>
To:     Arnaldo Carvalho de Melo <acme@...nel.org>,
        Jiri Olsa <jolsa@...nel.org>
Cc:     Ingo Molnar <mingo@...nel.org>,
        Peter Zijlstra <peterz@...radead.org>,
        LKML <linux-kernel@...r.kernel.org>,
        Ian Rogers <irogers@...gle.com>,
        Adrian Hunter <adrian.hunter@...el.com>,
        linux-perf-users@...r.kernel.org,
        Kan Liang <kan.liang@...ux.intel.com>,
        Zhengjun Xing <zhengjun.xing@...ux.intel.com>,
        James Clark <james.clark@....com>,
        Athira Jajeev <atrajeev@...ux.vnet.ibm.com>
Subject: [PATCH 09/19] perf stat: Align cgroup names

We don't know how long cgroup name is, but at least we can align short
ones like below.

  $ perf stat -a --for-each-cgroup system.slice,user.slice true

   Performance counter stats for 'system wide':

                0.13 msec cpu-clock                        system.slice     #    0.010 CPUs utilized
                   4      context-switches                 system.slice     #   31.989 K/sec
                   1      cpu-migrations                   system.slice     #    7.997 K/sec
                   0      page-faults                      system.slice     #    0.000 /sec
             450,673      cycles                           system.slice     #    3.604 GHz                         (92.41%)
             161,216      instructions                     system.slice     #    0.36  insn per cycle              (92.41%)
              32,678      branches                         system.slice     #  261.332 M/sec                       (92.41%)
               2,628      branch-misses                    system.slice     #    8.04% of all branches             (92.41%)
               14.29 msec cpu-clock                        user.slice       #    1.163 CPUs utilized
                  35      context-switches                 user.slice       #    2.449 K/sec
                  12      cpu-migrations                   user.slice       #  839.691 /sec
                  57      page-faults                      user.slice       #    3.989 K/sec
          49,683,026      cycles                           user.slice       #    3.477 GHz                         (99.38%)
         110,790,266      instructions                     user.slice       #    2.23  insn per cycle              (99.38%)
          24,552,255      branches                         user.slice       #    1.718 G/sec                       (99.38%)
             127,779      branch-misses                    user.slice       #    0.52% of all branches             (99.38%)

         0.012289431 seconds time elapsed

Signed-off-by: Namhyung Kim <namhyung@...nel.org>
---
 tools/perf/util/stat-display.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/perf/util/stat-display.c b/tools/perf/util/stat-display.c
index bf3f2f9d5dee..e66f766a3d78 100644
--- a/tools/perf/util/stat-display.c
+++ b/tools/perf/util/stat-display.c
@@ -116,7 +116,7 @@ static void print_noise(struct perf_stat_config *config,
 
 static void print_cgroup_std(struct perf_stat_config *config, const char *cgrp_name)
 {
-	fprintf(config->output, " %s", cgrp_name);
+	fprintf(config->output, " %-16s", cgrp_name);
 }
 
 static void print_cgroup_csv(struct perf_stat_config *config, const char *cgrp_name)
-- 
2.38.1.493.g58b659f92b-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ