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 for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240708144204.839486-1-dapeng1.mi@linux.intel.com>
Date: Mon,  8 Jul 2024 14:41:59 +0000
From: Dapeng Mi <dapeng1.mi@...ux.intel.com>
To: Peter Zijlstra <peterz@...radead.org>,
	Ingo Molnar <mingo@...hat.com>,
	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Namhyung Kim <namhyung@...nel.org>,
	Ian Rogers <irogers@...gle.com>,
	Adrian Hunter <adrian.hunter@...el.com>,
	Alexander Shishkin <alexander.shishkin@...ux.intel.com>,
	Kan Liang <kan.liang@...ux.intel.com>
Cc: linux-perf-users@...r.kernel.org,
	linux-kernel@...r.kernel.org,
	Yongwei Ma <yongwei.ma@...el.com>,
	Dapeng Mi <dapeng1.mi@...el.com>,
	Dapeng Mi <dapeng1.mi@...ux.intel.com>
Subject: [Patch v2 0/5] Bug fixes on topdown events reordering 

Changes:
v1 -> v2"
  * Use event/umask code instead of event name to indentify if an event
    is a topdown slots/metric event (patch 1/5).
  * Add perf tests to validate topdown events reordering including raw
    format topdown events (patch 5/5).
  * Drop the v1 patch 3/4 which doesn't move slots event if no topdown
    metrics event in group.

Currently whether an event is a topdown slots/metric event is only
identified by comparing event name. It's inaccurate since topdown events
can be assigned by raw format and the event name is null in this case,
e.g.

perf stat -e '{instructions,cpu/r400/,cpu/r8300/}' sleep 1

 Performance counter stats for 'sleep 1':

     <not counted>      instructions
     <not counted>      cpu/r400/
   <not supported>      cpu/r8300/

       1.002917796 seconds time elapsed

       0.002955000 seconds user
       0.000000000 seconds sys

In this case slots and topdown-be-bound events are assigned by raw
format (slots:r400, topdown-be-bound:r8300) and they are not reordered
correctly.

The reason of dropping the patch "don't move slots event if no topdown
metric events in group" is that no any function issues but a warning is
introduced, and the cost of fixing this issue is expensive.

History:
  v1: https://lore.kernel.org/all/20240702224037.343958-1-dapeng1.mi@linux.intel.com/

Dapeng Mi (5):
  perf x86/topdown: Complete topdown slots/metrics events check
  perf x86/topdown: Correct leader selection with sample_read enabled
  perf x86/topdown: Don't move topdown metrics events when sorting
    events
  perf tests: Add leader sampling test in record tests
  perf tests: Add topdown events counting and sampling tests

 tools/perf/arch/x86/util/evlist.c  |  9 ++---
 tools/perf/arch/x86/util/evsel.c   |  3 +-
 tools/perf/arch/x86/util/topdown.c | 57 ++++++++++++++++++++++++++++--
 tools/perf/arch/x86/util/topdown.h |  2 ++
 tools/perf/tests/shell/record.sh   | 34 ++++++++++++++++++
 tools/perf/tests/shell/stat.sh     |  6 ++++
 6 files changed, 101 insertions(+), 10 deletions(-)


base-commit: 73e931504f8e0d42978bfcda37b323dbbd1afc08
-- 
2.40.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ