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: <Zy8FIt2OMa5-GymZ@google.com>
Date: Fri, 8 Nov 2024 22:45:54 -0800
From: Namhyung Kim <namhyung@...nel.org>
To: Ian Rogers <irogers@...gle.com>
Cc: Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>,
	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Mark Rutland <mark.rutland@....com>,
	Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
	Jiri Olsa <jolsa@...nel.org>,
	Adrian Hunter <adrian.hunter@...el.com>,
	Kan Liang <kan.liang@...ux.intel.com>,
	Athira Jajeev <atrajeev@...ux.vnet.ibm.com>,
	James Clark <james.clark@...aro.org>,
	Dominique Martinet <asmadeus@...ewreck.org>,
	Yang Li <yang.lee@...ux.alibaba.com>,
	Colin Ian King <colin.i.king@...il.com>,
	Yang Jihong <yangjihong@...edance.com>,
	"Steinar H. Gunderson" <sesse@...gle.com>,
	Oliver Upton <oliver.upton@...ux.dev>,
	Ilkka Koskinen <ilkka@...amperecomputing.com>,
	Ze Gao <zegao2021@...il.com>, Weilin Wang <weilin.wang@...el.com>,
	Ben Gainey <ben.gainey@....com>,
	zhaimingbing <zhaimingbing@...s.chinamobile.com>,
	Zixian Cai <fzczx123@...il.com>, Andi Kleen <ak@...ux.intel.com>,
	Paran Lee <p4ranlee@...il.com>,
	Thomas Falcon <thomas.falcon@...el.com>,
	linux-kernel@...r.kernel.org, linux-perf-users@...r.kernel.org,
	"Steven Rostedt (Google)" <rostedt@...dmis.org>
Subject: Re: [PATCH v4 0/6] Avoid parsing tracepoint format just for id

On Fri, Nov 08, 2024 at 10:47:45AM -0800, Ian Rogers wrote:
> The tracepoint format isn't needed to open an event, just the id for
> the config value. Refactor the use of evsel->tp_format to use an
> accessor that will lazily construct its value. In evsel__newtp_idx
> read the id so the config value can be set up/used.
> 
> This allows tracepoints to be used without libtraceevent in a number
> of tests. Other functionality is enabled without libtracevent, such as
> mapping a tracepoint id back to its name. There may be some
> performance benefit to code using tracepoints but not using the format
> information.
> 
> v4. Rebase due to conflict with 9ac98662dbd3 ("perf: event: Remove deadcode")
> v3. Whitespace changes, Arnaldo.
> v2. Add additional error checking/handling in evsel__tp_format.
> 
> Ian Rogers (6):
>   tool api fs: Correctly encode errno for read/write open failures
>   perf trace-event: Constify print arguments
>   perf trace-event: Always build trace-event-info.c
>   perf evsel: Add/use accessor for tp_format
>   perf evsel: Allow evsel__newtp without libtraceevent
>   perf tests: Enable tests disabled due to tracepoint parsing

After applying this series, I'm seeing some test failures.  But I don't
understand why it affects non-tracepoint events though.

  $ sudo ./perf test -v pipe
  --- start ---
  test child forked, pid 3036123
   1bde35-1bdecc l noploop
  perf does have symbol 'noploop'
  
  Record+report pipe test
  [ perf record: Woken up 1 times to write data ]
  [ perf record: Captured and wrote 0.210 MB - ]
  [ perf record: Woken up 2 times to write data ]
  [ perf record: Captured and wrote 0.517 MB - ]
  [ perf record: Woken up 2 times to write data ]
  [ perf record: Captured and wrote 0.516 MB - ]
  Record+report pipe test [Success]
  
  Inject -B build-ids test
  0xa5c [0x17a4]: failed to process type: 80
  Error:
  failed to process sample
  Inject build-ids test [Failed - cannot find noploop function in pipe #1]
  
  Inject -b build-ids test
  0xa5c [0x17a4]: failed to process type: 80
  Error:
  failed to process sample
  Inject build-ids test [Failed - cannot find noploop function in pipe #1]
  
  Inject --buildid-all build-ids test
  0xa5c [0x17a4]: failed to process type: 80
  Error:
  failed to process sample
  Inject build-ids test [Failed - cannot find noploop function in pipe #1]
  
  Inject --mmap2-buildid-all build-ids test
  0xa5c [0x17a4]: failed to process type: 80
  Error:
  failed to process sample
  Inject build-ids test [Failed - cannot find noploop function in pipe #1]
  ---- end(-1) ----
   84: perf pipe recording and injection test                          : FAILED!
  
  $ sudo ./perf test -v Zstd
  --- start ---
  test child forked, pid 3036097
  Collecting compressed record file:
  500+0 records in
  500+0 records out
  256000 bytes (256 kB, 250 KiB) copied, 0.00169127 s, 151 MB/s
  [ perf record: Woken up 1 times to write data ]
  [ perf record: Captured and wrote 0.032 MB /tmp/perf.data.KBo, compressed (original 0.004 MB, ratio is 3.324) ]
  Checking compressed events stats:
  Couldn't decompress data
  0x7ca8 [0x4f2]: failed to process type: 81 [Operation not permitted]
  Error:
  failed to process sample
  ---- end(-1) ----
   86: Zstd perf.data compression/decompression                        : FAILED!

Thanks,
Namhyung


> 
>  tools/lib/api/fs/fs.c                         |   6 +-
>  tools/perf/builtin-kmem.c                     |  12 +-
>  tools/perf/builtin-kwork.c                    |   3 +-
>  tools/perf/builtin-record.c                   |   2 -
>  tools/perf/builtin-script.c                   |   9 +-
>  tools/perf/builtin-trace.c                    |  79 +++++++++----
>  tools/perf/tests/Build                        |   6 +-
>  tools/perf/tests/builtin-test.c               |   2 -
>  tools/perf/tests/parse-events.c               |  25 +---
>  tools/perf/util/Build                         |   2 +-
>  tools/perf/util/data-convert-bt.c             |  10 +-
>  tools/perf/util/data-convert-json.c           |   8 +-
>  tools/perf/util/evsel.c                       | 110 +++++++++++++-----
>  tools/perf/util/evsel.h                       |   9 +-
>  tools/perf/util/evsel_fprintf.c               |   4 +-
>  tools/perf/util/parse-events.c                |  16 +--
>  tools/perf/util/perf_event_attr_fprintf.c     |   4 -
>  .../util/scripting-engines/trace-event-perl.c |   3 +-
>  .../scripting-engines/trace-event-python.c    |   3 +-
>  tools/perf/util/sort.c                        |  33 ++++--
>  tools/perf/util/trace-event-parse.c           |   2 +-
>  tools/perf/util/trace-event-scripting.c       |  10 +-
>  tools/perf/util/trace-event.h                 |   2 +-
>  23 files changed, 214 insertions(+), 146 deletions(-)
> 
> -- 
> 2.47.0.277.g8800431eea-goog
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ