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-next>] [day] [month] [year] [list]
Date:   Wed, 23 Nov 2022 10:01:53 -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: [PATCHSET 00/15] perf stat: Improve perf stat output (v2)

Hello,

This is a continuation of my perf stat cleanup work focusing on the
metric-only mode with JSON output now.  It's based on the previous
patchset which is already merged to acme/perf/core.

The JSON output + metric-only with aggregation has been broken for a
while.  The last update fixed the crash but it still produced invalid
JSON objects.  Also having a separate header and objects with their own
"metric-value" key is not convenient to process.

  # perf stat -aj --metric-only --per-socket sleep 1
  {"unit" : "GHz"}{"unit" : "insn per cycle"}{"unit" : "branch-misses of all branches"}
  {"socket" : "S0", "aggregate-number" : 8, {"metric-value" : "0.809"}{"metric-value" : "2.10"}{"metric-value" : "0.37"}

So I removed the header and move the metric keys to the object.  Then
it doesn't need separate objects anymore.  The new output looks like:

  # perf stat -aj --metric-only --per-socket sleep 1
  {"socket" : "S0", "cpu-count" : 8, "GHz" : "0.817", "insn per cycle" : "2.15", "branch-misses of all branches" : "0.38"}

You can get it from 'perf/stat-display-v2' branch in

  git://git.kernel.org/pub/scm/linux/kernel/git/namhyung/linux-perf.git

Thanks,
Namhyung

Namhyung Kim (15):
  perf stat: Fix cgroup display in JSON output
  perf stat: Move summary prefix printing logic in CSV output
  perf stat: Do not align time prefix in CSV output
  perf stat: Use scnprintf() in prepare_interval()
  perf stat: Remove prefix argument in print_metric_headers()
  perf stat: Remove metric_only argument in print_counter_aggrdata()
  perf stat: Pass const char *prefix to display routines
  perf stat: Use struct outstate in evlist__print_counters()
  perf stat: Pass struct outstate to print_metric_begin()
  perf stat: Pass struct outstate to printout()
  perf stat: Do not pass runtime_stat to printout()
  perf stat: Pass through struct outstate
  perf stat: Fix JSON output in metric-only mode
  perf stat: Rename "aggregate-number" to "cpu-count" in JSON
  perf stat: Tidy up JSON metric-only output when no metrics

 tools/perf/arch/x86/util/iostat.c |   4 +-
 tools/perf/util/iostat.c          |   3 +-
 tools/perf/util/iostat.h          |   4 +-
 tools/perf/util/stat-display.c    | 257 +++++++++++++++---------------
 4 files changed, 133 insertions(+), 135 deletions(-)


base-commit: 63a3bf5e8d9e79ce456c8f73d4395a5a51d841b1
-- 
2.38.1.584.g0f3c55d4c2-goog

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ