From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: stable@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
patches@lists.linux.dev,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Namhyung Kim <namhyung@kernel.org>,
Adrian Hunter <adrian.hunter@intel.com>,
Ian Rogers <irogers@google.com>, Ingo Molnar <mingo@kernel.org>,
Jiri Olsa <jolsa@kernel.org>,
Peter Zijlstra <peterz@infradead.org>,
bpf@vger.kernel.org, Arnaldo Carvalho de Melo <acme@redhat.com>,
Sasha Levin <sashal@kernel.org>
Subject: [PATCH 6.5 098/285] perf test stat_bpf_counters_cgrp: Enhance perf stat cgroup BPF counter test
Date: Sun, 17 Sep 2023 21:11:38 +0200 [thread overview]
Message-ID: <20230917191055.077701876@linuxfoundation.org> (raw)
In-Reply-To: <20230917191051.639202302@linuxfoundation.org>
6.5-stable review patch. If anyone has any objections, please let me know.
------------------
From: Namhyung Kim <namhyung@kernel.org>
[ Upstream commit a84260e314029e6dc9904fd6eabf8d9fd7965351 ]
It has system-wide test and cpu-list test but the cpu-list test fails
sometimes. It runs sleep command on CPU1 and measure both user.slice
and system.slice cgroups by default (on systemd-based systems).
But if the system was idle enough, sometime the system.slice gets no
count and it makes the test failing. Maybe that's because it only looks
at the CPU1, let's add CPU0 to increase the chance it finds some tasks.
Fixes: 7901086014bbaa3a ("perf test: Add a new test for perf stat cgroup BPF counter")
Reported-by: Arnaldo Carvalho de Melo <acme@kernel.org>
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Ian Rogers <irogers@google.com>
Cc: Ingo Molnar <mingo@kernel.org>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: bpf@vger.kernel.org
Link: https://lore.kernel.org/r/20230825164152.165610-3-namhyung@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/perf/tests/shell/stat_bpf_counters_cgrp.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/tests/shell/stat_bpf_counters_cgrp.sh b/tools/perf/tests/shell/stat_bpf_counters_cgrp.sh
index a74440a00b6b6..e75d0780dc788 100755
--- a/tools/perf/tests/shell/stat_bpf_counters_cgrp.sh
+++ b/tools/perf/tests/shell/stat_bpf_counters_cgrp.sh
@@ -60,7 +60,7 @@ check_system_wide_counted()
check_cpu_list_counted()
{
- check_cpu_list_counted_output=$(perf stat -C 1 --bpf-counters --for-each-cgroup ${test_cgroups} -e cpu-clock -x, taskset -c 1 sleep 1 2>&1)
+ check_cpu_list_counted_output=$(perf stat -C 0,1 --bpf-counters --for-each-cgroup ${test_cgroups} -e cpu-clock -x, taskset -c 1 sleep 1 2>&1)
if echo ${check_cpu_list_counted_output} | grep -q -F "<not "; then
echo "Some CPU events are not counted"
if [ "${verbose}" = "1" ]; then
--
2.40.1
next prev parent reply other threads:[~2023-09-17 19:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230917191051.639202302@linuxfoundation.org>
2023-09-17 19:11 ` [PATCH 6.5 071/285] perf parse-events: Separate YYABORT and YYNOMEM cases Greg Kroah-Hartman
2023-09-17 19:11 ` [PATCH 6.5 072/285] perf parse-events: Move instances of YYABORT to YYNOMEM Greg Kroah-Hartman
2023-09-17 19:11 ` [PATCH 6.5 073/285] perf parse-events: Separate ENOMEM memory handling Greg Kroah-Hartman
2023-09-17 19:11 ` [PATCH 6.5 074/285] perf parse-events: Additional error reporting Greg Kroah-Hartman
2023-09-17 19:11 ` Greg Kroah-Hartman [this message]
2023-09-17 19:13 ` [PATCH 6.5 234/285] perf test shell stat_bpf_counters: Fix test on Intel Greg Kroah-Hartman
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=20230917191055.077701876@linuxfoundation.org \
--to=gregkh@linuxfoundation.org \
--cc=acme@kernel.org \
--cc=acme@redhat.com \
--cc=adrian.hunter@intel.com \
--cc=bpf@vger.kernel.org \
--cc=irogers@google.com \
--cc=jolsa@kernel.org \
--cc=mingo@kernel.org \
--cc=namhyung@kernel.org \
--cc=patches@lists.linux.dev \
--cc=peterz@infradead.org \
--cc=sashal@kernel.org \
--cc=stable@vger.kernel.org \
/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