perf test: Fix metric parsing test
PATCH 1/1 perf test: Fix metric parsing test
Commit e1c92a7fbbc5 ("perf tests: Add another metric parsing test") add another test for metric parsing. The test goes through all metrics compiled for arch within pmu events and try to parse them.
Right now this test is failing in powerpc machine.
Result in power9 platform:
[command]# ./perf test 10
10: PMU events : 10.1: PMU event table sanity : Ok 10.2: PMU event map aliases : Ok 10.3: Parsing of PMU event table metrics : Skip (some metrics failed) 10.4: Parsing of PMU event table metrics with fake PMUs : FAILED!
Issue is we are passing different runtime parameter value in "expr__find_other" and "expr__parse" function which is called from function metric_parse_fake. And because of this parsing of hv-24x7 metrics is failing.
[command]# ./perf test 10 -vv
.....
hv_24x7/pm_mcs01_128b_rd_disp_port01,chip=1/ not found expr__parse failed
test child finished with -1
---- end ----
PMU events subtest 4: FAILED!
This patch fix this issue and change runtime parameter value to '0' in expr__parse function.
Result in power9 platform after this patch:
[command]# ./perf test 10
10: PMU events : 10.1: PMU event table sanity : Ok 10.2: PMU event map aliases : Ok 10.3: Parsing of PMU event table metrics : Skip (some metrics failed) 10.4: Parsing of PMU event table metrics with fake PMUs : Ok
--- tools/perf/tests/pmu-events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
tools/perf/tests/pmu-events.c +1 -1
@@ -575,7 +575,7 @@ static int metric_parse_fake(const char *str) } } -if (expr__parse (&result, &ctx, str,1 )) +if (expr__parse (&result, &ctx, str,0 ))pr_err ("expr__parse failed\n" );else ret =0 ;
Signature · 1 line
2.27.0
Quoted 33 lines · Kajol Jain
Commit
e1c92a7fbbc5("perf tests: Add another metric parsing test") add another test for metric parsing. The test goes through all metrics compiled for arch within pmu events and try to parse them.Right now this test is failing in powerpc machine.
Result in power9 platform:
[command]# ./perf test 10
10: PMU events : 10.1: PMU event table sanity : Ok 10.2: PMU event map aliases : Ok 10.3: Parsing of PMU event table metrics : Skip (some metrics failed) 10.4: Parsing of PMU event table metrics with fake PMUs : FAILED!Issue is we are passing different runtime parameter value in "
expr__find_other" and "expr__parse" function which is called from functionmetric_parse_fake. And because of this parsing of hv-24x7 metrics is failing.[command]# ./perf test 10 -vv
.....
hv_24x7/pm_mcs01_128b_rd_disp_port01,chip=1/ not foundexpr__parsefailed
test child finished with -1
---- end ----
PMU events subtest 4: FAILED!This patch fix this issue and change runtime parameter value to '0' in
expr__parsefunction.Result in power9 platform after this patch:
[command]# ./perf test 10
Quoted 8 lines
10: PMU events : 10.1: PMU event table sanity : Ok 10.2: PMU event map aliases : Ok 10.3: Parsing of PMU event table metrics : Skip (some metrics failed) 10.4: Parsing of PMU event table metrics with fake PMUs : OkFixes e1c92a7fbbc5 ("perf tests: Add another metric parsing test")Signed-off-by Kajol Jain <[email protected]>
thanks,
jirka
Quoted 20 lines
--- tools/perf/tests/pmu-events.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)tools/perf/tests/pmu-events.c +1
-1@@ -575,7 +575,7 @@ static int metric_parse_fake(const char *str) } } -if (expr__parse (&result, &ctx, str,1 )) +if (expr__parse (&result, &ctx, str,0 ))pr_err ("expr__parse failed\n" );else ret =0 ;Signature · 1 line
2.27.0
A message that is not in the archive (sent off-list or not yet received): CAP-5=fX76BQMaOnKTCgBD9MMwx_Q=tShDFBYZxzJOreOhXV=Mw@mail.gmail.com
Em Thu, Nov 19, 2020 at 08:48:57AM -0800, Ian Rogers escreveu:
Quoted 11 lines · Kajol Jain
Quoted 9 lines
Result in power9 platform after this patch:
[command]# ./perf test 10
10: PMU events : 10.1: PMU event table sanity : Ok 10.2: PMU event map aliases : Ok 10.3: Parsing of PMU event table metrics : Skip(some metrics failed)
10.4: Parsing of PMU event table metrics with fake PMUs : Ok
Quoted 4 lines
Quoted 2 lines
Fixes e1c92a7fbbc5 ("perf tests: Add another metric parsing test")Signed-off-by Kajol Jain <[email protected]>Acked-by Ian Rogers <[email protected]>
Thanks, applied.
- Arnaldo