1. 06 Oct, 2022 21 commits
    • 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 19 commits