From 6f4b1914d3f500c63fc0de412e7c357ffd9e1963 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Sat, 9 May 2020 19:21:53 -0400 Subject: [PATCH 1/3] add support for some raw events on intel skylake --- src/LinuxPerf.jl | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/src/LinuxPerf.jl b/src/LinuxPerf.jl index 53598d7..d144329 100644 --- a/src/LinuxPerf.jl +++ b/src/LinuxPerf.jl @@ -76,13 +76,30 @@ const EVENT_TYPES = (:stalled_cycles_backend, 8), # PERF_COUNT_HW_STALLED_CYCLES_BACKEND (:scaled_cycles, 9) # PERF_COUNT_HW_REF_CPU_CYCLES ]), - (:sw, 1, # PERF_TYPE_SOFTWARE + (:sw, PERF_TYPE_SOFTWARE, # PERF_TYPE_SOFTWARE [(:page_faults, 2), # PERF_COUNT_SW_PAGE_FAULTS (:ctx_switches, 3), # PERF_COUNT_SW_CONTEXT_SWITCHES (:cpu_migrations, 4), # PERF_COUNT_SW_CPU_MIGRATIONS (:minor_page_faults, 5), # PERF_COUNT_SW_PAGE_FAULTS_MIN (:major_page_faults, 6), # PERF_COUNT_SW_PAGE_FAULTS_MAJ - ]) + ]), + (:raw, PERF_TYPE_RAW, + # Skylake/Kabylake + [ + (:fp_arith_inst_retired_scalar_double, 0x01c7), # mul=1,vlen=1,ops=1 + (:fp_arith_inst_retired_scalar_single, 0x02c7), # mul=1,vlen=1,ops=1 + (:fp_arith_inst_retired_scalar, 0x03c7), + (:fp_arith_inst_retired_128B_packed_double, 0x04c7), # mul=2,vlen=2,ops=1 + (:fp_arith_inst_retired_128B_packed_single, 0x08c7), # mul=2,vlen=2,ops=1 + (:fp_arith_inst_retired_256B_packed_double, 0x10c7), # mul=4,vlen=4,ops=1 + (:fp_arith_inst_retired_double, 0x15c7), + (:fp_arith_inst_retired_256B_packed_single, 0x20c7), # mul=4,vlen=4,ops=1 + (:fp_arith_inst_retired_single, 0x2ac7), + (:fp_arith_inst_retired_packed, 0x3cc7), + (:fp_arith_inst_retired_512B_packed_double, 0x40c7), # mul=8,vlen=8,ops=1 AVX512 + (:mem_inst_retired_all_loads, 0x81d0), + (:mem_inst_retired_all_stores, 0x82d0), + ]) ] From 59be1c5ed3e863ff1fd1d56fcbc2fc7473c2ddf0 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Sun, 10 May 2020 00:55:01 -0400 Subject: [PATCH 2/3] add uncore --- src/LinuxPerf.jl | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/LinuxPerf.jl b/src/LinuxPerf.jl index d144329..bcac2cc 100644 --- a/src/LinuxPerf.jl +++ b/src/LinuxPerf.jl @@ -99,6 +99,10 @@ const EVENT_TYPES = (:fp_arith_inst_retired_512B_packed_double, 0x40c7), # mul=8,vlen=8,ops=1 AVX512 (:mem_inst_retired_all_loads, 0x81d0), (:mem_inst_retired_all_stores, 0x82d0), + # Skylake uncore + # https://www.intel.com/content/dam/www/public/us/en/documents/manuals/6th-gen-core-family-uncore-performance-monitoring-manual.pdf + (:unc_arb_trk_requests_all, 0x0180), + (:unc_arb_coh_trk_requests_all, 0x0184) ]) ] From 7ba3e80fe6528d2afb4b27b79e8d2086489828f6 Mon Sep 17 00:00:00 2001 From: Valentin Churavy Date: Sun, 10 May 2020 14:24:21 -0400 Subject: [PATCH 3/3] add counters for L1/L2/L3 on Skylake --- src/LinuxPerf.jl | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/LinuxPerf.jl b/src/LinuxPerf.jl index bcac2cc..4158496 100644 --- a/src/LinuxPerf.jl +++ b/src/LinuxPerf.jl @@ -98,7 +98,13 @@ const EVENT_TYPES = (:fp_arith_inst_retired_packed, 0x3cc7), (:fp_arith_inst_retired_512B_packed_double, 0x40c7), # mul=8,vlen=8,ops=1 AVX512 (:mem_inst_retired_all_loads, 0x81d0), - (:mem_inst_retired_all_stores, 0x82d0), + (:mem_inst_retired_all_stores, 0x82d0), + (:L1D_replacement, 0x0151), + (:L2_trans_L1D_wb, 0x10F0), + (:L2_trans_L2_wb, 0x40F0), + (:L2_lines_in_all, 0x70F1), + (:cas_count_rd, 0x0304), # ??? + (:cas_count_wr, 0x0c04), # ??? # Skylake uncore # https://www.intel.com/content/dam/www/public/us/en/documents/manuals/6th-gen-core-family-uncore-performance-monitoring-manual.pdf (:unc_arb_trk_requests_all, 0x0180),