• Ian Rogers's avatar
    perf test: Improve pmu event metric testing · 06392aaa
    Ian Rogers authored
    Break pmu-events test into 2 and add a test to verify that all pmu
    metric expressions simply parse. Try to parse all metric ids/events,
    skip/warn if metrics for the current architecture fail to parse. To
    support warning for a skip, and an ability for a subtest to describe why
    it skips.
    
    Tested on power9, skylakex, haswell, broadwell, westmere, sandybridge and
    ivybridge.
    
    May skip/warn on other architectures if metrics are invalid. In
    particular s390 is untested, but its expressions are trivial. The
    untested architectures with expressions are power8, cascadelakex,
    tremontx, skylake, jaketown, ivytown and variants of haswell and
    broadwell.
    
    v3. addresses review comments from John Garry <john.garry@huawei.com>,
    Jiri Olsa <jolsa@redhat.com> and Arnaldo Carvalho de Melo
    <acme@kernel.org>.
    v2. changes the commit message as event parsing errors no longer cause
    the test to fail.
    
    Committer notes:
    
    Check the return value of strtod() to fix the build in systems where
    that function is declared with attribute warn_unused_result.
    Signed-off-by: default avatarIan Rogers <irogers@google.com>
    Cc: Adrian Hunter <adrian.hunter@intel.com>
    Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
    Cc: Andi Kleen <ak@linux.intel.com>
    Cc: Jin Yao <yao.jin@linux.intel.com>
    Cc: Jiri Olsa <jolsa@redhat.com>
    Cc: John Garry <john.garry@huawei.com>
    Cc: Kajol Jain <kjain@linux.ibm.com>
    Cc: Kan Liang <kan.liang@linux.intel.com>
    Cc: Leo Yan <leo.yan@linaro.org>
    Cc: Mark Rutland <mark.rutland@arm.com>
    Cc: Namhyung Kim <namhyung@kernel.org>
    Cc: Paul Clarke <pc@us.ibm.com>
    Cc: Peter Zijlstra <peterz@infradead.org>
    Cc: Stephane Eranian <eranian@google.com>
    Link: http://lore.kernel.org/lkml/20200513212933.41273-1-irogers@google.com
    [ split from a larger patch ]
    Signed-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
    06392aaa
pmu-events.c 12.6 KB