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: Mon, 3 Jun 2024 08:46:49 -0700
From: Ian Rogers <irogers@...gle.com>
To: Oliver Sang <oliver.sang@...el.com>
Cc: oe-lkp@...ts.linux.dev, lkp@...el.com, linux-perf-users@...r.kernel.org, 
	linux-kernel@...r.kernel.org, Weilin Wang <weilin.wang@...el.com>, 
	Peter Zijlstra <peterz@...radead.org>, Ingo Molnar <mingo@...hat.com>, 
	Arnaldo Carvalho de Melo <acme@...nel.org>, Namhyung Kim <namhyung@...nel.org>, 
	Mark Rutland <mark.rutland@....com>, 
	Alexander Shishkin <alexander.shishkin@...ux.intel.com>, Jiri Olsa <jolsa@...nel.org>, 
	Adrian Hunter <adrian.hunter@...el.com>, Kan Liang <kan.liang@...ux.intel.com>, 
	Jing Zhang <renyu.zj@...ux.alibaba.com>, John Garry <john.g.garry@...cle.com>, 
	Sandipan Das <sandipan.das@....com>
Subject: Re: [PATCH v2 2/2] perf jevents: Autogenerate empty-pmu-events.c

On Mon, Jun 3, 2024 at 7:19 AM Oliver Sang <oliver.sang@...el.com> wrote:
>
> hi, Ian,
>
> On Fri, May 31, 2024 at 09:38:01AM -0700, Ian Rogers wrote:
> > On Fri, May 31, 2024 at 1:16 AM kernel test robot <oliver.sang@...el.com> wrote:
> > >
> > >
> > > hi, Ian Rogers,
> > >
> > > we actually want to seek your advice. in our env, there is no problem to build
> > > parent.
> > >
> > > * 3249f8b84526d (linux-review/Ian-Rogers/perf-jevents-Autogenerate-empty-pmu-events-c/20240525-093240) perf jevents: Autogenerate empty-pmu-events.c
> > > * 7d88bd0d22746 perf jevents: Use name for special find value   <--- parent
> > >
> > > however, failed to build perf upon 3249f8b84526d. but there is not many useful
> > > information in below detail log.
> > >
> > > is there any dependency or env setting for us to build this commit? Thanks!
> >
> > Hi Oliver,
> >
> > Thanks for the report and the work testing! Seeing the output:
> >
> > [..snip..]
> > > --- pmu-events/empty-pmu-events.c       2024-05-30 08:20:10.000000000 +0000
> > > +++ pmu-events/test-empty-pmu-events.c  2024-05-30 15:55:37.332495538 +0000
> > > @@ -136,7 +136,7 @@
> > >  { 2623 }, /* M3\000\0001 / M3\000\000\000\000\000\000\000\00000 */
> > >  { 2078 }, /* cache_miss_cycles\000group1\000dcache_miss_cpi + icache_miss_cycles\000\000\000\000\000\000\000\00000 */
> > >  { 1947 }, /* dcache_miss_cpi\000\000l1d\\-loads\\-misses / inst_retired.any\000\000\000\000\000\000\000\00000 */
> > > -{ 2011 }, /* icache_miss_cycles\000\000l1i\\-loads\\-misses / inst_retiredany\000\000\000\000\000\000\000\00000 */
> > > +{ 2011 }, /* icache_miss_cycles\000\000l1i\\-loads\\-misses / inst_retired.any\000\000\000\000\000\000\000\00000 */
> > >
> > >  };
> > >
> > > @@ -373,7 +373,7 @@
> > [..snip..]
> >
> > It appears the version of empty-pmu-events.c the patch adds and the
> > version generated in your test configuration are differing because of
> > whitespace. Perhaps a hex editor will show what the exact difference
> > is, it must relate to locales or something. Like you mention this
> > could be resolved by an env change.
> >
> > > The kernel config and materials to reproduce are available at:
> > > https://download.01.org/0day-ci/archive/20240531/202405311548.1e881dea-oliver.sang@intel.com
> >
> > I didn't see the generated test-empty-pmu-events.c there and so
> > couldn't follow up on the locale/env exploration. I wonder that a
> > suitable workaround is to change from the patch:
> >
> > +$(EMPTY_PMU_EVENTS_TEST_LOG): $(EMPTY_PMU_EVENTS_C) $(TEST_EMPTY_PMU_EVENTS_C)
> > +       $(call rule_mkdir)
> > +       $(Q)$(call echo-cmd,test)diff -u $? 2> $@ || (cat $@ && false)
> >
> > to instead of invoking "diff -u" to invoke "diff -w -u", that is to
> > ignore whitespace. I can send a v3 with this.
>
> I tried below patch
>
> commit a79a41133a41adc2d69c8f603c7d880b3796cbf7
> Author: 0day robot <lkp@...el.com>
> Date:   Mon Jun 3 16:35:45 2024 +0800
>
>     fix from Ian Rogers: invoke "diff -w -u" instead of "diff -u"
>
> diff --git a/tools/perf/pmu-events/Build b/tools/perf/pmu-events/Build
> index c3fa43c497069..54d19b492db5c 100644
> --- a/tools/perf/pmu-events/Build
> +++ b/tools/perf/pmu-events/Build
> @@ -39,7 +39,7 @@ $(TEST_EMPTY_PMU_EVENTS_C): $(JSON) $(JSON_TEST) $(JEVENTS_PY) $(METRIC_PY) $(ME
>
>  $(EMPTY_PMU_EVENTS_TEST_LOG): $(EMPTY_PMU_EVENTS_C) $(TEST_EMPTY_PMU_EVENTS_C)
>         $(call rule_mkdir)
> -       $(Q)$(call echo-cmd,test)diff -u $? 2> $@ || (cat $@ && false)
> +       $(Q)$(call echo-cmd,test)diff -w -u $? 2> $@ || (cat $@ && false)
>
>  $(PMU_EVENTS_C): $(JSON) $(JSON_TEST) $(JEVENTS_PY) $(METRIC_PY) $(METRIC_TEST_LOG) $(EMPTY_PMU_EVENTS_TEST_LOG)
>         $(call rule_mkdir)
>
>
> but make still failed. I still saw below in our build log
>
> --- pmu-events/empty-pmu-events.c       2024-06-03 08:41:16.000000000 +0000
> +++ pmu-events/test-empty-pmu-events.c  2024-06-03 13:47:19.522463482 +0000
> @@ -136,7 +136,7 @@
>  { 2623 }, /* M3\000\0001 / M3\000\000\000\000\000\000\000\00000 */
>  { 2078 }, /* cache_miss_cycles\000group1\000dcache_miss_cpi + icache_miss_cycles\000\000\000\000\000\000\000\00000 */
>  { 1947 }, /* dcache_miss_cpi\000\000l1d\\-loads\\-misses / inst_retired.any\000\000\000\000\000\000\000\00000 */
> -{ 2011 }, /* icache_miss_cycles\000\000l1i\\-loads\\-misses / inst_retiredany\000\000\000\000\000\000\000\00000 */
> +{ 2011 }, /* icache_miss_cycles\000\000l1i\\-loads\\-misses / inst_retired.any\000\000\000\000\000\000\000\00000 */
>
>  };
>
>
> I will try to get generated test-empty-pmu-events.c tomorrow.

Thanks Oliver, if you could get the environment variables that would
probably also be useful.

Ian

> >
> > Thanks,
> > Ian

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ