All of lore.kernel.org
 help / color / mirror / Atom feed
From: tip-bot for Andi Kleen <tipbot@zytor.com>
To: linux-tip-commits@vger.kernel.org
Cc: mingo@kernel.org, acme@redhat.com, ak@linux.intel.com,
	linux-kernel@vger.kernel.org, jolsa@redhat.com, hpa@zytor.com,
	tglx@linutronix.de
Subject: [tip:perf/core] perf vendor events: Add JSON metrics for Skylake
Date: Fri, 22 Sep 2017 09:38:06 -0700	[thread overview]
Message-ID: <tip-2e006a24127ad88422632f9e5d6a8039a40f01da@git.kernel.org> (raw)
In-Reply-To: <20170905195235.GW2482@two.firstfloor.org>

Commit-ID:  2e006a24127ad88422632f9e5d6a8039a40f01da
Gitweb:     http://git.kernel.org/tip/2e006a24127ad88422632f9e5d6a8039a40f01da
Author:     Andi Kleen <ak@linux.intel.com>
AuthorDate: Sun, 23 Jul 2017 21:54:49 -0700
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 13 Sep 2017 09:49:17 -0300

perf vendor events: Add JSON metrics for Skylake

Add JSON metrics for Skylake.

Committer testing:

  # grep "model name" /proc/cpuinfo | head -1
  model name	: Intel(R) Core(TM) i5-7500 CPU @ 3.40GHz
  # uname -a
  Linux seventh 4.12.0-rc6+ #1 SMP Fri Jun 30 16:40:55 -03 2017 x86_64 x86_64 x86_64 GNU/Linux
  # perf stat --metric-only -M Summary -a sleep 1

   Performance counter stats for 'system wide':

  Instructions         CPI                  CLKS                 CPU_Utilization      GFLOPs               SMT_2T_Utilization   Kernel_Utilization
  34021097.0               0.0            119424171.0              0.0                 0.0                 0.0                 0.0

         1.001001793 seconds time elapsed

  # perf list metricgroup

  List of pre-defined events (to be used in -e):

  Metric Groups:

  DSB
  FLOPS
  Frontend
  Frontend_Bandwidth
  Memory_BW
  Memory_Bound
  Memory_Lat
  Pipeline
  Ports_Utilization
  Power
  SMT
  Summary
  TLB
  TopDownL1
  Unknown_Branches
  # perf stat --metric-only -M Ports_Utilization -a sleep 1

   Performance counter stats for 'system wide':

  ILP
  1475828.0

       1.000688547 seconds time elapsed

  # perf stat -v --metric-only -M Ports_Utilization -a sleep 1
  Using CPUID GenuineIntel-6-9E
  metric expr uops_executed.thread / ( uops_executed.core_cycles_ge_1 / 2) if #smt_on else uops_executed.core_cycles_ge_1 for ILP
  found event uops_executed.thread
  found event uops_executed.core_cycles_ge_1
  adding {uops_executed.thread,uops_executed.core_cycles_ge_1}:W
  uops_executed.thread -> cpu/umask=0x1,period=2000003,event=0xb1/
  uops_executed.core_cycles_ge_1 -> cpu/umask=0x2,period=2000003,cmask=1,event=0xb1/
  uops_executed.thread: 8115271 4002547654 4002547654
  uops_executed.core_cycles_ge_1: 3282969 4002547654 4002547654

   Performance counter stats for 'system wide':

  ILP
  3282969.0

         1.000719870 seconds time elapsed

  #

Signed-off-by: Andi Kleen <ak@linux.intel.com>
Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Jiri Olsa <jolsa@redhat.com>
Link: http://lkml.kernel.org/r/20170905195235.GW2482@two.firstfloor.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 .../{broadwell/bdw-metrics.json => skylake/skl-metrics.json} | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/tools/perf/pmu-events/arch/x86/broadwell/bdw-metrics.json b/tools/perf/pmu-events/arch/x86/skylake/skl-metrics.json
similarity index 85%
copy from tools/perf/pmu-events/arch/x86/broadwell/bdw-metrics.json
copy to tools/perf/pmu-events/arch/x86/skylake/skl-metrics.json
index 49c5f12..411f941 100644
--- a/tools/perf/pmu-events/arch/x86/broadwell/bdw-metrics.json
+++ b/tools/perf/pmu-events/arch/x86/skylake/skl-metrics.json
@@ -13,7 +13,7 @@
     },
     {
         "BriefDescription": "Rough Estimation of fraction of fetched lines bytes that were likely consumed by program instructions",
-        "MetricExpr": "min( 1 , IDQ.MITE_UOPS / ( UOPS_RETIRED.RETIRE_SLOTS / INST_RETIRED.ANY * 16 * ( ICACHE.HIT + ICACHE.MISSES ) / 4.0 ) )",
+        "MetricExpr": "min( 1 , UOPS_ISSUED.ANY / (UOPS_RETIRED.RETIRE_SLOTS / INST_RETIRED.ANY * 64 * ( ICACHE_64B.IFTAG_HIT + ICACHE_64B.IFTAG_MISS ) / 4.1) )",
         "MetricGroup": "Frontend",
         "MetricName": "IFetch_Line_Utilization"
     },
@@ -55,13 +55,13 @@
     },
     {
         "BriefDescription": "Instruction-Level-Parallelism (average number of uops executed when there is at least 1 uop executed)",
-        "MetricExpr": "UOPS_EXECUTED.THREAD / ( cpu@uops_executed.core\\,cmask\\=1@ / 2) if #SMT_on else UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC",
+        "MetricExpr": "UOPS_EXECUTED.THREAD / ( UOPS_EXECUTED.CORE_CYCLES_GE_1 / 2) if #SMT_on else UOPS_EXECUTED.CORE_CYCLES_GE_1",
         "MetricGroup": "Pipeline;Ports_Utilization",
         "MetricName": "ILP"
     },
     {
         "BriefDescription": "Average Branch Address Clear Cost (fraction of cycles)",
-	"MetricExpr": "2* ( RS_EVENTS.EMPTY_CYCLES - ICACHE.IFDATA_STALL  - ( 14 * ITLB_MISSES.STLB_HIT + cpu@ITLB_MISSES.WALK_DURATION\\,cmask\\=1@ + 7* ITLB_MISSES.WALK_COMPLETED ) ) / RS_EVENTS.EMPTY_END",
+        "MetricExpr": "2* ( RS_EVENTS.EMPTY_CYCLES - ICACHE_16B.IFDATA_STALL  - ICACHE_64B.IFTAG_STALL ) / RS_EVENTS.EMPTY_END",
         "MetricGroup": "Unknown_Branches",
         "MetricName": "BAClear_Cost"
     },
@@ -73,19 +73,19 @@
     },
     {
         "BriefDescription": "Actual Average Latency for L1 data-cache miss demand loads",
-        "MetricExpr": "L1D_PEND_MISS.PENDING / ( MEM_LOAD_UOPS_RETIRED.L1_MISS + mem_load_uops_retired.hit_lfb )",
+	"MetricExpr": "L1D_PEND_MISS.PENDING / ( MEM_LOAD_RETIRED.L1_MISS + MEM_LOAD_RETIRED.FB_HIT )",
         "MetricGroup": "Memory_Bound;Memory_Lat",
         "MetricName": "Load_Miss_Real_Latency"
     },
     {
         "BriefDescription": "Memory-Level-Parallelism (average number of L1 miss demand load when there is at least 1 such miss)",
-        "MetricExpr": "L1D_PEND_MISS.PENDING / ( cpu@l1d_pend_miss.pending_cycles\\,any\\=1@ / 2) if #SMT_on else L1D_PEND_MISS.PENDING_CYCLES",
+        "MetricExpr": "L1D_PEND_MISS.PENDING / ( L1D_PEND_MISS.PENDING_CYCLES_ANY / 2) if #SMT_on else L1D_PEND_MISS.PENDING_CYCLES",
         "MetricGroup": "Memory_Bound;Memory_BW",
         "MetricName": "MLP"
     },
     {
         "BriefDescription": "Utilization of the core's Page Walker(s) serving STLB misses triggered by instruction/Load/Store accesses",
-	"MetricExpr": "( cpu@ITLB_MISSES.WALK_DURATION\\,cmask\\=1@ + cpu@DTLB_LOAD_MISSES.WALK_DURATION\\,cmask\\=1@ + cpu@DTLB_STORE_MISSES.WALK_DURATION\\,cmask\\=1@ + 7*(DTLB_STORE_MISSES.WALK_COMPLETED+DTLB_LOAD_MISSES.WALK_COMPLETED+ITLB_MISSES.WALK_COMPLETED)) / ( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else cycles",
+        "MetricExpr": "( ITLB_MISSES.WALK_PENDING + DTLB_LOAD_MISSES.WALK_PENDING + DTLB_STORE_MISSES.WALK_PENDING + EPT.WALK_PENDING ) / ( 2 * ( CPU_CLK_UNHALTED.THREAD_ANY / 2 ) if #SMT_on else cycles )",
         "MetricGroup": "TLB",
         "MetricName": "Page_Walks_Utilization"
     },

  parent reply	other threads:[~2017-09-22 16:40 UTC|newest]

Thread overview: 47+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-31 19:40 Support standalone metrics and metric groups for perf Andi Kleen
2017-08-31 19:40 ` [PATCH v3 01/11] perf, tools: Support weak groups Andi Kleen
2017-09-01 16:57   ` Jiri Olsa
2017-09-01 17:00     ` Jiri Olsa
2017-09-04 16:51       ` Arnaldo Carvalho de Melo
2017-09-22 16:28   ` [tip:perf/core] perf tools: Support weak groups in 'perf stat' tip-bot for Andi Kleen
2017-08-31 19:40 ` [PATCH v3 02/11] perf, tools: Support metric_group and no event name in json parser Andi Kleen
2017-09-22 16:29   ` [tip:perf/core] perf vendor events: Support metric_group and no event name in JSON parser tip-bot for Andi Kleen
2017-08-31 19:40 ` [PATCH v3 03/11] perf, tools, stat: Factor out generic metric printing Andi Kleen
2017-09-22 16:29   ` [tip:perf/core] perf " tip-bot for Andi Kleen
2017-08-31 19:40 ` [PATCH v3 04/11] perf, tools: Print generic metric header even for failed expressions Andi Kleen
2017-09-22 16:30   ` [tip:perf/core] perf stat: " tip-bot for Andi Kleen
2017-08-31 19:40 ` [PATCH v3 05/11] perf, tools: Extract function to get json alias map Andi Kleen
2017-09-22 16:30   ` [tip:perf/core] perf pmu: Extract function to get JSON " tip-bot for Andi Kleen
2017-08-31 19:40 ` [PATCH v3 06/11] perf, tools, stat: Support JSON metrics in perf stat Andi Kleen
2017-09-04 17:11   ` Arnaldo Carvalho de Melo
2017-09-04 17:37     ` Andi Kleen
2017-09-05 18:09       ` Arnaldo Carvalho de Melo
2017-09-05 18:16         ` Arnaldo Carvalho de Melo
2017-09-05 18:32           ` Arnaldo Carvalho de Melo
2017-09-05 18:19         ` Andi Kleen
2017-09-05 18:52           ` Arnaldo Carvalho de Melo
2017-09-05 19:52             ` Andi Kleen
2017-09-05 20:07               ` Arnaldo Carvalho de Melo
2017-09-05 20:37                 ` Andi Kleen
2017-09-08 18:10                   ` Arnaldo Carvalho de Melo
2017-09-08 19:08                     ` Andi Kleen
2017-09-11 14:05                       ` Arnaldo Carvalho de Melo
2017-09-22 16:37               ` [tip:perf/core] perf vendor events: Add JSON metrics for Broadwell tip-bot for Andi Kleen
2017-09-22 16:38               ` tip-bot for Andi Kleen [this message]
2017-09-22 16:38               ` [tip:perf/core] perf vendor events: Add JSON metrics for Sandy Bridge tip-bot for Andi Kleen
2017-09-22 16:31   ` [tip:perf/core] perf stat: Support JSON metrics in perf stat tip-bot for Andi Kleen
2017-08-31 19:40 ` [PATCH v3 07/11] perf, tools, list: Add metric groups to perf list Andi Kleen
2017-09-22 16:31   ` [tip:perf/core] perf " tip-bot for Andi Kleen
2017-10-13 14:50   ` [PATCH v3 07/11] perf, tools, " Arnaldo Carvalho de Melo
2017-08-31 19:40 ` [PATCH v3 08/11] perf, tools, stat: Don't use ctx for saved values lookup Andi Kleen
2017-09-22 16:31   ` [tip:perf/core] perf " tip-bot for Andi Kleen
2017-08-31 19:40 ` [PATCH v3 09/11] perf, tools, stat: Support duration_time for metrics Andi Kleen
2017-09-22 16:32   ` [tip:perf/core] perf " tip-bot for Andi Kleen
2017-08-31 19:40 ` [PATCH v3 10/11] perf, tools, stat: Hide internal duration_time counter Andi Kleen
2017-09-22 16:32   ` [tip:perf/core] perf " tip-bot for Andi Kleen
2017-08-31 19:40 ` [PATCH v3 11/11] perf, tools, stat: Update walltime_nsecs_stats in interval mode Andi Kleen
2017-09-22 16:33   ` [tip:perf/core] perf " tip-bot for Andi Kleen
2017-09-01 17:26 ` Support standalone metrics and metric groups for perf Jiri Olsa
2017-09-01 17:36   ` Jiri Olsa
2017-09-01 17:42   ` Andi Kleen
2017-09-01 17:50     ` Jiri Olsa

Reply instructions:

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

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

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

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

  git send-email \
    --in-reply-to=tip-2e006a24127ad88422632f9e5d6a8039a40f01da@git.kernel.org \
    --to=tipbot@zytor.com \
    --cc=acme@redhat.com \
    --cc=ak@linux.intel.com \
    --cc=hpa@zytor.com \
    --cc=jolsa@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=tglx@linutronix.de \
    /path/to/YOUR_REPLY

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

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.