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: <bb83ada4-a669-7ae1-1472-5c8d97a3f177@linux.intel.com>
Date:   Thu, 22 Apr 2021 11:20:32 +0800
From:   "Jin, Yao" <yao.jin@...ux.intel.com>
To:     Jiri Olsa <jolsa@...hat.com>
Cc:     acme@...nel.org, jolsa@...nel.org, peterz@...radead.org,
        mingo@...hat.com, alexander.shishkin@...ux.intel.com,
        Linux-kernel@...r.kernel.org, ak@...ux.intel.com,
        kan.liang@...el.com, yao.jin@...el.com
Subject: Re: [PATCH v4 22/25] perf tests: Support 'Parse and process metrics'
 test for hybrid

Hi Jiri,

On 4/22/2021 2:29 AM, Jiri Olsa wrote:
> On Fri, Apr 16, 2021 at 10:05:14PM +0800, Jin Yao wrote:
>> Some events are not supported. Only pick up some cases for hybrid.
>>
>>    # ./perf test 67
>>    67: Parse and process metrics                                       : Ok
>>
>> Signed-off-by: Jin Yao <yao.jin@...ux.intel.com>
>> ---
>>   tools/perf/tests/parse-metric.c | 10 ++++++++--
>>   1 file changed, 8 insertions(+), 2 deletions(-)
>>
>> diff --git a/tools/perf/tests/parse-metric.c b/tools/perf/tests/parse-metric.c
>> index 4968c4106254..24e5ddff515e 100644
>> --- a/tools/perf/tests/parse-metric.c
>> +++ b/tools/perf/tests/parse-metric.c
>> @@ -11,6 +11,7 @@
>>   #include "debug.h"
>>   #include "expr.h"
>>   #include "stat.h"
>> +#include "pmu.h"
>>   
>>   static struct pmu_event pme_test[] = {
>>   {
>> @@ -370,12 +371,17 @@ static int test_metric_group(void)
>>   
>>   int test__parse_metric(struct test *test __maybe_unused, int subtest __maybe_unused)
>>   {
>> +	perf_pmu__scan(NULL);
> 
> perf_pmu__has_hybrid calls perf_pmu__scan no?
> 
> jirka
> 

Sorry, I don't need to call perf_pmu_scan here.

+bool perf_pmu__has_hybrid(void)
+{
+       if (!hybrid_scanned) {
+               hybrid_scanned = true;
+               perf_pmu__scan(NULL);
+       }
+
+       return !list_empty(&perf_pmu__hybrid_pmus);
+}

perf_pmu__has_hybrid calls perf_pmu__scan if it's not scanned yet.

Thanks
Jin Yao

>> +
>>   	TEST_ASSERT_VAL("IPC failed", test_ipc() == 0);
>>   	TEST_ASSERT_VAL("frontend failed", test_frontend() == 0);
>> -	TEST_ASSERT_VAL("cache_miss_cycles failed", test_cache_miss_cycles() == 0);
>>   	TEST_ASSERT_VAL("DCache_L2 failed", test_dcache_l2() == 0);
>>   	TEST_ASSERT_VAL("recursion fail failed", test_recursion_fail() == 0);
>> -	TEST_ASSERT_VAL("test metric group", test_metric_group() == 0);
>>   	TEST_ASSERT_VAL("Memory bandwidth", test_memory_bandwidth() == 0);
>> +
>> +	if (!perf_pmu__has_hybrid()) {
>> +		TEST_ASSERT_VAL("cache_miss_cycles failed", test_cache_miss_cycles() == 0);
>> +		TEST_ASSERT_VAL("test metric group", test_metric_group() == 0);
>> +	}
>>   	return 0;
>>   }
>> -- 
>> 2.17.1
>>
> 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ