linux-riscv.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Arnaldo Carvalho de Melo <acme@kernel.org>
To: Ian Rogers <irogers@google.com>
Cc: Peter Zijlstra <peterz@infradead.org>,
	Ingo Molnar <mingo@redhat.com>,
	Namhyung Kim <namhyung@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Alexander Shishkin <alexander.shishkin@linux.intel.com>,
	Jiri Olsa <jolsa@kernel.org>,
	Adrian Hunter <adrian.hunter@intel.com>,
	Kan Liang <kan.liang@linux.intel.com>,
	James Clark <james.clark@arm.com>,
	linux-perf-users@vger.kernel.org, linux-kernel@vger.kernel.org,
	bpf@vger.kernel.org, Atish Patra <atishp@rivosinc.com>,
	linux-riscv@lists.infradead.org,
	Beeman Strong <beeman@rivosinc.com>
Subject: Re: [PATCH v2 11/16] perf parse-events: Improve error message for bad numbers
Date: Fri, 26 Apr 2024 22:36:31 -0300	[thread overview]
Message-ID: <ZixWn-ZCBpwH_2xp@x1> (raw)
In-Reply-To: <ZixWfypP4FtKgv0F@x1>

On Fri, Apr 26, 2024 at 10:36:02PM -0300, Arnaldo Carvalho de Melo wrote:
> On Mon, Apr 15, 2024 at 11:15:27PM -0700, Ian Rogers wrote:
> > Use the error handler from the parse_state to give a more informative
> > error message.
> > 
> > Before:
> > ```
> > $ perf stat -e 'cycles/period=99999999999999999999/' true
> > event syntax error: 'cycles/period=99999999999999999999/'
> >                                   \___ parser error
> > Run 'perf list' for a list of valid events
> > 
> >  Usage: perf stat [<options>] [<command>]
> > 
> >     -e, --event <event>   event selector. use 'perf list' to list available events
> > ```
> > 
> > After:
> > ```
> > $ perf stat -e 'cycles/period=99999999999999999999/' true
> > event syntax error: 'cycles/period=99999999999999999999/'
> >                                   \___ parser error
> > 
> 
> This ended up in perf-tools-next, will have to look at what this problem
> is:
> 
>    9    11.46 amazonlinux:2                 : FAIL gcc version 7.3.1 20180712 (Red Hat 7.3.1-17) (GCC) 
>      yy_size_t parse_events_get_leng (yyscan_t yyscanner );
>                ^~~~~~~~~~~~~~~~~~~~~
>     util/parse-events.l:22:5: note: previous declaration of 'parse_events_get_leng' was here
>      int parse_events_get_leng(yyscan_t yyscanner);
>          ^~~~~~~~~~~~~~~~~~~~~
>      yy_size_t parse_events_get_leng  (yyscan_t yyscanner)
>                ^~~~~~~~~~~~~~~~~~~~~
>     util/parse-events.l:22:5: note: previous declaration of 'parse_events_get_leng' was here
>      int parse_events_get_leng(yyscan_t yyscanner);
>          ^~~~~~~~~~~~~~~~~~~~~
>     make[3]: *** [util] Error 2
> 
> 
> Unsure if this will appear on the radar on other distros, maybe this is
> just something that pops up with older distros...
> 
> Ran out of time today...

Context:

perfbuilder@number:~$ export BUILD_TARBALL=http://192.168.86.42/perf/perf-6.9.0-rc5.tar.xz
perfbuilder@number:~$ time dm
   1   102.33 almalinux:8                   : Ok   gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-20) , clang version 16.0.6 (Red Hat 16.0.6-2.module_el8.9.0+3621+df7f7146) flex 2.6.1
   2   102.44 almalinux:9                   : Ok   gcc (GCC) 11.4.1 20230605 (Red Hat 11.4.1-2) , clang version 16.0.6 (Red Hat 16.0.6-1.el9) flex 2.6.4
   3   124.34 alpine:3.15                   : Ok   gcc (Alpine 10.3.1_git20211027) 10.3.1 20211027 , Alpine clang version 12.0.1 flex 2.6.4
   4   109.42 alpine:3.16                   : Ok   gcc (Alpine 11.2.1_git20220219) 11.2.1 20220219 , Alpine clang version 13.0.1 flex 2.6.4
   5    90.08 alpine:3.17                   : Ok   gcc (Alpine 12.2.1_git20220924-r4) 12.2.1 20220924 , Alpine clang version 15.0.7 flex 2.6.4
   6    84.85 alpine:3.18                   : Ok   gcc (Alpine 12.2.1_git20220924-r10) 12.2.1 20220924 , Alpine clang version 16.0.6 flex 2.6.4
   7    94.18 alpine:3.19                   : Ok   gcc (Alpine 13.2.1_git20231014) 13.2.1 20231014 , Alpine clang version 17.0.5 flex 2.6.4
   8    95.45 alpine:edge                   : Ok   gcc (Alpine 13.2.1_git20240309) 13.2.1 20240309 , Alpine clang version 17.0.6 flex 2.6.4
   9    11.46 amazonlinux:2                 : FAIL gcc version 7.3.1 20180712 (Red Hat 7.3.1-17) (GCC) 
     yy_size_t parse_events_get_leng (yyscan_t yyscanner );
               ^~~~~~~~~~~~~~~~~~~~~
    util/parse-events.l:22:5: note: previous declaration of 'parse_events_get_leng' was here
     int parse_events_get_leng(yyscan_t yyscanner);
         ^~~~~~~~~~~~~~~~~~~~~
     yy_size_t parse_events_get_leng  (yyscan_t yyscanner)
               ^~~~~~~~~~~~~~~~~~~~~
    util/parse-events.l:22:5: note: previous declaration of 'parse_events_get_leng' was here
     int parse_events_get_leng(yyscan_t yyscanner);
         ^~~~~~~~~~~~~~~~~~~~~
    make[3]: *** [util] Error 2
  10    88.41 amazonlinux:2023              : Ok   gcc (GCC) 11.4.1 20230605 (Red Hat 11.4.1-2) , clang version 15.0.7 (Amazon Linux 15.0.7-3.amzn2023.0.1) flex 2.6.4
  11    89.72 amazonlinux:devel             : Ok   gcc (GCC) 11.3.1 20221121 (Red Hat 11.3.1-4) , clang version 15.0.6 (Amazon Linux 15.0.6-3.amzn2023.0.2) flex 2.6.4
  12   115.65 archlinux:base                : Ok   gcc (GCC) 13.2.1 20230801 , clang version 17.0.6 flex 2.6.4
  13    93.87 centos:stream                 : Ok   gcc (GCC) 8.5.0 20210514 (Red Hat 8.5.0-21) , clang version 17.0.6 (Red Hat 17.0.6-1.module_el8+767+9fa966b8) flex 2.6.1

_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  reply	other threads:[~2024-04-27  1:36 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-16  6:15 [PATCH v2 00/16] Consistently prefer sysfs/json events Ian Rogers
2024-04-16  6:15 ` [PATCH v2 01/16] perf parse-events: Factor out '<event_or_pmu>/.../' parsing Ian Rogers
2024-04-16  6:15 ` [PATCH v2 02/16] perf parse-events: Directly pass PMU to parse_events_add_pmu Ian Rogers
2024-04-16  6:15 ` [PATCH v2 03/16] perf parse-events: Avoid copying an empty list Ian Rogers
2024-04-16  6:15 ` [PATCH v2 04/16] perf pmu: Refactor perf_pmu__match Ian Rogers
2024-04-16  6:15 ` [PATCH v2 05/16] perf tests parse-events: Use branches rather than cache-references Ian Rogers
2024-04-16  6:15 ` [PATCH v2 06/16] perf parse-events: Legacy cache names on all PMUs and lower priority Ian Rogers
2024-04-16  6:15 ` [PATCH v2 07/16] perf parse-events: Handle PE_TERM_HW in name_or_raw Ian Rogers
2024-04-16  6:15 ` [PATCH v2 08/16] perf parse-events: Constify parse_events_add_numeric Ian Rogers
2024-04-16  6:15 ` [PATCH v2 09/16] perf parse-events: Prefer sysfs/json hardware events over legacy Ian Rogers
2024-04-16  6:15 ` [PATCH v2 10/16] perf parse-events: Inline parse_events_update_lists Ian Rogers
2024-04-16  6:15 ` [PATCH v2 11/16] perf parse-events: Improve error message for bad numbers Ian Rogers
2024-04-18 20:27   ` Liang, Kan
2024-04-18 21:07     ` Ian Rogers
2024-04-19 13:29       ` Liang, Kan
2024-04-27  1:35   ` Arnaldo Carvalho de Melo
2024-04-27  1:36     ` Arnaldo Carvalho de Melo [this message]
2024-04-27 22:05       ` Ian Rogers
2024-04-16  6:15 ` [PATCH v2 12/16] perf parse-events: Inline parse_events_evlist_error Ian Rogers
2024-04-16  6:15 ` [PATCH v2 13/16] perf parse-events: Improvements to modifier parsing Ian Rogers
2024-04-18 20:32   ` Liang, Kan
2024-04-19  6:22     ` Ian Rogers
2024-04-19 13:20       ` Liang, Kan
2024-04-24 15:18         ` Ian Rogers
2024-04-24 15:30           ` Liang, Kan
2024-04-16  6:15 ` [PATCH v2 14/16] perf parse-event: Constify event_symbol arrays Ian Rogers
2024-04-16  6:15 ` [PATCH v2 15/16] perf parse-events: Minor grouping tidy up Ian Rogers
2024-04-16  6:15 ` [PATCH v2 16/16] perf parse-events: Tidy the setting of the default event name Ian Rogers
2024-04-24  0:28 ` [PATCH v2 00/16] Consistently prefer sysfs/json events Atish Kumar Patra
2024-04-24 15:14   ` Ian Rogers
2024-04-24 15:34 ` Liang, Kan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ZixWn-ZCBpwH_2xp@x1 \
    --to=acme@kernel.org \
    --cc=adrian.hunter@intel.com \
    --cc=alexander.shishkin@linux.intel.com \
    --cc=atishp@rivosinc.com \
    --cc=beeman@rivosinc.com \
    --cc=bpf@vger.kernel.org \
    --cc=irogers@google.com \
    --cc=james.clark@arm.com \
    --cc=jolsa@kernel.org \
    --cc=kan.liang@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-perf-users@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=namhyung@kernel.org \
    --cc=peterz@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).