lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20200309084924.GA65888@krava>
Date:   Mon, 9 Mar 2020 09:49:24 +0100
From:   Jiri Olsa <jolsa@...hat.com>
To:     John Garry <john.garry@...wei.com>
Cc:     peterz@...radead.org, mingo@...hat.com, acme@...nel.org,
        mark.rutland@....com, alexander.shishkin@...ux.intel.com,
        namhyung@...nel.org, will@...nel.org, ak@...ux.intel.com,
        linuxarm@...wei.com, linux-kernel@...r.kernel.org,
        james.clark@....com, qiangqing.zhang@....com
Subject: Re: [PATCH 6/6] perf test: Add pmu-events test

On Thu, Mar 05, 2020 at 07:08:06PM +0800, John Garry wrote:
> Add a pmu-events test.
> 
> This test will scan all PMUs in the system, and run a PMU event aliasing
> test for each CPU or uncore PMU.
> 
> For known aliases added in pmu-events/arch/test, we need to add an entry
> in test_cpu_aliases[] or test_uncore_aliases[].

heya, awesome! ;-)

> 
> A sample run is as follows for x86:
> 
> Couldn't bump rlimit(MEMLOCK), failures may take place when creating BPF maps, etc
> 10: PMU event aliases                                     :
> --- start ---
> test child forked, pid 30869
> Using CPUID GenuineIntel-6-9E-9
> intel_pt default config: tsc,mtc,mtc_period=3,psb_period=3,pt,branch
> skipping testing PMU software
> testing PMU power: skip
> testing PMU cpu: matched event segment_reg_loads.any
> testing PMU cpu: matched event dispatch_blocked.any
> testing PMU cpu: matched event eist_trans
> testing PMU cpu: matched event bp_l1_btb_correct
> testing PMU cpu: matched event bp_l2_btb_correct
> testing PMU cpu: pass
> testing PMU cstate_core: skip
> testing PMU uncore_cbox_2: matched event unc_cbo_xsnp_response.miss_eviction
> testing PMU uncore_cbox_2: pass
> skipping testing PMU breakpoint
> testing PMU uncore_cbox_0: matched event unc_cbo_xsnp_response.miss_eviction
> testing PMU uncore_cbox_0: pass
> skipping testing PMU tracepoint
> testing PMU cstate_pkg: skip
> testing PMU uncore_arb: skip
> testing PMU msr: skip
> testing PMU uncore_cbox_3: matched event unc_cbo_xsnp_response.miss_eviction
> testing PMU uncore_cbox_3: pass
> testing PMU intel_pt: skip
> testing PMU uncore_cbox_1: matched event unc_cbo_xsnp_response.miss_eviction
> testing PMU uncore_cbox_1: pass
> test child finished with 0
> ---- end ----
> PMU event aliases: Ok

SNIP

> +int test__pmu_event_aliases(struct test *test __maybe_unused,
> +			    int subtest __maybe_unused)
> +{
> +	struct perf_pmu *pmu = NULL;
> +
> +	while ((pmu = perf_pmu__scan(pmu)) != NULL) {
> +		int count = 0;

I don't follow the pmu iteration in here.. I'd expect
we create 'test' pmu and check that all the aliasses
are in place as we expect them.. why do we match them
to existing events?

or as I'm thinking about that now, would it be enough
to check pme_test_cpu array to have string that we
expect?

thanks for doing this,
jirka

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ