1. 06 Oct, 2022 36 commits
    • Namhyung Kim's avatar
      perf tools: Add evlist__add_sched_switch() · 182bb594
      Namhyung Kim authored
      Add a help to create a system-wide sched_switch event.  One merit is
      that it sets the system-wide bit before adding it to evlist so that
      the libperf can handle the cpu and thread maps correctly.
      Reviewed-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/r/20221003204647.1481128-5-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      182bb594
    • Namhyung Kim's avatar
      perf tools: Get rid of evlist__add_on_all_cpus() · 60ea006f
      Namhyung Kim authored
      The cpu and thread maps are properly handled in libperf now.  No need to
      do it in the perf tools anymore.  Let's remove the logic.
      Reviewed-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/r/20221003204647.1481128-4-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      60ea006f
    • Namhyung Kim's avatar
      libperf: Propagate maps only if necessary · 7e2450bb
      Namhyung Kim authored
      The current code propagate evsel's cpu map settings to evlist when it's
      added to an evlist.  But the evlist->all_cpus and each evsel's cpus will
      be updated in perf_evlist__set_maps() later.  No need to do it before
      evlist's cpus are set actually.
      
      In fact it discards this intermediate all_cpus maps at the beginning
      of perf_evlist__set_maps().  Let's not do this.  It's only needed when
      an evsel is added after the evlist cpu/thread maps are set.
      Reviewed-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/r/20221003204647.1481128-3-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      7e2450bb
    • Namhyung Kim's avatar
      libperf: Populate system-wide evsel maps · 06b552ee
      Namhyung Kim authored
      Setting proper cpu and thread maps for system wide evsels regardless of
      user requested cpu in __perf_evlist__propagate_maps().  Those evsels
      need to be active on all cpus always.  Do it in the libperf so that we
      can guarantee it has proper maps.
      Reviewed-by: default avatarAdrian Hunter <adrian.hunter@intel.com>
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@kernel.org>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Leo Yan <leo.yan@linaro.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/r/20221003204647.1481128-2-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      06b552ee
    • Ian Rogers's avatar
      perf vendor events: Update Intel broadwellde · d7184d94
      Ian Rogers authored
      Events remain at v23, and the metrics are based on TMA 4.4 full.
      
      Use script at:
      https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py
      with updates at:
      https://github.com/captain5050/event-converter-for-linux-perf
      
      Updates include:
       - Switch for core metrics from BDX to BDW.
       - Switch for Page_Walks_Utilization to BDX version.
       - Rename of topdown TMA metrics from Frontend_Bound to tma_frontend_bound.
       - Addition of all 6 levels of TMA metrics. Child metrics are placed in
         a group named after their parent allowing children of a metric to
         be easily measured using the metric name with a _group suffix.
       - ## and ##? operators are correctly expanded.
       - The locate-with column is added to the long description describing
         a sampling event.
       - Metrics are written in terms of other metrics to reduce the
         expression size and increase readability.
      
      Tested with 'perf test':
       10: PMU events                                                      :
       10.1: PMU event table sanity                                        : Ok
       10.2: PMU event map aliases                                         : Ok
       10.3: Parsing of PMU event table metrics                            : Ok
       10.4: Parsing of PMU event table metrics with fake PMUs             : Ok
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Ahmad Yasin <ahmad.yasin@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Florian Fischer <florian.fischer@muhq.space>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Kshipra Bopardikar <kshipra.bopardikar@intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Miaoqian Lin <linmq006@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samantha Alt <samantha.alt@intel.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20221004021612.325521-24-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d7184d94
    • Ian Rogers's avatar
      perf vendor events: Update Intel tigerlake · a7c1aaa6
      Ian Rogers authored
      Events remain at v1.07, and the metrics are based on TMA 4.4 full.
      
      Use script at:
      https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py
      with updates at:
      https://github.com/captain5050/event-converter-for-linux-perf
      
      Updates include:
       - Rename of topdown TMA metrics from Frontend_Bound to tma_frontend_bound.
       - Addition of all 6 levels of TMA metrics. Previously metrics
         involving topdown events were dropped. Child metrics are placed in
         a group named after their parent allowing children of a metric to
         be easily measured using the metric name with a _group suffix.
       - ## and ##? operators are correctly expanded.
       - The locate-with column is added to the long description describing
         a sampling event.
       - Metrics are written in terms of other metrics to reduce the
         expression size and increase readability.
      
      Tested with 'perf test':
       10: PMU events                                                      :
       10.1: PMU event table sanity                                        : Ok
       10.2: PMU event map aliases                                         : Ok
       10.3: Parsing of PMU event table metrics                            : Ok
       10.4: Parsing of PMU event table metrics with fake PMUs             : Ok
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Ahmad Yasin <ahmad.yasin@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Florian Fischer <florian.fischer@muhq.space>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Kshipra Bopardikar <kshipra.bopardikar@intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Miaoqian Lin <linmq006@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samantha Alt <samantha.alt@intel.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20221004021612.325521-23-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a7c1aaa6
    • Ian Rogers's avatar
      perf vendor events: Update Intel skylake · aac53e8f
      Ian Rogers authored
      Events remain at v53, and the metrics are based on TMA 4.4 full.
      
      Use script at:
      https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py
      with updates at:
      https://github.com/captain5050/event-converter-for-linux-perf
      
      Updates include:
       - Rename of topdown TMA metrics from Frontend_Bound to tma_frontend_bound.
       - _SMT suffix metrics are dropped as the #SMT_On and #EBS_Mode are
         correctly expanded in the single main metric.
       - Addition of all 6 levels of TMA metrics. Child metrics are placed
         in a group named after their parent allowing children of a metric
         to be easily measured using the metric name with a _group suffix.
       - ## and ##? operators are correctly expanded.
       - The locate-with column is added to the long description describing
         a sampling event.
       - Metrics are written in terms of other metrics to reduce the
         expression size and increase readability.
      
      Tested with 'perf test':
       10: PMU events                                                      :
       10.1: PMU event table sanity                                        : Ok
       10.2: PMU event map aliases                                         : Ok
       10.3: Parsing of PMU event table metrics                            : Ok
       10.4: Parsing of PMU event table metrics with fake PMUs             : Ok
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Ahmad Yasin <ahmad.yasin@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Florian Fischer <florian.fischer@muhq.space>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Kshipra Bopardikar <kshipra.bopardikar@intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Miaoqian Lin <linmq006@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samantha Alt <samantha.alt@intel.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20221004021612.325521-22-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      aac53e8f
    • Ian Rogers's avatar
      perf vendor events: Update silvermont cpuids · e762a998
      Ian Rogers authored
      Add cpuid that was added to https://download.01.org/perfmon/mapfile.csvSigned-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Ahmad Yasin <ahmad.yasin@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Florian Fischer <florian.fischer@muhq.space>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Kshipra Bopardikar <kshipra.bopardikar@intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Miaoqian Lin <linmq006@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samantha Alt <samantha.alt@intel.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20221004021612.325521-21-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      e762a998
    • Ian Rogers's avatar
      perf vendor events: Update Intel sapphirerapids · 9a1b4aa4
      Ian Rogers authored
      Events are updated to v1.06 the core metrics are based on TMA 4.4 full.
      
      Use script at:
      https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py
      with updates at:
      https://github.com/captain5050/event-converter-for-linux-perf
      
      Updates include:
       - Rename of topdown TMA metrics from Frontend_Bound to tma_frontend_bound.
       - Addition of all 6 levels of TMA metrics. Previously metrics
         involving topdown events were dropped. Child metrics are placed in
         a group named after their parent allowing children of a metric to
         be easily measured using the metric name with a _group suffix.
       - ## and ##? operators are correctly expanded.
       - The locate-with column is added to the long description describing
         a sampling event.
       - Metrics are written in terms of other metrics to reduce the
         expression size and increase readability.
       - Latest metrics from: https://github.com/intel/perfmon-metrics
      
      Tested with 'perf test':
       10: PMU events                                                      :
       10.1: PMU event table sanity                                        : Ok
       10.2: PMU event map aliases                                         : Ok
       10.3: Parsing of PMU event table metrics                            : Ok
       10.4: Parsing of PMU event table metrics with fake PMUs             : Ok
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Ahmad Yasin <ahmad.yasin@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Florian Fischer <florian.fischer@muhq.space>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Kshipra Bopardikar <kshipra.bopardikar@intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Miaoqian Lin <linmq006@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samantha Alt <samantha.alt@intel.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20221004021612.325521-20-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      9a1b4aa4
    • Ian Rogers's avatar
      perf vendor events: Update Intel sandybridge · db35c1dc
      Ian Rogers authored
      Events remain at v17, and the metrics are based on TMA 4.4 full.
      
      Use script at:
      https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py
      with updates at:
      https://github.com/captain5050/event-converter-for-linux-perf
      
      Updates include:
       - Rename of topdown TMA metrics from Frontend_Bound to tma_frontend_bound.
       - _SMT suffix metrics are dropped as the #SMT_On and #EBS_Mode are
         correctly expanded in the single main metric.
       - Addition of all 6 levels of TMA metrics. Child metrics are placed in
         a group named after their parent allowing children of a metric to
         be easily measured using the metric name with a _group suffix.
       - ## and ##? operators are correctly expanded.
       - The locate-with column is added to the long description describing
         a sampling event.
       - Metrics are written in terms of other metrics to reduce the
         expression size and increase readability.
      
      Tested with 'perf test':
       10: PMU events                                                      :
       10.1: PMU event table sanity                                        : Ok
       10.2: PMU event map aliases                                         : Ok
       10.3: Parsing of PMU event table metrics                            : Ok
       10.4: Parsing of PMU event table metrics with fake PMUs             : Ok
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Ahmad Yasin <ahmad.yasin@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Florian Fischer <florian.fischer@muhq.space>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Kshipra Bopardikar <kshipra.bopardikar@intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Miaoqian Lin <linmq006@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samantha Alt <samantha.alt@intel.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20221004021612.325521-19-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      db35c1dc
    • Ian Rogers's avatar
      perf vendor events: Update Intel jaketown · 3405de19
      Ian Rogers authored
      Events remain at v21, and the metrics are based on TMA 4.4 full.
      
      Use script at:
      https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py
      with updates at:
      https://github.com/captain5050/event-converter-for-linux-perf
      
      Updates include:
       - Rename of topdown TMA metrics from Frontend_Bound to tma_frontend_bound.
       - _SMT suffix metrics are dropped as the #SMT_On and #EBS_Mode are
         correctly expanded in the single main metric.
       - Addition of all 6 levels of TMA metrics. Child metrics are placed in
         a group named after their parent allowing children of a metric to
         be easily measured using the metric name with a _group suffix.
       - ## and ##? operators are correctly expanded.
       - The locate-with column is added to the long description describing
         a sampling event.
       - Metrics are written in terms of other metrics to reduce the
         expression size and increase readability.
      
      Tested with 'perf test':
       10: PMU events                                                      :
       10.1: PMU event table sanity                                        : Ok
       10.2: PMU event map aliases                                         : Ok
       10.3: Parsing of PMU event table metrics                            : Ok
       10.4: Parsing of PMU event table metrics with fake PMUs             : Ok
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Ahmad Yasin <ahmad.yasin@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Florian Fischer <florian.fischer@muhq.space>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Kshipra Bopardikar <kshipra.bopardikar@intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Miaoqian Lin <linmq006@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samantha Alt <samantha.alt@intel.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20221004021612.325521-18-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      3405de19
    • Ian Rogers's avatar
      perf vendor events: Update Intel ivytown · d2aaf040
      Ian Rogers authored
      Events are updated to v22 the core metrics are based on TMA 4.4 full.
      
      Use script at:
      https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py
      with updates at:
      https://github.com/captain5050/event-converter-for-linux-perf
      
      Updates include:
       - Rename of topdown TMA metrics from Frontend_Bound to tma_frontend_bound.
       - _SMT suffix metrics are dropped as the #SMT_On and #EBS_Mode are
         correctly expanded in the single main metric.
       - Addition of all 6 levels of TMA metrics. Child metrics are placed in
         a group named after their parent allowing children of a metric to
         be easily measured using the metric name with a _group suffix.
       - ## and ##? operators are correctly expanded.
       - The locate-with column is added to the long description describing
         a sampling event.
       - Metrics are written in terms of other metrics to reduce the
         expression size and increase readability.
      
      Tested with 'perf test':
       10: PMU events                                                      :
       10.1: PMU event table sanity                                        : Ok
       10.2: PMU event map aliases                                         : Ok
       10.3: Parsing of PMU event table metrics                            : Ok
       10.4: Parsing of PMU event table metrics with fake PMUs             : Ok
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Ahmad Yasin <ahmad.yasin@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Florian Fischer <florian.fischer@muhq.space>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Kshipra Bopardikar <kshipra.bopardikar@intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Miaoqian Lin <linmq006@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samantha Alt <samantha.alt@intel.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20221004021612.325521-17-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d2aaf040
    • Ian Rogers's avatar
      perf vendor events: Update Intel ivybridge · 3bd2d211
      Ian Rogers authored
      Events remain at v22, and the metrics are based on TMA 4.4 full.
      
      Use script at:
      https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py
      with updates at:
      https://github.com/captain5050/event-converter-for-linux-perf
      
      Updates include:
       - Rename of topdown TMA metrics from Frontend_Bound to tma_frontend_bound.
       - _SMT suffix metrics are dropped as the #SMT_On and #EBS_Mode are
         correctly expanded in the single main metric.
       - Addition of all 6 levels of TMA metrics. Child metrics are placed in
         a group named after their parent allowing children of a metric to
         be easily measured using the metric name with a _group suffix.
       - ## and ##? operators are correctly expanded.
       - The locate-with column is added to the long description describing
         a sampling event.
       - Metrics are written in terms of other metrics to reduce the
         expression size and increase readability.
      
      Tested with 'perf test':
       10: PMU events                                                      :
       10.1: PMU event table sanity                                        : Ok
       10.2: PMU event map aliases                                         : Ok
       10.3: Parsing of PMU event table metrics                            : Ok
       10.4: Parsing of PMU event table metrics with fake PMUs             : Ok
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Ahmad Yasin <ahmad.yasin@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Florian Fischer <florian.fischer@muhq.space>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Kshipra Bopardikar <kshipra.bopardikar@intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Miaoqian Lin <linmq006@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samantha Alt <samantha.alt@intel.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20221004021612.325521-16-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      3bd2d211
    • Ian Rogers's avatar
      perf vendor events: Update Intel icelakex · bd035250
      Ian Rogers authored
      Events are updated to v1.16 the metrics are based on TMA 4.4 full.
      
      Use script at:
      https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py
      with updates at:
      https://github.com/captain5050/event-converter-for-linux-perf
      
      Updates include:
       - Rename of topdown TMA metrics from Frontend_Bound to tma_frontend_bound.
       - Addition of all 6 levels of TMA metrics. Previously metrics
         involving topdown events were dropped. Child metrics are placed in
         a group named after their parent allowing children of a metric to
         be easily measured using the metric name with a _group suffix.
       - ## and ##? operators are correctly expanded.
       - The locate-with column is added to the long description describing
         a sampling event.
       - Metrics are written in terms of other metrics to reduce the
         expression size and increase readability.
       - Latest metrics from: https://github.com/intel/perfmon-metrics
      
      Tested with 'perf test':
       10: PMU events                                                      :
       10.1: PMU event table sanity                                        : Ok
       10.2: PMU event map aliases                                         : Ok
       10.3: Parsing of PMU event table metrics                            : Ok
       10.4: Parsing of PMU event table metrics with fake PMUs             : Ok
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Ahmad Yasin <ahmad.yasin@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Florian Fischer <florian.fischer@muhq.space>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Kshipra Bopardikar <kshipra.bopardikar@intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Miaoqian Lin <linmq006@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samantha Alt <samantha.alt@intel.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20221004021612.325521-15-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      bd035250
    • Ian Rogers's avatar
      perf vendor events: Update Intel icelake · 8fb4ddf4
      Ian Rogers authored
      Events are updated to v1.15, the metrics are based on TMA 4.4 full.
      
      Use script at:
      https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py
      with updates at:
      https://github.com/captain5050/event-converter-for-linux-perf
      
      Updates include:
       - Rename of topdown TMA metrics from Frontend_Bound to tma_frontend_bound.
       - Addition of all 6 levels of TMA metrics. Previously metrics
         involving topdown events were dropped. Child metrics are placed in
         a group named after their parent allowing children of a metric to
         be easily measured using the metric name with a _group suffix.
       - ## and ##? operators are correctly expanded.
       - The locate-with column is added to the long description describing
         a sampling event.
       - Metrics are written in terms of other metrics to reduce the
         expression size and increase readability.
      
      Tested with 'perf test':
       10: PMU events                                                      :
       10.1: PMU event table sanity                                        : Ok
       10.2: PMU event map aliases                                         : Ok
       10.3: Parsing of PMU event table metrics                            : Ok
       10.4: Parsing of PMU event table metrics with fake PMUs             : Ok
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Ahmad Yasin <ahmad.yasin@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Florian Fischer <florian.fischer@muhq.space>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Kshipra Bopardikar <kshipra.bopardikar@intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Miaoqian Lin <linmq006@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samantha Alt <samantha.alt@intel.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20221004021612.325521-14-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      8fb4ddf4
    • Ian Rogers's avatar
      perf vendor events: Update Intel haswellx · 08ce57dd
      Ian Rogers authored
      Events are updated to v26, the core metrics are based on TMA 4.4 full.
      
      Use script at:
      https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py
      with updates at:
      https://github.com/captain5050/event-converter-for-linux-perf
      
      Updates include:
       - Uncore event updates by Zhengjun Xing <zhengjun.xing@linux.intel.com>.
       - Rename of topdown TMA metrics from Frontend_Bound to tma_frontend_bound.
       - _SMT suffix metrics are dropped as the #SMT_On and #EBS_Mode are
         correctly expanded in the single main metric.
       - Addition of all 6 levels of TMA metrics. Previously metrics
         involving topdown events were dropped. Child metrics are placed in
         a group named after their parent allowing children of a metric to
         be easily measured using the metric name with a _group suffix.
       - ## and ##? operators are correctly expanded.
       - The locate-with column is added to the long description describing
         a sampling event.
       - Metrics are written in terms of other metrics to reduce the
         expression size and increase readability.
       - Latest metrics from: https://github.com/intel/perfmon-metrics
      
      Tested with 'perf test':
       10: PMU events                                                      :
       10.1: PMU event table sanity                                        : Ok
       10.2: PMU event map aliases                                         : Ok
       10.3: Parsing of PMU event table metrics                            : Ok
       10.4: Parsing of PMU event table metrics with fake PMUs             : Ok
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Ahmad Yasin <ahmad.yasin@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Florian Fischer <florian.fischer@muhq.space>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Kshipra Bopardikar <kshipra.bopardikar@intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Miaoqian Lin <linmq006@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samantha Alt <samantha.alt@intel.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20221004021612.325521-13-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      08ce57dd
    • Ian Rogers's avatar
      perf vendor events: Update Intel haswell · dd7aae2c
      Ian Rogers authored
      Events are updated to v32, the core metrics are based on TMA 4.4 full.
      
      Use script at:
      https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py
      with updates at:
      https://github.com/captain5050/event-converter-for-linux-perf
      
      Updates include:
       - Rename of topdown TMA metrics from Frontend_Bound to tma_frontend_bound.
       - _SMT suffix metrics are dropped as the #SMT_On and #EBS_Mode are
         correctly expanded in the single main metric.
       - Addition of all 6 levels of TMA metrics. Child metrics are placed in
         a group named after their parent allowing children of a metric to
         be easily measured using the metric name with a _group suffix.
       - ## and ##? operators are correctly expanded.
       - The locate-with column is added to the long description describing
         a sampling event.
       - Metrics are written in terms of other metrics to reduce the
         expression size and increase readability.
      
      Tested with 'perf test':
       10: PMU events                                                      :
       10.1: PMU event table sanity                                        : Ok
       10.2: PMU event map aliases                                         : Ok
       10.3: Parsing of PMU event table metrics                            : Ok
       10.4: Parsing of PMU event table metrics with fake PMUs             : Ok
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Ahmad Yasin <ahmad.yasin@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Florian Fischer <florian.fischer@muhq.space>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Kshipra Bopardikar <kshipra.bopardikar@intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Miaoqian Lin <linmq006@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samantha Alt <samantha.alt@intel.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20221004021612.325521-12-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      dd7aae2c
    • Ian Rogers's avatar
      perf vendor events: Update elkhartlake cpuids · 5ed4fc26
      Ian Rogers authored
      Add cpuid that was added to https://download.01.org/perfmon/mapfile.csvSigned-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Ahmad Yasin <ahmad.yasin@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Florian Fischer <florian.fischer@muhq.space>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Kshipra Bopardikar <kshipra.bopardikar@intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Miaoqian Lin <linmq006@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samantha Alt <samantha.alt@intel.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20221004021612.325521-11-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      5ed4fc26
    • Ian Rogers's avatar
      perf vendor events: Update Intel cascadelakex · 55b201a8
      Ian Rogers authored
      Events remain at v1.16, and the metrics are based on TMA 4.4 full.
      
      Use script at:
      https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py
      with updates at:
      https://github.com/captain5050/event-converter-for-linux-perf
      
      Updates include:
       - Removal of ScaleUnit from uncore events by Zhengjun Xing
         <zhengjun.xing@linux.intel.com>.
       - Rename of topdown TMA metrics from Frontend_Bound to tma_frontend_bound.
       - _SMT suffix metrics are dropped as the #SMT_On and #EBS_Mode are
         correctly expanded in the single main metric.
       - Addition of all 6 levels of TMA metrics. Child metrics are placed
         in a group named after their parent allowing children of a metric
         to be easily measured using the metric name with a _group suffix.
       - ## and ##? operators are correctly expanded.
       - The locate-with column is added to the long description describing
         a sampling event.
       - Metrics are written in terms of other metrics to reduce the
         expression size and increase readability.
       - Latest metrics from: https://github.com/intel/perfmon-metrics
      
      Tested with 'perf test':
       10: PMU events                                                      :
       10.1: PMU event table sanity                                        : Ok
       10.2: PMU event map aliases                                         : Ok
       10.3: Parsing of PMU event table metrics                            : Ok
       10.4: Parsing of PMU event table metrics with fake PMUs             : Ok
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Ahmad Yasin <ahmad.yasin@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Florian Fischer <florian.fischer@muhq.space>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Kshipra Bopardikar <kshipra.bopardikar@intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Miaoqian Lin <linmq006@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samantha Alt <samantha.alt@intel.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20221004021612.325521-10-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      55b201a8
    • Ian Rogers's avatar
      perf vendor events: Update Intel broadwellx · 5bc4e39e
      Ian Rogers authored
      Events remain at v19, and the metrics are based on TMA 4.4 full.
      
      Use script at:
      https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py
      with updates at:
      https://github.com/captain5050/event-converter-for-linux-perf
      
      Updates include:
       - Uncore event updates by Zhengjun Xing <zhengjun.xing@linux.intel.com>.
       - Rename of topdown TMA metrics from Frontend_Bound to tma_frontend_bound.
       - _SMT suffix metrics are dropped as the #SMT_On and #EBS_Mode are
         correctly expanded in the single main metric.
       - Addition of all 6 levels of TMA metrics. Child metrics are placed
         in a group named after their parent allowing children of a metric
         to be easily measured using the metric name with a _group suffix.
       - ## and ##? operators are correctly expanded.
       - The locate-with column is added to the long description describing
         a sampling event.
       - Metrics are written in terms of other metrics to reduce the
         expression size and increase readability.
       - Latest metrics from: https://github.com/intel/perfmon-metrics
      
      Tested with 'perf test':
       10: PMU events                                                      :
       10.1: PMU event table sanity                                        : Ok
       10.2: PMU event map aliases                                         : Ok
       10.3: Parsing of PMU event table metrics                            : Ok
       10.4: Parsing of PMU event table metrics with fake PMUs             : Ok
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Ahmad Yasin <ahmad.yasin@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Florian Fischer <florian.fischer@muhq.space>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Kshipra Bopardikar <kshipra.bopardikar@intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Miaoqian Lin <linmq006@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samantha Alt <samantha.alt@intel.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20221004021612.325521-9-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      5bc4e39e
    • Ian Rogers's avatar
      perf vendor events: Update Intel broadwell · eb4f8d77
      Ian Rogers authored
      Events remain at v26, and the metrics are based on TMA 4.4 full.
      
      Use script at:
      https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py
      with updates at:
      https://github.com/captain5050/event-converter-for-linux-perf
      
      Updates include:
       - Rename of topdown TMA metrics from Frontend_Bound to tma_frontend_bound.
       - _SMT suffix metrics are dropped as the #SMT_On and #EBS_Mode are
         correctly expanded in the single main metric.
       - Addition of all 6 levels of TMA metrics. Child metrics are placed
         in a group named after their parent allowing children of a metric
         to be easily measured using the metric name with a _group suffix.
       - ## and ##? operators are correctly expanded.
       - The locate-with column is added to the long description describing
         a sampling event.
       - Metrics are written in terms of other metrics to reduce the
         expression size and increase readability.
      
      Tested with 'perf test':
       10: PMU events                                                      :
       10.1: PMU event table sanity                                        : Ok
       10.2: PMU event map aliases                                         : Ok
       10.3: Parsing of PMU event table metrics                            : Ok
       10.4: Parsing of PMU event table metrics with fake PMUs             : Ok
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Ahmad Yasin <ahmad.yasin@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Florian Fischer <florian.fischer@muhq.space>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Kshipra Bopardikar <kshipra.bopardikar@intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Miaoqian Lin <linmq006@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samantha Alt <samantha.alt@intel.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20221004021612.325521-8-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      eb4f8d77
    • Ian Rogers's avatar
      perf vendor events: Update Intel alderlake · a80de066
      Ian Rogers authored
      Events are updated to v1.15, the core metrics are based on TMA 4.4
      full and the atom metrics on E-core TMA 2.2.
      
      Use script at:
      https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py
      with updates at:
      https://github.com/captain5050/event-converter-for-linux-perf
      
      Updates include:
       - Rename of topdown TMA metrics from Frontend_Bound to tma_frontend_bound.
       - Addition of all 6 levels of TMA metrics. Previously metrics
         involving topdown events were dropped. Child metrics are placed in
         a group named after their parent allowing children of a metric to
         be easily measured using the metric name with a _group suffix.
       - ## and ##? operators are correctly expanded.
       - The locate-with column is added to the long description describing
         a sampling event.
       - Metrics are written in terms of other metrics to reduce the
         expression size and increase readability.
       - Update mapfile.csv CPUIDs to match 01.org.
      
      Tested with 'perf test':
       10: PMU events                                                      :
       10.1: PMU event table sanity                                        : Ok
       10.2: PMU event map aliases                                         : Ok
       10.3: Parsing of PMU event table metrics                            : Ok
       10.4: Parsing of PMU event table metrics with fake PMUs             : Ok
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Ahmad Yasin <ahmad.yasin@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Florian Fischer <florian.fischer@muhq.space>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Kshipra Bopardikar <kshipra.bopardikar@intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Miaoqian Lin <linmq006@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samantha Alt <samantha.alt@intel.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20221004021612.325521-7-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      a80de066
    • Ian Rogers's avatar
      perf vendor events: Update Intel skylakex · 313b2f38
      Ian Rogers authored
      Events remain at v1.28, and the metrics are based on TMA 4.4 full.
      
      Use script at:
      https://github.com/intel/event-converter-for-linux-perf/blob/master/download_and_gen.py
      with updates at:
      https://github.com/captain5050/event-converter-for-linux-perf
      
      Updates include:
       - Removal of ScaleUnit from uncore events by Zhengjun Xing
         <zhengjun.xing@linux.intel.com>.
       - Rename of topdown TMA metrics from Frontend_Bound to tma_frontend_bound.
       - _SMT suffix metrics are dropped as the #SMT_On and #EBS_Mode are
         correctly expanded in the single main metric.
       - Addition of all 6 levels of TMA metrics. Child metrics are placed
         in a group named after their parent allowing children of a metric
         to be easily measured using the metric name with a _group suffix.
       - ## and ##? operators are correctly expanded.
       - The locate-with column is added to the long description describing
         a sampling event.
       - Metrics are written in terms of other metrics to reduce the
         expression size and increase readability.
       - Latest metrics from: https://github.com/intel/perfmon-metrics
      
      Tested on a skylakex manually and with 'perf test':
       10: PMU events                                                      :
       10.1: PMU event table sanity                                        : Ok
       10.2: PMU event map aliases                                         : Ok
       10.3: Parsing of PMU event table metrics                            : Ok
       10.4: Parsing of PMU event table metrics with fake PMUs             : Ok
       93: perf all metricgroups test                                      : Ok
       94: perf all metrics test                                           : Skip
       95: perf all PMU test                                               : Ok
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Ahmad Yasin <ahmad.yasin@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Florian Fischer <florian.fischer@muhq.space>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Kshipra Bopardikar <kshipra.bopardikar@intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Miaoqian Lin <linmq006@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samantha Alt <samantha.alt@intel.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20221004021612.325521-6-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      313b2f38
    • Ian Rogers's avatar
      perf metrics: Don't scale counts going into metrics · 8cff7490
      Ian Rogers authored
      Counts are scaled prior to going into saved_value, reverse the scaling
      so that metrics don't double scale values.
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Ahmad Yasin <ahmad.yasin@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Florian Fischer <florian.fischer@muhq.space>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Kshipra Bopardikar <kshipra.bopardikar@intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Miaoqian Lin <linmq006@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samantha Alt <samantha.alt@intel.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20221004021612.325521-5-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      8cff7490
    • Ian Rogers's avatar
      perf expr: Remove jevents case workaround · 715b824f
      Ian Rogers authored
      jevents.py no longer lowercases metrics and altering the case can cause
      hashmap lookups to fail, so remove.
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Ahmad Yasin <ahmad.yasin@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Florian Fischer <florian.fischer@muhq.space>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Kshipra Bopardikar <kshipra.bopardikar@intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Miaoqian Lin <linmq006@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samantha Alt <samantha.alt@intel.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20221004021612.325521-4-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      715b824f
    • Ian Rogers's avatar
      perf test: Adjust case of test metrics · 0e407915
      Ian Rogers authored
      Icelake and later architectures have slots events and SLOTS metrics
      meaning case sensitivity is important. Make the test metrics case
      agree with the name of the metrics.
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Ahmad Yasin <ahmad.yasin@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Florian Fischer <florian.fischer@muhq.space>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Kshipra Bopardikar <kshipra.bopardikar@intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Miaoqian Lin <linmq006@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samantha Alt <samantha.alt@intel.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20221004021612.325521-3-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      0e407915
    • Ian Rogers's avatar
      perf expr: Allow a double if expression · 4b65fc7b
      Ian Rogers authored
      Some TMA metrics have double if expressions like:
      
        ( CPU_CLK_UNHALTED.THREAD / 2 ) * ( 1 + CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE / CPU_CLK_UNHALTED.REF_XCLK ) ) if #core_wide < 1 else ( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else CPU_CLK_UNHALTED.THREAD
      
      This currently fails to parse as the left hand side if expression needs
      to be in parentheses. By allowing the if expression to have a right hand
      side that is an if expression we can parse the expression above, with
      left to right evaluation order that matches languages like Python.
      Signed-off-by: default avatarIan Rogers <irogers@google.com>
      Cc: Ahmad Yasin <ahmad.yasin@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Caleb Biggers <caleb.biggers@intel.com>
      Cc: Florian Fischer <florian.fischer@muhq.space>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: James Clark <james.clark@arm.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Kajol Jain <kjain@linux.ibm.com>
      Cc: Kan Liang <kan.liang@linux.intel.com>
      Cc: Kshipra Bopardikar <kshipra.bopardikar@intel.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Miaoqian Lin <linmq006@gmail.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Perry Taylor <perry.taylor@intel.com>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Samantha Alt <samantha.alt@intel.com>
      Cc: Stephane Eranian <eranian@google.com>
      Cc: Thomas Richter <tmricht@linux.ibm.com>
      Cc: Xing Zhengjun <zhengjun.xing@linux.intel.com>
      Link: https://lore.kernel.org/r/20221004021612.325521-2-irogers@google.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      4b65fc7b
    • Chen Zhongjin's avatar
      perf parse-events: Remove unused macros __PERF_EVENT_FIELD() · 30b842d2
      Chen Zhongjin authored
      Unused macros reported by [-Wunused-macros].
      
      This macros were introduced as __PERF_COUNTER_FIELD and used for reading
      the bit in config.
      
      cdd6c482 ("perf: Do the big rename: Performance Counters ->
      Performance Events") Changes it to __PERF_EVENT_FIELD but at this commit
      there is already nowhere else using these macros, also no macros called
      PERF_EVENT_##name##_MASK/SHIFT.
      
      Now we are not reading type or id from config. These macros are useless
      and incomplete.
      
      So removing them for code cleaning.
      Signed-off-by: default avatarChen Zhongjin <chenzhongjin@huawei.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Florian Fischer <florian.fischer@muhq.space>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/20220926031440.28275-5-chenzhongjin@huawei.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      30b842d2
    • Will Chandler's avatar
      perf tools: Fix empty version number when building outside of a git repo · 81935f10
      Will Chandler authored
      When perf is built in a full source tree that is not a git repository,
      e.g. from a kernel source tarball, `perf version` will print empty tag
      and commit strings:
      
        $ perf version
        perf version
      
      Currently the tag version is only generated from the root Makefile when
      building in a git repository. If PERF-VERSION-FILE has not been
      generated and the source tree is not in a git repository, then
      PERF-VERSION-GEN will return an empty version.
      
      The problem can be reproduced with the following steps:
      
        $ wget https://git.kernel.org/torvalds/t/linux-6.0-rc7.tar.gz
        $ tar -xf linux-6.0-rc7.tar.gz && cd linux-6.0-rc7
        $ make -C tools/perf
        $ tools/perf/perf -v
        perf version
      
      Builds from tarballs generated with `make perf-tar-src-pkg` are not
      impacted by this issue as PERF-VERSION-FILE is included in the archive.
      
      The perf RPM provided by Fedora for 5.18+ is experiencing this problem.
      Package build logs[0] show that the build is attempting to fall back on
      PERF-VERSION-FILE, but it is not present.
      
      To resolve this, revert back to the previous logic of using the kernel
      Makefile version if not in a git repository and PERF-VERSION-FILE does
      not exist.
      
      [0] https://kojipkgs.fedoraproject.org/packages/kernel-tools/5.19.4/200.fc36/data/logs/x86_64/build.log
      
      Fixes: 7572733b ("perf tools: Fix version kernel tag")
      Reviewed-by: default avatarJohn Garry <john.garry@huawei.com>
      Signed-off-by: default avatarWill Chandler <wfc@wfchandler.org>
      Tested-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/r/20220930151157.529674-1-wfc@wfchandler.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      81935f10
    • Yuan Can's avatar
      perf lock: Remove unused struct lock_contention_key · 20b2194e
      Yuan Can authored
      The struct lock_contention_key is never used, remove it.
      Signed-off-by: default avatarYuan Can <yuancan@huawei.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/linux-perf-users/20220927013931.110475-6-yuancan@huawei.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      20b2194e
    • Yuan Can's avatar
      perf jit: Remove unused struct debug_line_info · d28a8fd3
      Yuan Can authored
      The struct debug_line_info is never used, remove it.
      Signed-off-by: default avatarYuan Can <yuancan@huawei.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/linux-perf-users/20220927013931.110475-5-yuancan@huawei.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      d28a8fd3
    • Yuan Can's avatar
      perf metric: Remove unused struct metric_ref_node · 18f224ee
      Yuan Can authored
      After commit 46bdc0bf ("perf metric: Simplify metric_refs
      calculation"), no one use struct metric_ref_node, so remove it.
      Signed-off-by: default avatarYuan Can <yuancan@huawei.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/linux-perf-users/20220927013931.110475-4-yuancan@huawei.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      18f224ee
    • Yuan Can's avatar
      perf annotate: Remove unused struct disasm_line_samples · 8d9b1734
      Yuan Can authored
      After commit 3ab6db8d ("perf annotate browser: Use samples data from
      struct annotation_line"), no one use struct disasm_line_samples, so
      remove it.
      Signed-off-by: default avatarYuan Can <yuancan@huawei.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/linux-perf-users/20220927013931.110475-3-yuancan@huawei.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      8d9b1734
    • Yuan Can's avatar
      perf machine: Remove unused struct process_args · dae09ffc
      Yuan Can authored
      After commit a93f0e55 ("perf symbols: Get kernel start address by symbol
      name"), no one uses struct process_args any more, so remove it.
      Signed-off-by: default avatarYuan Can <yuancan@huawei.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/linux-perf-users/20220927013931.110475-2-yuancan@huawei.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      dae09ffc
    • Namhyung Kim's avatar
      perf lock contention: Fix a build error on 32-bit · 433b31fa
      Namhyung Kim authored
      It was reported that it failed to build the BPF lock contention skeleton
      on 32 bit arch due to the size of long.  The lost count is used only for
      reporting errors due to lack of stackmap space through bad_hist which
      type is 'int'.  Let's use int type then.
      
      Fixes: 6d499a6b ("perf lock: Print the number of lost entries for BPF")
      Reported-by: default avatarJiri Slaby <jirislaby@kernel.org>
      Signed-off-by: default avatarNamhyung Kim <namhyung@kernel.org>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Cc: Song Liu <songliubraving@fb.com>
      Link: http://lore.kernel.org/lkml/20220926215638.3931222-1-namhyung@kernel.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      433b31fa
    • Shang XiaoJing's avatar
      perf stat: Clean redundant if in process_evlist · c7c43e38
      Shang XiaoJing authored
      Since the first if statment is covered by the following one, clean up
      the first if statment.
      Signed-off-by: default avatarShang XiaoJing <shangxiaojing@huawei.com>
      Acked-by: default avatarIan Rogers <irogers@google.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/r/20220922141438.22487-5-shangxiaojing@huawei.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      c7c43e38
  2. 04 Oct, 2022 4 commits
    • Leo Yan's avatar
      perf test: Introduce script for java symbol testing · 1dc86fc7
      Leo Yan authored
      This commit introduces a script for testing java symbols.
      
      The test records java program, inject samples with JIT samples, check
      specific JIT symbols in the report, the test will pass only when these
      two symbols are detected.
      Suggested-by: default avatarIan Rogers <irogers@google.com>
      Signed-off-by: default avatarLeo Yan <leo.yan@linaro.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/r/20220925025835.70364-3-leo.yan@linaro.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      1dc86fc7
    • Leo Yan's avatar
      perf subcmd: Set environment variable "PREFIX" · 05844393
      Leo Yan authored
      Set environment variable "PREFIX", it will be used by invoked shell
      script, e.g. the shell script uses it to find lib paths.
      Signed-off-by: default avatarLeo Yan <leo.yan@linaro.org>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: https://lore.kernel.org/r/20220925025835.70364-2-leo.yan@linaro.orgSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      05844393
    • Chen Zhongjin's avatar
      perf trace: Fix incorrectly parsed hexadecimal value for flags in filter · 96b73141
      Chen Zhongjin authored
      When parsing flags in filter, the strtoul function uses wrong parsing
      condition (tok[1] = 'x'), which can make the flags be corrupted and
      treat all numbers start with 0 as hex.
      
      In fact strtoul() will auto test hex format when base == 0 (See
      _parse_integer_fixup_radix). So there is no need to test this again.
      
      Remove the unnessesary is_hexa test.
      
      Fixes: 154c978d ("libbeauty: Introduce strarray__strtoul_flags()")
      Signed-off-by: default avatarChen Zhongjin <chenzhongjin@huawei.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Florian Fischer <florian.fischer@muhq.space>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/20220926031440.28275-3-chenzhongjin@huawei.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      96b73141
    • Chen Zhongjin's avatar
      perf trace: Fix show_arg_names not working for tp arg names · 888964a0
      Chen Zhongjin authored
      trace__fprintf_tp_fields() will always print arg names because when
      implemented it is forced to print arg_names with:
      
        (1 || trace->show_arg_names)
      
      So the printing looks like:
      
      > cat ~/.perfconfig
          [trace]
              show_arg_names = no
      
      > perf trace -e syscalls:*mmap sleep 1
          0.000 sleep/1119 syscalls:sys_enter_mmap(NULL, 8192, READ|WRITE, PRIVATE|ANONYMOUS)
          0.179 sleep/1119 syscalls:sys_exit_mmap(__syscall_nr: 9, ret: 140535426170880)
          ...
      
      Although the comment said that perhaps we need a show_tp_arg_names.
      
      I don't think it's necessary to control them separately because it's not
      so clean that part of the log shows arg names but other not.
      
      Also when we are tracing functions it's rare to especially distinguish
      syscalls and tp trace.
      
      Only use one option to control arg names printing is more resonable and
      simple. So remove the force condition and commit.
      
      After fix:
      
      > perf trace -e syscalls:*mmap sleep 1
          0.000 sleep/1121 syscalls:sys_enter_mmap(NULL, 8192, READ|WRITE, PRIVATE|ANONYMOUS)
          0.163 sleep/1121 syscalls:sys_exit_mmap(9, 140454467661824)
          ...
      
      Fixes: f11b2803 ("perf trace: Allow choosing how to augment the tracepoint arguments")
      Signed-off-by: default avatarChen Zhongjin <chenzhongjin@huawei.com>
      Cc: Adrian Hunter <adrian.hunter@intel.com>
      Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
      Cc: Andi Kleen <ak@linux.intel.com>
      Cc: Florian Fischer <florian.fischer@muhq.space>
      Cc: Ian Rogers <irogers@google.com>
      Cc: Jiri Olsa <jolsa@kernel.org>
      Cc: John Garry <john.garry@huawei.com>
      Cc: Mark Rutland <mark.rutland@arm.com>
      Cc: Namhyung Kim <namhyung@kernel.org>
      Cc: Peter Zijlstra <peterz@infradead.org>
      Link: http://lore.kernel.org/lkml/20220926031440.28275-2-chenzhongjin@huawei.comSigned-off-by: default avatarArnaldo Carvalho de Melo <acme@redhat.com>
      888964a0