From: Dapeng Mi <dapeng1.mi@linux.intel.com>
To: Peter Zijlstra <peterz@infradead.org>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Ian Rogers <irogers@google.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Kan Liang <kan.liang@linux.intel.com>
Cc: linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
Yongwei Ma <yongwei.ma@intel.com>,
Dapeng Mi <dapeng1.mi@intel.com>,
Dapeng Mi <dapeng1.mi@linux.intel.com>
Subject: [Patch v2 0/5] Bug fixes on topdown events reordering
Date: Mon, 8 Jul 2024 14:41:59 +0000 [thread overview]
Message-ID: <20240708144204.839486-1-dapeng1.mi@linux.intel.com> (raw)
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
next reply other threads:[~2024-07-08 7:40 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-08 14:41 Dapeng Mi [this message]
2024-07-08 14:42 ` [Patch v2 1/5] perf x86/topdown: Complete topdown slots/metrics events check Dapeng Mi
2024-07-08 13:28 ` Liang, Kan
2024-07-09 1:58 ` Mi, Dapeng
2024-07-08 14:42 ` [Patch v2 2/5] perf x86/topdown: Correct leader selection with sample_read enabled Dapeng Mi
2024-07-08 14:42 ` [Patch v2 3/5] perf x86/topdown: Don't move topdown metrics events when sorting events Dapeng Mi
2024-07-08 15:08 ` Ian Rogers
2024-07-09 4:17 ` Mi, Dapeng
2024-07-09 22:37 ` Ian Rogers
2024-07-10 9:40 ` Mi, Dapeng
2024-07-10 15:07 ` Ian Rogers
2024-07-11 4:48 ` Mi, Dapeng
2024-07-08 14:42 ` [Patch v2 4/5] perf tests: Add leader sampling test in record tests Dapeng Mi
2024-07-08 14:42 ` [Patch v2 5/5] perf tests: Add topdown events counting and sampling tests Dapeng Mi
2024-07-08 13:40 ` Liang, Kan
2024-07-09 5:27 ` Mi, Dapeng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240708144204.839486-1-dapeng1.mi@linux.intel.com \
--to=dapeng1.mi@linux.intel.com \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=dapeng1.mi@intel.com \
--cc=irogers@google.com \
--cc=kan.liang@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=peterz@infradead.org \
--cc=yongwei.ma@intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox