* [PATCH 6.2 0469/1001] perf jevents: Correct bad character encoding
[not found] <20230307170022.094103862@linuxfoundation.org>
@ 2023-03-07 16:54 ` Greg Kroah-Hartman
2023-03-07 16:54 ` [PATCH 6.2 0470/1001] perf test bpf: Skip test if kernel-debuginfo is not present Greg Kroah-Hartman
2023-03-07 16:54 ` [PATCH 6.2 0479/1001] perf tests stat_all_metrics: Change true workload to sleep workload for system wide check Greg Kroah-Hartman
2 siblings, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2023-03-07 16:54 UTC (permalink / raw)
To: stable
Cc: Kang Minchul, Ian Rogers, Sandipan Das, Alexander Shishkin,
Perry Taylor, Stephane Eranian, patches, James Clark,
Mark Rutland, Kim Phillips, Will Deacon, Kan Liang, Sasha Levin,
Rob Herring, Peter Zijlstra, Ingo Molnar, Xing Zhengjun,
Mike Leach, John Garry, Kajol Jain, Arnaldo Carvalho de Melo,
Namhyung Kim, Caleb Biggers, linux-arm-kernel, Greg Kroah-Hartman,
Ravi Bangoria, Florian Fis cher, Adrian Hunter, Jiri Olsa,
Leo Yan, linuxppc-dev, Jing Zhang
From: Ian Rogers <irogers@google•com>
[ Upstream commit d2e3dc829e389d686194d06f0a64adda4158faae ]
A character encoding issue added a "3D" character that breaks the
metrics test.
Fixes: 40769665b63d8c84 ("perf jevents: Parse metrics during conversion")
Reviewed-by: Kajol Jain <kjain@linux•ibm.com>
Signed-off-by: Ian Rogers <irogers@google•com>
Cc: Adrian Hunter <adrian.hunter@intel•com>
Cc: Alexander Shishkin <alexander.shishkin@linux•intel.com>
Cc: Caleb Biggers <caleb.biggers@intel•com>
Cc: Florian Fischer <florian.fischer@muhq•space>
Cc: Ian Rogers <irogers@google•com>
Cc: Ingo Molnar <mingo@redhat•com>
Cc: James Clark <james.clark@arm•com>
Cc: Jing Zhang <renyu.zj@linux•alibaba.com>
Cc: Jiri Olsa <jolsa@kernel•org>
Cc: John Garry <john.g.garry@oracle•com>
Cc: Kan Liang <kan.liang@linux•intel.com>
Cc: Kang Minchul <tegongkang@gmail•com>
Cc: Kim Phillips <kim.phillips@amd•com>
Cc: Leo Yan <leo.yan@linaro•org>
Cc: Mark Rutland <mark.rutland@arm•com>
Cc: Mike Leach <mike.leach@linaro•org>
Cc: Namhyung Kim <namhyung@kernel•org>
Cc: Perry Taylor <perry.taylor@intel•com>
Cc: Peter Zijlstra <peterz@infradead•org>
Cc: Ravi Bangoria <ravi.bangoria@amd•com>
Cc: Rob Herring <robh@kernel•org>
Cc: Sandipan Das <sandipan.das@amd•com>
Cc: Stephane Eranian <eranian@google•com>
Cc: Will Deacon <will@kernel•org>
Cc: Xing Zhengjun <zhengjun.xing@linux•intel.com>
Cc: linux-arm-kernel@lists•infradead.org
Cc: linuxppc-dev@lists•ozlabs.org
Link: https://lore.kernel.org/r/20230126233645.200509-14-irogers@google.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat•com>
Signed-off-by: Sasha Levin <sashal@kernel•org>
---
tools/perf/pmu-events/metric_test.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/pmu-events/metric_test.py b/tools/perf/pmu-events/metric_test.py
index 15315d0f716ca..6980f452df0ad 100644
--- a/tools/perf/pmu-events/metric_test.py
+++ b/tools/perf/pmu-events/metric_test.py
@@ -87,8 +87,8 @@ class TestMetricExpressions(unittest.TestCase):
after = r'min((a + b if c > 1 else c + d), e + f)'
self.assertEqual(ParsePerfJson(before).ToPerfJson(), after)
- before =3D r'a if b else c if d else e'
- after =3D r'(a if b else (c if d else e))'
+ before = r'a if b else c if d else e'
+ after = r'(a if b else (c if d else e))'
self.assertEqual(ParsePerfJson(before).ToPerfJson(), after)
def test_ToPython(self):
--
2.39.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 6.2 0470/1001] perf test bpf: Skip test if kernel-debuginfo is not present
[not found] <20230307170022.094103862@linuxfoundation.org>
2023-03-07 16:54 ` [PATCH 6.2 0469/1001] perf jevents: Correct bad character encoding Greg Kroah-Hartman
@ 2023-03-07 16:54 ` Greg Kroah-Hartman
2023-03-07 16:54 ` [PATCH 6.2 0479/1001] perf tests stat_all_metrics: Change true workload to sleep workload for system wide check Greg Kroah-Hartman
2 siblings, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2023-03-07 16:54 UTC (permalink / raw)
To: stable
Cc: Sasha Levin, Ian Rogers, Andi Kleen, Nageswara R Sastry,
Greg Kroah-Hartman, linuxppc-dev, patches,
Arnaldo Carvalho de Melo, Athira Rajeev, James Clark, Jiri Olsa,
Kajol Jain, Namhyung Kim, Wang Nan, Disha Goel,
Madhavan Srinivasan
From: Athira Rajeev <atrajeev@linux•vnet.ibm.com>
[ Upstream commit 34266f904abd45731bdade2e92d0536c092ee9bc ]
Perf BPF filter test fails in environment where "kernel-debuginfo"
is not installed.
Test failure logs:
<<>>
42: BPF filter :
42.1: Basic BPF filtering : Ok
42.2: BPF pinning : Ok
42.3: BPF prologue generation : FAILED!
<<>>
Enabling verbose option provided debug logs, which says debuginfo
needs to be installed. Snippet of verbose logs:
<<>>
42.3: BPF prologue generation :
--- start ---
test child forked, pid 28218
<<>>
Rebuild with CONFIG_DEBUG_INFO=y, or install an appropriate debuginfo
package.
bpf_probe: failed to convert perf probe events
Failed to add events selected by BPF
test child finished with -1
---- end ----
BPF filter subtest 3: FAILED!
<<>>
Here the subtest "BPF prologue generation" failed and logs shows
debuginfo is needed. After installing kernel-debuginfo package, testcase
passes.
The "BPF prologue generation" subtest failed because, the do_test()
returns TEST_FAIL without checking the error type returned by
parse_events_load_bpf_obj().
parse_events_load_bpf_obj() can also return error of type -ENODATA
incase kernel-debuginfo package is not installed. Fix this by adding
check for -ENODATA error.
Test result after the patch changes:
Test failure logs:
<<>>
42: BPF filter :
42.1: Basic BPF filtering : Ok
42.2: BPF pinning : Ok
42.3: BPF prologue generation : Skip (clang/debuginfo isn't installed or environment missing BPF support)
<<>>
Fixes: ba1fae431e74bb42 ("perf test: Add 'perf test BPF'")
Signed-off-by: Athira Rajeev <atrajeev@linux•vnet.ibm.com>
Cc: Andi Kleen <ak@linux•intel.com>
Cc: Disha Goel <disgoel@linux•ibm.com>
Cc: Ian Rogers <irogers@google•com>
Cc: James Clark <james.clark@arm•com>
Cc: Jiri Olsa <jolsa@kernel•org>
Cc: Kajol Jain <kjain@linux•ibm.com>
Cc: Madhavan Srinivasan <maddy@linux•vnet.ibm.com>
Cc: Michael Ellerman <mpe@ellerman•id.au>
Cc: Nageswara R Sastry <rnsastry@linux•ibm.com>
Cc: Namhyung Kim <namhyung@kernel•org>
Cc: Wang Nan <wangnan0@huawei•com>
Cc: linuxppc-dev@lists•ozlabs.org
Link: http://lore.kernel.org/linux-perf-users/Y7bIk77mdE4j8Jyi@kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat•com>
Signed-off-by: Sasha Levin <sashal@kernel•org>
---
tools/perf/tests/bpf.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/tools/perf/tests/bpf.c b/tools/perf/tests/bpf.c
index 17c023823713d..6a4235a9cf57e 100644
--- a/tools/perf/tests/bpf.c
+++ b/tools/perf/tests/bpf.c
@@ -126,6 +126,10 @@ static int do_test(struct bpf_object *obj, int (*func)(void),
err = parse_events_load_bpf_obj(&parse_state, &parse_state.list, obj, NULL);
parse_events_error__exit(&parse_error);
+ if (err == -ENODATA) {
+ pr_debug("Failed to add events selected by BPF, debuginfo package not installed\n");
+ return TEST_SKIP;
+ }
if (err || list_empty(&parse_state.list)) {
pr_debug("Failed to add events selected by BPF\n");
return TEST_FAIL;
@@ -368,7 +372,7 @@ static struct test_case bpf_tests[] = {
"clang isn't installed or environment missing BPF support"),
#ifdef HAVE_BPF_PROLOGUE
TEST_CASE_REASON("BPF prologue generation", bpf_prologue_test,
- "clang isn't installed or environment missing BPF support"),
+ "clang/debuginfo isn't installed or environment missing BPF support"),
#else
TEST_CASE_REASON("BPF prologue generation", bpf_prologue_test, "not compiled in"),
#endif
--
2.39.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [PATCH 6.2 0479/1001] perf tests stat_all_metrics: Change true workload to sleep workload for system wide check
[not found] <20230307170022.094103862@linuxfoundation.org>
2023-03-07 16:54 ` [PATCH 6.2 0469/1001] perf jevents: Correct bad character encoding Greg Kroah-Hartman
2023-03-07 16:54 ` [PATCH 6.2 0470/1001] perf test bpf: Skip test if kernel-debuginfo is not present Greg Kroah-Hartman
@ 2023-03-07 16:54 ` Greg Kroah-Hartman
2 siblings, 0 replies; 3+ messages in thread
From: Greg Kroah-Hartman @ 2023-03-07 16:54 UTC (permalink / raw)
To: stable
Cc: Sasha Levin, Ian Rogers, Athira Rajeev, Nageswara R Sastry,
Greg Kroah-Hartman, patches, Arnaldo Carvalho de Melo,
Madhavan Srinivasan, Kajol Jain, Disha Goel, linuxppc-dev
From: Kajol Jain <kjain@linux•ibm.com>
[ Upstream commit f9fa0778ee7349a9aa3d2ea10e9f2ab843a0b44e ]
Testcase stat_all_metrics.sh fails in powerpc:
98: perf all metrics test : FAILED!
Logs with verbose:
[command]# ./perf test 98 -vv
98: perf all metrics test :
--- start ---
test child forked, pid 13262
Testing BRU_STALL_CPI
Testing COMPLETION_STALL_CPI
----
Testing TOTAL_LOCAL_NODE_PUMPS_P23
Metric 'TOTAL_LOCAL_NODE_PUMPS_P23' not printed in:
Error:
Invalid event (hv_24x7/PM_PB_LNS_PUMP23,chip=3/) in per-thread mode, enable system wide with '-a'.
Testing TOTAL_LOCAL_NODE_PUMPS_RETRIES_P01
Metric 'TOTAL_LOCAL_NODE_PUMPS_RETRIES_P01' not printed in:
Error:
Invalid event (hv_24x7/PM_PB_RTY_LNS_PUMP01,chip=3/) in per-thread mode, enable system wide with '-a'.
----
Based on above logs, we could see some of the hv-24x7 metric events
fails, and logs suggest to run the metric event with -a option. This
change happened after the commit a4b8cfcabb1d90ec ("perf stat: Delay
metric parsing"), which delayed the metric parsing phase and now before
metric parsing phase perf tool identifies, whether target is system-wide
or not. With this change, perf_event_open will fails with workload
monitoring for uncore events as expected.
The perf all metric test case fails as some of the hv-24x7 metric events
may need bigger workload with system wide monitoring to get the data.
Fix this issue by changing current system wide check from true workload
to sleep 0.01 workload.
Result with the patch changes in powerpc:
98: perf all metrics test : Ok
Fixes: a4b8cfcabb1d90ec ("perf stat: Delay metric parsing")
Suggested-by: Ian Rogers <irogers@google•com>
Reviewed-by: Athira Rajeev <atrajeev@linux•vnet.ibm.com>
Signed-off-by: Kajol Jain <kjain@linux•ibm.com>
Tested-by: Disha Goel <disgoel@linux•ibm.com>
Tested-by: Ian Rogers <irogers@google•com>
Cc: Madhavan Srinivasan <maddy@linux•ibm.com>
Cc: Nageswara R Sastry <rnsastry@linux•ibm.com>
Cc: linuxppc-dev@lists•ozlabs.org
Link: https://lore.kernel.org/r/20230215093827.124921-1-kjain@linux.ibm.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat•com>
Signed-off-by: Sasha Levin <sashal@kernel•org>
---
tools/perf/tests/shell/stat_all_metrics.sh | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/perf/tests/shell/stat_all_metrics.sh b/tools/perf/tests/shell/stat_all_metrics.sh
index 6e79349e42bef..22e9cb294b40e 100755
--- a/tools/perf/tests/shell/stat_all_metrics.sh
+++ b/tools/perf/tests/shell/stat_all_metrics.sh
@@ -11,7 +11,7 @@ for m in $(perf list --raw-dump metrics); do
continue
fi
# Failed so try system wide.
- result=$(perf stat -M "$m" -a true 2>&1)
+ result=$(perf stat -M "$m" -a sleep 0.01 2>&1)
if [[ "$result" =~ "${m:0:50}" ]]
then
continue
--
2.39.2
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-03-07 17:32 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20230307170022.094103862@linuxfoundation.org>
2023-03-07 16:54 ` [PATCH 6.2 0469/1001] perf jevents: Correct bad character encoding Greg Kroah-Hartman
2023-03-07 16:54 ` [PATCH 6.2 0470/1001] perf test bpf: Skip test if kernel-debuginfo is not present Greg Kroah-Hartman
2023-03-07 16:54 ` [PATCH 6.2 0479/1001] perf tests stat_all_metrics: Change true workload to sleep workload for system wide check Greg Kroah-Hartman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox