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]
Date:   Tue, 3 Aug 2021 09:19:20 +0100
From:   John Garry <john.garry@...wei.com>
To:     Arnaldo Carvalho de Melo <acme@...nel.org>
CC:     <peterz@...radead.org>, <mingo@...hat.com>, <mark.rutland@....com>,
        <alexander.shishkin@...ux.intel.com>, <jolsa@...hat.com>,
        <namhyung@...nel.org>, <yao.jin@...ux.intel.com>,
        <linux-kernel@...r.kernel.org>, <linux-perf-users@...r.kernel.org>,
        <irogers@...gle.com>, <linuxarm@...wei.com>
Subject: Re: [PATCH 02/11] perf jevents: Relocate test events to cpu folder

On 02/08/2021 15:54, Arnaldo Carvalho de Melo wrote:
> Em Thu, Jul 29, 2021 at 09:56:17PM +0800, John Garry escreveu:
>> In future to add support for sys events, relocate the core and uncore
>> events to a cpu folder.
>>
>> Signed-off-by: John Garry<john.garry@...wei.com>
>> ---
>>   .../pmu-events/arch/test/{test_cpu => test_soc/cpu}/branch.json | 0
>>   .../pmu-events/arch/test/{test_cpu => test_soc/cpu}/cache.json  | 0
>>   .../pmu-events/arch/test/{test_cpu => test_soc/cpu}/other.json  | 0
>>   .../pmu-events/arch/test/{test_cpu => test_soc/cpu}/uncore.json | 0
>>   tools/perf/pmu-events/jevents.c                                 | 2 +-
>>   5 files changed, 1 insertion(+), 1 deletion(-)
>>   rename tools/perf/pmu-events/arch/test/{test_cpu => test_soc/cpu}/branch.json (100%)
>>   rename tools/perf/pmu-events/arch/test/{test_cpu => test_soc/cpu}/cache.json (100%)
>>   rename tools/perf/pmu-events/arch/test/{test_cpu => test_soc/cpu}/other.json (100%)
>>   rename tools/perf/pmu-events/arch/test/{test_cpu => test_soc/cpu}/uncore.json (100%)
>>
>> diff --git a/tools/perf/pmu-events/arch/test/test_cpu/branch.json b/tools/perf/pmu-events/arch/test/test_soc/cpu/branch.json
>> similarity index 100%
>> rename from tools/perf/pmu-events/arch/test/test_cpu/branch.json
>> rename to tools/perf/pmu-events/arch/test/test_soc/cpu/branch.json
>> diff --git a/tools/perf/pmu-events/arch/test/test_cpu/cache.json b/tools/perf/pmu-events/arch/test/test_soc/cpu/cache.json
>> similarity index 100%
>> rename from tools/perf/pmu-events/arch/test/test_cpu/cache.json
>> rename to tools/perf/pmu-events/arch/test/test_soc/cpu/cache.json
>> diff --git a/tools/perf/pmu-events/arch/test/test_cpu/other.json b/tools/perf/pmu-events/arch/test/test_soc/cpu/other.json
>> similarity index 100%
>> rename from tools/perf/pmu-events/arch/test/test_cpu/other.json
>> rename to tools/perf/pmu-events/arch/test/test_soc/cpu/other.json
>> diff --git a/tools/perf/pmu-events/arch/test/test_cpu/uncore.json b/tools/perf/pmu-events/arch/test/test_soc/cpu/uncore.json
>> similarity index 100%
>> rename from tools/perf/pmu-events/arch/test/test_cpu/uncore.json
>> rename to tools/perf/pmu-events/arch/test/test_soc/cpu/uncore.json
>> diff --git a/tools/perf/pmu-events/jevents.c b/tools/perf/pmu-events/jevents.c
>> index 9604446f8360..405bdd36b9b9 100644
>> --- a/tools/perf/pmu-events/jevents.c
>> +++ b/tools/perf/pmu-events/jevents.c
>> @@ -814,7 +814,7 @@ static void print_mapping_test_table(FILE *outfp)
>>   	fprintf(outfp, "\t.cpuid = \"testcpu\",\n");
>>   	fprintf(outfp, "\t.version = \"v1\",\n");
>>   	fprintf(outfp, "\t.type = \"core\",\n");
>> -	fprintf(outfp, "\t.table = pme_test_cpu,\n");
>> +	fprintf(outfp, "\t.table = pme_test_soc_cpu,\n");
> Humm, is this already generated by some script? I.e. this
> 'pme_test_soc_cpu' table? Or does this works only when applying the full
> patchset?

So I think we need something like this:

----->8--------

 From a08df563665e9ec088b1af86ceed058497e112a4 Mon Sep 17 00:00:00 2001
From: John Garry <john.garry@...wei.com>
Date: Tue, 3 Aug 2021 08:44:09 +0100
Subject: [PATCH] perf jevents: Make build dependency on test JSONs

Currently all JSONs and the mapfile for an arch are dependencies for
building pmu-events.c

The test JSONs are missing as a dependency, so add them.

Signed-off-by: John Garry <john.garry@...wei.com>

diff --git a/tools/perf/pmu-events/Build b/tools/perf/pmu-events/Build
index 215ba30b8534..a055dee6a46a 100644
--- a/tools/perf/pmu-events/Build
+++ b/tools/perf/pmu-events/Build
@@ -6,10 +6,13 @@ pmu-events-y	+= pmu-events.o
  JDIR		=  pmu-events/arch/$(SRCARCH)
  JSON		=  $(shell [ -d $(JDIR) ] &&				\
  			find $(JDIR) -name '*.json' -o -name 'mapfile.csv')
+JDIR_TEST	=  pmu-events/arch/test
+JSON_TEST	=  $(shell [ -d $(JDIR_TEST) ] &&			\
+			find $(JDIR_TEST) -name '*.json')

  #
  # Locate/process JSON files in pmu-events/arch/
  # directory and create tables in pmu-events.c.
  #
-$(OUTPUT)pmu-events/pmu-events.c: $(JSON) $(JEVENTS)
+$(OUTPUT)pmu-events/pmu-events.c: $(JSON) $(JSON_TEST) $(JEVENTS)
  	$(Q)$(call echo-cmd,gen)$(JEVENTS) $(SRCARCH) pmu-events/arch 
$(OUTPUT)pmu-events/pmu-events.c $(V)


-----8<-----

Thanks,
john

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ