From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ian Rogers Subject: Re: [PATCH v3 12/12] perf test: improve pmu event metric testing Date: Thu, 30 Apr 2020 07:31:29 -0700 Message-ID: References: <20200430075144.132716-1-irogers@google.com> <20200430075144.132716-13-irogers@google.com> <6a3d68fd-c489-c0d5-8612-69f15be1bf64@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: In-Reply-To: <6a3d68fd-c489-c0d5-8612-69f15be1bf64@huawei.com> Sender: linux-kernel-owner@vger.kernel.org To: John Garry Cc: Peter Zijlstra , Ingo Molnar , Arnaldo Carvalho de Melo , Mark Rutland , Alexander Shishkin , Jiri Olsa , Namhyung Kim , Kan Liang , Andi Kleen , Haiyan Song , Jin Yao , Song Liu , Ravi Bangoria , Leo Yan , Adrian Hunter , Paul Clarke , "linux-kernel@vger.kernel.org" , kajoljain , "linux-perf-users@vger.kernel.org" List-Id: linux-perf-users.vger.kernel.org On Thu, Apr 30, 2020 at 4:44 AM John Garry wrote: > > On 30/04/2020 08:51, Ian Rogers wrote: > > Add a basic floating point number test to expr. > > Break pmu-events test into 2 and add a test to verify that all pmu metric > > expressions simply parse. > > Could we add also add something in jevents to ensure this? I think it is an interesting possibility. Instead of strings we could also parse the metrics into C functions, that could cause build time errors at least for the simple expressions. An issue I've faced is that if jevents fails, such as a json parse error, it has an exit code of 0 and creates an empty map file. This allows the build to proceed but with the pmu-events functionality broken. I'd prefer a build to fail as early as possible. Thanks, Ian > Thanks, > John > > Try to parse all metric ids/events, failing if > > metrics for the current architecture fail to parse. > >