On Wed, Apr 1, 2020 at 1:35 PM Kajol Jain wrote:
>
> Patch enhances current metric infrastructure to handle "?" in the metric
> expression. The "?" can be use for parameters whose value not known while
> creating metric events and which can be replace later at runtime to
> the proper value. It als
On Fri, Sep 8, 2023 at 7:51 AM Athira Rajeev
wrote:
>
> Makefile.perf uses "CONFIG_*" checks in the code. Example the config
> for libtraceevent is used to set PYTHON_EXT_SRCS
>
> ifeq ($(CONFIG_LIBTRACEEVENT),y)
> PYTHON_EXT_SRCS := $(shell grep -v ^\# util/python-ext-sources)
>
.config. Include the file
> ".config-detected" so that make will use the system detected
> configuration in the CONFIG checks. This will fix isues that
> could arise when other "CONFIG_*" checks are added to Makefile.perf
> in future as well.
>
> Signed-off-
On Tue, Jun 13, 2023 at 10:04 AM Athira Rajeev
wrote:
>
> From: Aditya Gupta
>
> Test "perf script task-analyzer tests" fails in environment with missing
> libtraceevent support, as perf record fails to create the perf.data
> file, which further tests depend on.
>
> Instead, when perf is not comp
code from tools/perf/trace/beauty.
> > Other patches are fixes for scripts from tools/perf/tests.
> >
> > The shellcheck is run for severity level for errors and warnings.
> > Command used:
> >
> > # for F in $(find tests/shell/ -perm -o=x -name '*.sh'); do s
ke NO_LIBTRACEEVENT=1'),
> > 'perf version --build-options' outputs (output trimmed):
> >
> >...
> > libtraceevent: [ OFF ] # HAVE_LIBTRACEEVENT
> >...
> >
> > While, when perf is compiled WITH libtraceevent,
> >
> >
On Thu, Aug 17, 2023 at 10:35 AM Athira Rajeev
wrote:
>
>
>
> > On 07-Aug-2023, at 11:07 AM, Sachin Sant wrote:
> >
> >
> >
> >> On 07-Aug-2023, at 10:22 AM, Athira Rajeev
> >> wrote:
> >>
> >> The test "BPF prologue generation" fails as below:
> >>
> >> Writing event: p:perf_bpf_probe/func _t
On Sun, Aug 6, 2023 at 9:50 PM Athira Rajeev
wrote:
>
> Testcase "Parsing of all PMU events from sysfs" parse events for
> all PMUs, and not just cpu. In case of powerpc, the PowerVM
> environment supports events from hv_24x7 and hv_gpci PMU which
> is of example format like below:
>
> - hv_24x7/C
On Wed, Aug 23, 2023 at 4:00 AM Naveen N Rao wrote:
>
> Hi Kajol,
>
> On Wed Aug 23, 2023 at 1:21 PM IST, Kajol Jain wrote:
> > Based on commit 7d54a4acd8c1 ("perf test: Skip watchpoint
> > tests if no watchpoints available"), hardware breakpoints
> > are not available for power9 platform and beca
#x27;commit b50d691e50e6 ("perf test: Fix "all PMU test" to skip
> parametrized events")' which handled a simialr instance with
> "all PMU test".
>
> Fix parse-events test to skip parametrized events since
> it needs proper setup of the parameters.
>
>
On Thu, Sep 7, 2023 at 10:19 AM Athira Rajeev
wrote:
>
> Makefile.perf uses "CONFIG_*" checks in the code. Example the config
> for libtraceevent is used to set PYTHON_EXT_SRCS
>
> ifeq ($(CONFIG_LIBTRACEEVENT),y)
> PYTHON_EXT_SRCS := $(shell grep -v ^\# util/python-ext-sources)
k SC1090 to handle the location of sourced
> files
> tests/shell: Fix shellcheck issues in tests/shell/stat+shadow_stat.sh
> tetscase
> tests/shell: Fix shellcheck warnings for SC2153 in multiple scripts
Series:
Tested-by: Ian Rogers
Thanks,
Ian
> tool
On Thu, Sep 22, 2022 at 12:15 PM Arnaldo Carvalho de Melo
wrote:
>
> Em Wed, Sep 21, 2022 at 10:38:38PM +0530, Athira Rajeev escreveu:
> > The perf test named “build id cache operations” skips with below
> > error on some distros:
>
> I wonder if we shouldn't instead state that bash is needed?
>
>
On Thu, Sep 29, 2022 at 5:56 AM James Clark wrote:
>
>
>
> On 29/09/2022 09:49, Athira Rajeev wrote:
> >
> >
> >> On 28-Sep-2022, at 9:05 PM, James Clark wrote:
> >>
> >>
> >>
> >
> > Hi James,
> >
> > Thanks for looking at the patch and sharing review comments.
> >
> >> On 13/09/2022 12:57, Athi
On Mon, Oct 3, 2022 at 7:03 AM atrajeev wrote:
>
> On 2022-10-02 05:17, Ian Rogers wrote:
> > On Thu, Sep 29, 2022 at 5:56 AM James Clark
> > wrote:
> >>
> >>
> >>
> >> On 29/09/2022 09:49, Athira Rajeev wrote:
> >>
On Tue, Oct 4, 2022, 12:06 AM Athira Rajeev
wrote:
>
>
> > On 04-Oct-2022, at 12:21 AM, Ian Rogers wrote:
> >
> > On Mon, Oct 3, 2022 at 7:03 AM atrajeev
> wrote:
> >>
> >> On 2022-10-02 05:17, Ian Rogers wrote:
> >>>
test child finished with 0
> end
> probe libc's inet_pton & backtrace it with ping: Ok
>
> Output where gaih_inet function is present
>
> # ./perf test -v "probe libc's inet_pton & backtrace it with ping"
>
On Thu, Nov 23, 2023 at 8:01 AM Athira Rajeev
wrote:
>
> Running "perf list" on powerpc fails with segfault
> as below:
>
>./perf list
>Segmentation fault (core dumped)
>
> This happens because of duplicate events in the json list.
> The powerpc Json event list contains some event with sam
On Mon, Dec 4, 2023 at 12:22 PM Arnaldo Carvalho de Melo
wrote:
>
> Em Mon, Dec 04, 2023 at 05:20:46PM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Mon, Dec 04, 2023 at 12:12:54PM -0800, Ian Rogers escreveu:
> > > On Thu, Nov 23, 2023 at 8:01 AM Athir
On Tue, Dec 5, 2023 at 1:50 PM Arnaldo Carvalho de Melo wrote:
>
> Em Mon, Nov 27, 2023 at 11:12:57AM +, James Clark escreveu:
> > On 23/11/2023 16:02, Athira Rajeev wrote:
> > > --- a/tools/perf/Makefile.perf
> > > @@ -1134,6 +1152,7 @@ bpf-skel-clean:
> > > $(call QUIET_CLEAN, bpf-skel)
On Wed, Dec 21, 2022 at 2:34 PM Ian Rogers wrote:
>
> Add an optimization to jevents using the metric code, rewrite metrics
> in terms of each other in order to minimize size and improve
> readability. For example, on Power8
> other_stall_cpi is rewritten from:
&g
On Mon, Jan 23, 2023 at 7:16 AM John Garry wrote:
>
> On 21/12/2022 22:34, Ian Rogers wrote:
> > Previously both events and metrics were encoded in struct
> > pmu_event. Create a new pmu_metric that has the metric related
> > variables and remove these from pmu_
On Mon, Jan 23, 2023 at 7:36 AM John Garry wrote:
>
> On 21/12/2022 22:34, Ian Rogers wrote:
> > Add a metrics table that is just a cast from pmu_events_table. This
> > changes the APIs so that event and metric usage of the underlying
> > table is different. Later changes
On Mon, Jan 23, 2023 at 7:18 AM John Garry wrote:
>
> On 21/12/2022 22:34, Ian Rogers wrote:
> > Turn a perf json event into an event, metric or both. This reduces the
> > number of events needed to scan to find an event or metric. As events
> > no longer need the relat
On Mon, Jan 23, 2023 at 5:26 AM John Garry wrote:
>
> On 21/12/2022 22:34, Ian Rogers wrote:
> > Add an optimization to jevents using the metric code, rewrite metrics
> > in terms of each other in order to minimize size and improve
> > readability. For example, on Power
ents breakage and then later fix is
avoided in this series too.
v2. Rebase. Modify the code that skips rewriting a metric with the
same name with itself, to make the name check case insensitive.
Ian Rogers (11):
perf jevents metric: Correct Function equality
perf jevents metric: Add abil
rhs may not be defined, say for source_count, so add a guard.
Signed-off-by: Ian Rogers
---
tools/perf/pmu-events/metric.py | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/perf/pmu-events/metric.py b/tools/perf/pmu-events/metric.py
index 4797ed4fd817
Add RewriteMetricsInTermsOfOthers that iterates over pairs of names
and expressions trying to replace an expression, within the current
expression, with its name.
Signed-off-by: Ian Rogers
---
tools/perf/pmu-events/metric.py | 73 +++-
tools/perf/pmu-events
on Power9.
To avoid recomputation decorate the function with a cache.
Signed-off-by: Ian Rogers
---
tools/perf/pmu-events/jevents.py | 21 -
1 file changed, 16 insertions(+), 5 deletions(-)
diff --git a/tools/perf/pmu-events/jevents.py b/tools/perf/pmu-events/jevents.p
only events.
Signed-off-by: Ian Rogers
---
tools/perf/arch/powerpc/util/header.c| 4 +-
tools/perf/pmu-events/empty-pmu-events.c | 49 ++-
tools/perf/pmu-events/jevents.py | 62 -
tools/perf/pmu-events/pmu-events.h | 26
tools/perf/tests/pmu-events.c
Separate the event and metric table when building without jevents. Add
find_core_metrics_table and perf_pmu__find_metrics_table while
renaming existing utilities to be event specific, so that users can
find the right table for their need.
Signed-off-by: Ian Rogers
---
tools/perf/pmu-events
or metrics [2] but given the lack of use of such a feature,
let's clean the code and just remove.
[1] https://lore.kernel.org/lkml/20220707195610.303254-1-irog...@google.com/
[2]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/perf/util/stat-shadow.c?id=01
Metrics are their own unit and these variables held broken metrics
previously and now just hold the value NULL. Remove code that used
these variables.
Reviewed-by: John Garry
Signed-off-by: Ian Rogers
---
tools/perf/builtin-stat.c | 1 -
tools/perf/util/cgroup.c | 1 -
tools/perf
Combine into a single function to simplify, in a later change, writing
metrics separately.
Signed-off-by: Ian Rogers
---
tools/perf/pmu-events/jevents.py | 36 +---
1 file changed, 14 insertions(+), 22 deletions(-)
diff --git a/tools/perf/pmu-events/jevents.py b
Add a metrics table that is just a cast from pmu_events_table. This
changes the APIs so that event and metric usage of the underlying
table is different. For the no jevents case the tables are already
separate, later changes will separate the tables for the jevents case.
Signed-off-by: Ian Rogers
, for the test PMU architecture pme_test_soc_cpu is renamed
pmu_events__test_soc_cpu for consistency with the event vs metric
naming convention.
Signed-off-by: Ian Rogers
---
tools/perf/pmu-events/jevents.py | 244 +++
tools/perf/tests/pmu-events.c| 3 +-
2
This allows the set of generated jevents events and metrics be limited
to a subset of the model names. Appropriate if trying to minimize the
binary size where only a set of models are possible. On ARM64 the
--model selects the implementor rather than model.
Signed-off-by: Ian Rogers
---
tools
wed-by
John Garry and Kajol
Jain.
v3. Rebase an incorporate review comments from John Garry
, in particular breaking apart patch 4
into 3 patches. The no jevents breakage and then later fix is
avoided in this series too.
v2. Rebase. Modify the code that skips rewriting a metric w
rhs may not be defined, say for source_count, so add a guard.
Reviewed-by: Kajol Jain
Signed-off-by: Ian Rogers
---
tools/perf/pmu-events/metric.py | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/perf/pmu-events/metric.py b/tools/perf/pmu-events/metric.py
index
Add RewriteMetricsInTermsOfOthers that iterates over pairs of names
and expressions trying to replace an expression, within the current
expression, with its name.
Signed-off-by: Ian Rogers
---
tools/perf/pmu-events/metric.py | 73 +++-
tools/perf/pmu-events
on Power9.
To avoid recomputation decorate the function with a cache.
Signed-off-by: Ian Rogers
---
tools/perf/pmu-events/jevents.py | 21 -
1 file changed, 16 insertions(+), 5 deletions(-)
diff --git a/tools/perf/pmu-events/jevents.py b/tools/perf/pmu-events/jevents.p
only events.
Reviewed-by: John Garry
Signed-off-by: Ian Rogers
---
tools/perf/arch/powerpc/util/header.c| 4 +-
tools/perf/pmu-events/empty-pmu-events.c | 49 ++-
tools/perf/pmu-events/jevents.py | 62 -
tools/perf/pmu-events/pmu-events.h | 26
tools/perf
Separate the event and metric table when building without jevents. Add
find_core_metrics_table and perf_pmu__find_metrics_table while
renaming existing utilities to be event specific, so that users can
find the right table for their need.
Reviewed-by: John Garry
Signed-off-by: Ian Rogers
738f42f96a130079bc951b3cc78c5b8a#n425
Reviewed-by: John Garry
Signed-off-by: Ian Rogers
---
tools/perf/builtin-list.c | 20 ++---
tools/perf/pmu-events/jevents.py | 20 +
tools/perf/pmu-events/pmu-events.h | 22 +--
tools/perf/tests/pmu-even
Metrics are their own unit and these variables held broken metrics
previously and now just hold the value NULL. Remove code that used
these variables.
Reviewed-by: John Garry
Signed-off-by: Ian Rogers
---
tools/perf/builtin-stat.c | 1 -
tools/perf/util/cgroup.c | 1 -
tools/perf
Combine into a single function to simplify, in a later change, writing
metrics separately.
Signed-off-by: Ian Rogers
---
tools/perf/pmu-events/jevents.py | 36 +---
1 file changed, 14 insertions(+), 22 deletions(-)
diff --git a/tools/perf/pmu-events/jevents.py b
Add a metrics table that is just a cast from pmu_events_table. This
changes the APIs so that event and metric usage of the underlying
table is different. For the no jevents case the tables are already
separate, later changes will separate the tables for the jevents case.
Signed-off-by: Ian Rogers
, for the test PMU architecture pme_test_soc_cpu is renamed
pmu_events__test_soc_cpu for consistency with the event vs metric
naming convention.
Signed-off-by: Ian Rogers
---
tools/perf/pmu-events/jevents.py | 244 +++
tools/perf/tests/pmu-events.c| 3 +-
2
This allows the set of generated jevents events and metrics be limited
to a subset of the model names. Appropriate if trying to minimize the
binary size where only a set of models are possible.
Signed-off-by: Ian Rogers
---
tools/perf/pmu-events/Build | 3 ++-
tools/perf/pmu-events
test.
Fixes: acef233b7ca7 ("perf pmu: Add #slots literal support for arm64")
Signed-off-by: Ian Rogers
---
tools/perf/tests/pmu-events.c | 1 +
tools/perf/util/expr.h| 1 +
tools/perf/util/expr.l| 8 +---
3 files changed, 7 insertions(+), 3 deletions(-)
diff --g
On Thu, Jan 26, 2023 at 7:59 AM John Garry wrote:
>
> On 26/01/2023 01:18, Ian Rogers wrote:
> > Add RewriteMetricsInTermsOfOthers that iterates over pairs of names
> > and expressions trying to replace an expression, within the current
> > expression, with its name.
&g
porate review comments from John Garry
, in particular breaking apart patch 4
into 3 patches. The no jevents breakage and then later fix is
avoided in this series too.
v2. Rebase. Modify the code that skips rewriting a metric with the
same name with itself, to make the name check
rhs may not be defined, say for source_count, so add a guard.
Reviewed-by: Kajol Jain
---
tools/perf/pmu-events/metric.py | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/perf/pmu-events/metric.py b/tools/perf/pmu-events/metric.py
index 4797ed4fd817..2f2fd220e843 10
Add RewriteMetricsInTermsOfOthers that iterates over pairs of names
and expressions trying to replace an expression, within the current
expression, with its name.
---
tools/perf/pmu-events/metric.py | 73 +++-
tools/perf/pmu-events/metric_test.py | 10
2 files cha
Rewrite metrics within the same file in terms of each other. For example, on
Power8
other_stall_cpi is rewritten from:
"PM_CMPLU_STALL / PM_RUN_INST_CMPL - PM_CMPLU_STALL_BRU_CRU / PM_RUN_INST_CMPL
- PM_CMPLU_STALL_FXU / PM_RUN_INST_CMPL - PM_CMPLU_STALL_VSU / PM_RUN_INST_CMPL
- PM_CMPLU_STALL_L
Create a new pmu_metric for the metric related variables from
pmu_event but that is initially just a clone of pmu_event. Add
iterators for pmu_metric and use in places that metrics are desired
rather than events. Make the event iterator skip metric only events,
and the metric iterator skip event on
Separate the event and metric table when building without jevents. Add
find_core_metrics_table and perf_pmu__find_metrics_table while
renaming existing utilities to be event specific, so that users can
find the right table for their need.
Reviewed-by: John Garry
---
tools/perf/pmu-events/empty-p
Previous changes separated the uses of pmu_event and pmu_metric,
however, both structures contained all the variables of event and
metric. This change removes the event variables from metric and the
metric variables from event.
Note, this change removes the setting of evsel's metric_name/expr as
t
Metrics are their own unit and these variables held broken metrics
previously and now just hold the value NULL. Remove code that used
these variables.
Reviewed-by: John Garry
---
tools/perf/builtin-stat.c | 1 -
tools/perf/util/cgroup.c | 1 -
tools/perf/util/evsel.c | 2 -
Combine into a single function to simplify, in a later change, writing
metrics separately.
---
tools/perf/pmu-events/jevents.py | 36 +---
1 file changed, 14 insertions(+), 22 deletions(-)
diff --git a/tools/perf/pmu-events/jevents.py b/tools/perf/pmu-events/jevents.py
Add a metrics table that is just a cast from pmu_events_table. This
changes the APIs so that event and metric usage of the underlying
table is different. For the no jevents case the tables are already
separate, later changes will separate the tables for the jevents case.
---
tools/perf/arch/arm64/
Turn a perf json event into an event, metric or both. This reduces the
number of events needed to scan to find an event or metric. As events
no longer need the relatively seldom used metric fields, 4 bytes is
saved per event. This reduces the big C string's size by 335kb (14.8%)
on x86.
Note, for
This allows the set of generated jevents events and metrics be limited
to a subset of the model names. Appropriate if trying to minimize the
binary size where only a set of models are possible.
---
tools/perf/pmu-events/Build | 3 ++-
tools/perf/pmu-events/jevents.py | 14 ++
2 f
The #slots literal will return NAN when not on ARM64 which causes a
perf test failure when not on an ARM64 for a JEVENTS_ARCH=all build:
..
10.4: Parsing of PMU event table metrics with fake PMUs : FAILED!
..
Add an is_test boolean so that the failure can be avoided when running
as a t
A character encoding issue added a "3D" character that breaks the
metrics test.
Fixes: 40769665b63d ("perf jevents: Parse metrics during conversion")
---
tools/perf/pmu-events/metric_test.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/perf/pmu-events/metric_test.
Add quiet_cmd_test so that:
$(Q)$(call echo-cmd,test)
will print:
TEST
This is useful for executing compile-time tests similar to what
happens for fortify tests in the kernel's lib directory.
---
tools/build/Makefile.build | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/build/Makefi
Add a target that generates a log file for running metric_test.py and
make this a dependency on generating pmu-events.c. The log output is
displayed if the test fails like (the test was modified to make it
fail):
```
TEST/tmp/perf/pmu-events/metric_test.log
F..
==
On Fri, Jan 27, 2023, 5:20 AM John Garry wrote:
> On 26/01/2023 23:36, Ian Rogers wrote:
>
> Hi Ian,
>
> At a glance, none of this series has your Signed-off-by tag..
>
> Thanks,
> John
>
Thanks John, will fix. Is there anything else?
Ian
> Add an optimizati
On Mon, Jan 30, 2023 at 8:07 AM John Garry wrote:
>
> On 26/01/2023 23:36, Ian Rogers wrote:
> > @@ -660,7 +763,29 @@ const struct pmu_events_table
> > *perf_pmu__find_events_table(struct perf_pmu *pmu)
> >
> > const struct pmu_metrics_table *perf_pmu__find_metr
On Mon, Jan 30, 2023 at 7:22 AM John Garry wrote:
>
> On 27/01/2023 13:48, Ian Rogers wrote:
> > On Fri, Jan 27, 2023, 5:20 AM John Garry > <mailto:john.g.ga...@oracle.com>> wrote:
> >
> > On 26/01/2023 23:36, Ian Rogers wrote:
> >
> > Hi I
ARM64 overrides a weak function but a previous change had broken the
build.
Fixes: 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table")
Signed-off-by: Ian Rogers
---
tools/perf/arch/arm64/util/pmu.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/tools/perf/arch/arm64/
On Thu, Feb 2, 2023 at 5:40 PM Ian Rogers wrote:
>
> ARM64 overrides a weak function but a previous change had broken the
> build.
>
> Fixes: 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_table")
As 8cefeb8bd336 ("perf pmu-events: Introduce pmu_metrics_ta
On Fri, Feb 3, 2023 at 8:56 AM Arnaldo Carvalho de Melo wrote:
>
> Em Fri, Feb 03, 2023 at 01:02:02PM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Fri, Feb 03, 2023 at 12:43:48PM -0300, Arnaldo Carvalho de Melo escreveu:
> > > I tried bisecting, but at this cset:
> > >
> > > acme@roc-rk3399-pc
On Fri, Feb 3, 2023 at 12:15 PM Arnaldo Carvalho de Melo
wrote:
>
> Em Thu, Jan 26, 2023 at 03:36:45PM -0800, Ian Rogers escreveu:
> > Add a target that generates a log file for running metric_test.py and
> > make this a dependency on generating pmu-events.c. The log output i
On Tue, Feb 7, 2023 at 7:45 PM kajoljain wrote:
>
>
>
> On 2/6/23 10:10, Athira Rajeev wrote:
> >
> >
> >> On 02-Feb-2023, at 10:14 PM, Kajol Jain wrote:
> >>
> >> Testcase stat_all_metrics.sh fails in powerpc:
> >>
> >> 92: perf all metrics test : FAILED!
> >>
> >> Logs with verbose:
> >>
> >> [
me of the hv-24x7 metric events
> may need bigger workload with system wide monitoring to get the data.
> Fix this issue by changing current system wide check from true workload to
> sleep 0.01 workload.
>
> Result with the patch changes in powerpc:
>
> 98: perf all metrics test
#37.48
> EXECUTION_STALL_CPI
> 1,393,916,546,654 PM_DISP_STALL_CYC
> 8,455,376,836,463 PM_EXEC_STALL
>
> "--metric-no-group" is used for forcing PM_RUN_INST_CMPL to be scheduled
> in all group for more accuracy.
>
> Signed-off-by: A
On Thu, Mar 23, 2023 at 6:11 AM Arnaldo Carvalho de Melo
wrote:
>
> Exception processing pmu-events/arch/powerpc/power9/other.json
> Traceback (most recent call last):
> File "pmu-events/jevents.py", line 997, in
> main()
> File "pmu-events/jevents.py", line 979, in main
> ftw(arch_pa
-events/arch/powerpc/power9/pmc.json:application/json;
> charset=us-ascii
> pmu-events/arch/powerpc/power9/translation.json:application/json;
> charset=us-ascii
>
> Fixes: 3c22ba524304 ("perf vendor events powerpc: Update POWER9 events")
> Reported-by: Ar
On Wed, Nov 2, 2022 at 1:36 AM Athira Rajeev
wrote:
>
>
>
> > On 18-Oct-2022, at 2:26 PM, Athira Rajeev
> > wrote:
> >
> > Perf stat with CSV output option prints an extra empty
> > string as first field in metrics output line.
> > Sample output below:
> >
> > # ./perf stat -x, --per-socke
pr_debug("failed opening event %x\n", attr.bp_type);
> > + }
>
> Do you really need that ?
>
> Can't you directly check errno in the caller ?
errno is very easily clobbered and not clearly set on success - ie,
it'd be better not to do that.
Acked-
ate for operating systems like ChromeOS, that
aim to minimize binary size and know all the target CPU models.
Ian Rogers (9):
perf jevents metric: Correct Function equality
perf jevents metric: Add ability to rewrite metrics in terms of others
perf jevents: Rewrite metrics in the same file wit
rhs may not be defined, say for source_count, so add a guard.
Signed-off-by: Ian Rogers
---
tools/perf/pmu-events/metric.py | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/perf/pmu-events/metric.py b/tools/perf/pmu-events/metric.py
index cc451a265751
Add RewriteMetricsInTermsOfOthers that iterates over pairs of names
and expressions trying to replace an expression, within the current
expression, with its name.
Signed-off-by: Ian Rogers
---
tools/perf/pmu-events/metric.py | 69 +++-
tools/perf/pmu-events
on Power9.
To avoid recomputation decorate the function with a cache.
Signed-off-by: Ian Rogers
---
tools/perf/pmu-events/jevents.py | 21 -
1 file changed, 16 insertions(+), 5 deletions(-)
diff --git a/tools/perf/pmu-events/jevents.py b/tools/perf/pmu-events/jevents.p
quot; to fail as they fail to find necessary metrics. This is
fixed in a later change.
[1] https://lore.kernel.org/lkml/20220707195610.303254-1-irog...@google.com/
[2]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/perf/util/stat-shadow.c?id=01b8957b738f42f96a130079bc
Metrics are their own unit and these variables held broken metrics
previously and now just hold the value NULL. Remove code that used
these variables.
Signed-off-by: Ian Rogers
---
tools/perf/builtin-stat.c | 1 -
tools/perf/util/cgroup.c | 1 -
tools/perf/util/evsel.c | 2
Combine into a single function to simplify, in a later change, writing
metrics separately.
Signed-off-by: Ian Rogers
---
tools/perf/pmu-events/jevents.py | 36 +---
1 file changed, 14 insertions(+), 22 deletions(-)
diff --git a/tools/perf/pmu-events/jevents.py b
: Ok
70: Event expansion for cgroups : Ok
caused by the necessary test metrics not being found.
Signed-off-by: Ian Rogers
---
tools/perf/arch/arm64/util/pmu.c | 23 ++-
tools/perf/pmu-events/empty-pmu-events.c | 52
igned-off-by: Ian Rogers
---
tools/perf/pmu-events/jevents.py | 244 +++
tools/perf/tests/pmu-events.c| 3 +-
2 files changed, 189 insertions(+), 58 deletions(-)
diff --git a/tools/perf/pmu-events/jevents.py b/tools/perf/pmu-events/jevents.py
index be2cf8a
This allows the set of generated jevents events and metrics be limited
to a subset of the model names. Appropriate if trying to minimize the
binary size where only a set of models are possible.
Signed-off-by: Ian Rogers
---
tools/perf/pmu-events/Build | 3 ++-
tools/perf/pmu-events
ated
pmu-metrics.c code. This functionality is appropriate for operating
systems like ChromeOS, that aim to minimize binary size and know all
the target CPU models.
v2. Rebase. Modify the code that skips rewriting a metric with the
same name with itself, to make the name check case insensitive.
rhs may not be defined, say for source_count, so add a guard.
Signed-off-by: Ian Rogers
---
tools/perf/pmu-events/metric.py | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/tools/perf/pmu-events/metric.py b/tools/perf/pmu-events/metric.py
index 4797ed4fd817
Add RewriteMetricsInTermsOfOthers that iterates over pairs of names
and expressions trying to replace an expression, within the current
expression, with its name.
Signed-off-by: Ian Rogers
---
tools/perf/pmu-events/metric.py | 73 +++-
tools/perf/pmu-events
on Power9.
To avoid recomputation decorate the function with a cache.
Signed-off-by: Ian Rogers
---
tools/perf/pmu-events/jevents.py | 21 -
1 file changed, 16 insertions(+), 5 deletions(-)
diff --git a/tools/perf/pmu-events/jevents.py b/tools/perf/pmu-events/jevents.p
quot; to fail as they fail to find necessary metrics. This is
fixed in a later change.
[1] https://lore.kernel.org/lkml/20220707195610.303254-1-irog...@google.com/
[2]
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/tools/perf/util/stat-shadow.c?id=01b8957b738f42f96a130079bc
Metrics are their own unit and these variables held broken metrics
previously and now just hold the value NULL. Remove code that used
these variables.
Signed-off-by: Ian Rogers
---
tools/perf/builtin-stat.c | 1 -
tools/perf/util/cgroup.c | 1 -
tools/perf/util/evsel.c | 2
Combine into a single function to simplify, in a later change, writing
metrics separately.
Signed-off-by: Ian Rogers
---
tools/perf/pmu-events/jevents.py | 36 +---
1 file changed, 14 insertions(+), 22 deletions(-)
diff --git a/tools/perf/pmu-events/jevents.py b
: Ok
70: Event expansion for cgroups : Ok
caused by the necessary test metrics not being found.
Signed-off-by: Ian Rogers
---
tools/perf/arch/arm64/util/pmu.c | 23 ++-
tools/perf/pmu-events/empty-pmu-events.c | 52
igned-off-by: Ian Rogers
---
tools/perf/pmu-events/jevents.py | 244 +++
tools/perf/tests/pmu-events.c| 3 +-
2 files changed, 189 insertions(+), 58 deletions(-)
diff --git a/tools/perf/pmu-events/jevents.py b/tools/perf/pmu-events/jevents.py
index be2cf8a
1 - 100 of 119 matches
Mail list logo