# =======================================================================================
#
#      Filename:  perfmon_goldmont_events.txt
#
#      Description:  Event list for Intel Goldmont
#
#      Version:   <VERSION>
#      Released:  <DATE>
#
#      Author:   Jan Treibig (jt), jan.treibig@gmail.com
#                Thomas Gruber (tr), thomas.roehl@googlemail.com
#      Project:  likwid
#
#      Copyright (C) 2016 RRZE, University Erlangen-Nuremberg
#
#      This program is free software: you can redistribute it and/or modify it under
#      the terms of the GNU General Public License as published by the Free Software
#      Foundation, either version 3 of the License, or (at your option) any later
#      version.
#
#      This program is distributed in the hope that it will be useful, but WITHOUT ANY
#      WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
#      PARTICULAR PURPOSE.  See the GNU General Public License for more details.
#
#      You should have received a copy of the GNU General Public License along with
#      this program.  If not, see <http://www.gnu.org/licenses/>.
#
# =======================================================================================

EVENT_TEMP_CORE          0x00   TMP0
UMASK_TEMP_CORE          0x00

EVENT_PWR_PKG_ENERGY          0x02   PWR0
UMASK_PWR_PKG_ENERGY          0x00

EVENT_PWR_PP0_ENERGY          0x01   PWR1
UMASK_PWR_PP0_ENERGY          0x00

EVENT_PWR_PP1_ENERGY          0x04   PWR2
UMASK_PWR_PP1_ENERGY          0x00

EVENT_PWR_DRAM_ENERGY          0x03   PWR3
UMASK_PWR_DRAM_ENERGY          0x00

EVENT_INSTR_RETIRED              0x00   FIXC0
UMASK_INSTR_RETIRED_ANY          0x00

EVENT_CPU_CLK_UNHALTED           0x00   FIXC1
UMASK_CPU_CLK_UNHALTED_CORE      0x00

EVENT_CPU_CLK_UNHALTED           0x00   FIXC2
UMASK_CPU_CLK_UNHALTED_REF       0x00

EVENT_LD_BLOCKS                         0x03 PMC
UMASK_LD_BLOCKS_DATA_UNKNOWN            0x01
UMASK_LD_BLOCKS_STORE_FORWARD           0x02
UMASK_LD_BLOCKS_4K_ALIAS                0x04
UMASK_LD_BLOCKS_UTLB_MISS               0x08
UMASK_LD_BLOCKS_ALL_BLOCK               0x10

EVENT_PAGE_WALKS                    0x05 PMC
UMASK_PAGE_WALKS_D_SIDE_CYCLES      0x01
DEFAULT_OPTIONS_PAGE_WALKS_D_SIDE_COUNT EVENT_OPTION_EDGE=1
UMASK_PAGE_WALKS_D_SIDE_COUNT       0x01
UMASK_PAGE_WALKS_I_SIDE_CYCLES      0x02
DEFAULT_OPTIONS_PAGE_WALKS_I_SIDE_COUNT EVENT_OPTION_EDGE=1
UMASK_PAGE_WALKS_I_SIDE_COUNT       0x02
UMASK_PAGE_WALKS_CYCLES             0x03
DEFAULT_OPTIONS_PAGE_WALKS_COUNT EVENT_OPTION_EDGE=1
UMASK_PAGE_WALKS_COUNT              0x03

EVENT_UOPS_ISSUED                0x0E  PMC
UMASK_UOPS_ISSUED_ANY            0x00
DEFAULT_OPTIONS_UOPS_ISSUED_USED_CYCLES EVENT_OPTION_THRESHOLD=0x1
UMASK_UOPS_ISSUED_USED_CYCLES    0x00
DEFAULT_OPTIONS_UOPS_ISSUED_STALL_CYCLES EVENT_OPTION_THRESHOLD=0x1,EVENT_OPTION_INVERT=1
UMASK_UOPS_ISSUED_STALL_CYCLES   0x00
DEFAULT_OPTIONS_UOPS_ISSUED_TOTAL_CYCLES EVENT_OPTION_THRESHOLD=0xA,EVENT_OPTION_INVERT=1
UMASK_UOPS_ISSUED_TOTAL_CYCLES   0x00

EVENT_MISALIGN_MEM_REF                  0x13 PMC
UMASK_MISALIGN_MEM_REF_LOAD_PAGE_SPLIT  0x02
UMASK_MISALIGN_MEM_REF_STORE_PAGE_SPLIT 0x04

EVENT_LONGEST_LAT_CACHE                 0x2E PMC
UMASK_LONGEST_LAT_CACHE_MISS            0x41
UMASK_LONGEST_LAT_CACHE_REFERENCE       0x4F

EVENT_L2_REJECT_XQ                      0x30 PMC
UMASK_L2_REJECT_XQ_ALL                  0x00

EVENT_CORE_REJECT_L2Q                   0x31 PMC
UMASK_CORE_REJECT_L2Q_ALL               0x00

EVENT_CPU_CLOCK_UNHALTED                0x3C   PMC
UMASK_CPU_CLOCK_UNHALTED_THREAD_P       0x00
UMASK_CPU_CLOCK_UNHALTED_REF            0x01
DEFAULT_OPTIONS_CPU_CLOCK_UNHALTED_TOTAL_CYCLES EVENT_OPTION_THRESHOLD=0x2,EVENT_OPTION_INVERT=0x1
UMASK_CPU_CLOCK_UNHALTED_TOTAL_CYCLES   0x00

EVENT_DL1_DIRTY_EVICTION                0x51 PMC
UMASK_DL1_DIRTY_EVICTION                0x01

EVENT_ICACHE                            0x80 PMC
UMASK_ICACHE_HIT                        0x01
UMASK_ICACHE_MISSES                     0x02
UMASK_ICACHE_ACCESSES                   0x03

EVENT_ITLB_MISS                         0x81 PMC
UMASK_ITLB_MISS                         0x04

EVENT_FETCH_STALL                               0x86 PMC
UMASK_FETCH_STALL_ICACHE_FILL_PENDING_CYCLES    0x02
DEFAULT_OPTIONS_FETCH_STALL_ICACHE_FILL_PENDING_COUNT EVENT_OPTION_EDGE=1
UMASK_FETCH_STALL_ICACHE_FILL_PENDING_COUNT     0x02

EVENT_UOPS_NOT_DELIVERED_ANY            0x9C PMC
UMASK_UOPS_NOT_DELIVERED_ANY            0x00

EVENT_INST_RETIRED                      0xC0 PMC
UMASK_INST_RETIRED_ANY                  0x00
UMASK_INST_RETIRED_MS                   0x01

EVENT_MACHINE_CLEARS                    0xC3 PMC
UMASK_MACHINE_CLEARS_ALL                0x00
UMASK_MACHINE_CLEARS_SMC                0x01
UMASK_MACHINE_CLEARS_MEMORY_ORDERING    0x02
UMASK_MACHINE_CLEARS_FP_ASSIST          0x04
UMASK_MACHINE_CLEARS_DISAMBIGUATION     0x08

EVENT_BR_INST_RETIRED                   0xC4 PMC
UMASK_BR_INST_RETIRED_ALL_BRANCHES      0x00
UMASK_BR_INST_RETIRED_JCC               0x7E
UMASK_BR_INST_RETIRED_TAKEN_JCC         0xFE
UMASK_BR_INST_RETIRED_CALL              0xF9
UMASK_BR_INST_RETIRED_REL_CALL          0xFD
UMASK_BR_INST_RETIRED_IND_CALL          0xFB
UMASK_BR_INST_RETIRED_RETURN            0xF7
UMASK_BR_INST_RETIRED_NON_RETURN_IND    0xEB
UMASK_BR_INST_RETIRED_FAR_BRANCH        0xBF

EVENT_BR_MISP_RETIRED                   0xC5 PMC
UMASK_BR_MISP_RETIRED_ALL_BRANCHES      0x00
UMASK_BR_MISP_RETIRED_JCC               0x7E
UMASK_BR_MISP_RETIRED_TAKEN_JCC         0xFE
UMASK_BR_MISP_RETIRED_IND_CALL          0xFB
UMASK_BR_MISP_RETIRED_RETURN            0xF7
UMASK_BR_MISP_RETIRED_NON_RETURN_IND    0xEB

EVENT_ISSUE_SLOTS_NOT_CONSUMED                  0xCA PMC
UMASK_ISSUE_SLOTS_NOT_CONSUMED_ANY              0x00
UMASK_ISSUE_SLOTS_NOT_CONSUMED_RESOURCE_FULL    0x01
UMASK_ISSUE_SLOTS_NOT_CONSUMED_RECOVERY         0x02

EVENT_HW_INTERRUPTS                     0xCB PMC
UMASK_HW_INTERRUPTS_RECEIVED            0x01
UMASK_HW_INTERRUPTS_PENDING_AND_MASKED  0x04
DEFAULT_OPTIONS_HW_INTERRUPTS_PENDING_AND_MASKED_COUNT EVENT_OPTION_EDGE=1
UMASK_HW_INTERRUPTS_PENDING_AND_MASKED_COUNT  0x04

EVENT_CYCLES_DIV_BUSY                   0xCD PMC
UMASK_CYCLES_DIV_BUSY_ALL               0x00
UMASK_CYCLES_DIV_BUSY_IDIV              0x01
UMASK_CYCLES_DIV_BUSY_FPDIV             0x02
DEFAULT_OPTIONS_CYCLES_DIV_BUSY_ALL_COUNT EVENT_OPTION_EDGE=1,EVENT_OPTION_THRESHOLD=0x1
UMASK_CYCLES_DIV_BUSY_ALL_COUNT         0x00
DEFAULT_OPTIONS_CYCLES_DIV_BUSY_IDIV_COUNT EVENT_OPTION_EDGE=1,EVENT_OPTION_THRESHOLD=0x1
UMASK_CYCLES_DIV_BUSY_IDIV_COUNT        0x01
DEFAULT_OPTIONS_CYCLES_DIV_BUSY_FPDIV_COUNT EVENT_OPTION_EDGE=1,EVENT_OPTION_THRESHOLD=0x1
UMASK_CYCLES_DIV_BUSY_FPDIV_COUNT       0x02

EVENT_MEM_UOPS_RETIRED                  0xD0 PMC
UMASK_MEM_UOPS_RETIRED_ALL_LOADS        0x81
UMASK_MEM_UOPS_RETIRED_ALL_STORES       0x82
UMASK_MEM_UOPS_RETIRED_ALL              0x83
UMASK_MEM_UOPS_RETIRED_DTLB_MISS_LOADS  0x11
UMASK_MEM_UOPS_RETIRED_DTLB_MISS_STORES 0x12
UMASK_MEM_UOPS_RETIRED_DTLB_MISS        0x13
UMASK_MEM_UOPS_RETIRED_LOCK_LOADS       0x21
UMASK_MEM_UOPS_RETIRED_SPLIT_LOADS      0x41
UMASK_MEM_UOPS_RETIRED_SPLIT_STORES     0x42
UMASK_MEM_UOPS_RETIRED_SPLIT_ALL        0x43

EVENT_MEM_LOAD_UOPS_RETIRED             0xD1 PMC
UMASK_MEM_LOAD_UOPS_RETIRED_L1_HIT      0x01
UMASK_MEM_LOAD_UOPS_RETIRED_L1_MISS     0x08
UMASK_MEM_LOAD_UOPS_RETIRED_L2_HIT      0x02
UMASK_MEM_LOAD_UOPS_RETIRED_L2_MISS     0x10
UMASK_MEM_LOAD_UOPS_RETIRED_HITM        0x20
UMASK_MEM_LOAD_UOPS_RETIRED_WCB_HIT     0x40
UMASK_MEM_LOAD_UOPS_RETIRED_DRAM_HIT    0x80

EVENT_BACLEARS                      0xE6 PMC
UMASK_BACLEARS_ALL                  0x01
UMASK_BACLEARS_RETURN               0x08
UMASK_BACLEARS_COND                 0x10

EVENT_MS_DECODED_MS_ENTRY           0xE7 PMC
UMASK_MS_DECODED_MS_ENTRY           0x01

EVENT_DECODE_RESTRICTION                 0xE9 PMC
UMASK_DECODE_RESTRICTION_PREDECODE_WRONG 0x01

EVENT_OFFCORE_RESPONSE_0                            0xB7 PMC
OPTIONS_OFFCORE_RESPONSE_0_OPTIONS                  EVENT_OPTION_MATCH0_MASK|EVENT_OPTION_MATCH1_MASK
UMASK_OFFCORE_RESPONSE_0_OPTIONS                    0x01 0xFF 0xFF

EVENT_OFFCORE_RESPONSE_1                            0xBB PMC
OPTIONS_OFFCORE_RESPONSE_1_OPTIONS                  EVENT_OPTION_MATCH0_MASK|EVENT_OPTION_MATCH1_MASK
UMASK_OFFCORE_RESPONSE_1_OPTIONS                    0x01 0xFF 0xFF

