# =======================================================================================
#
#      Filename:  perfmon_k8_events.txt
#
#      Description:  Event list for AMD K8
#
#      Version:   5.1.0
#      Released:  20.11.2020
#
#      Author:   Jan Treibig (jt), jan.treibig@gmail.com
#                Thomas Gruber (tr), thomas.roehl@googlemail.com
#      Project:  likwid
#
#      Copyright (C) 2020 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_DISPATCHED_FP_OP                            0x00     PMC
UMASK_DISPATCHED_FP_OP_ADD_PIPE                   0x01
UMASK_DISPATCHED_FP_OP_MULTIPLY_PIPE              0x02
UMASK_DISPATCHED_FP_OP_STORE_PIPE                 0x04
UMASK_DISPATCHED_FP_OP_ADD_PIPE_LOAD              0x08
UMASK_DISPATCHED_FP_OP_MULTIPLY_PIPE_LOAD         0x10
UMASK_DISPATCHED_FP_OP_STORE_PIPE_LOAD            0x20

EVENT_FPU_EMPTY                0x01     PMC
UMASK_FPU_EMPTY                0x00

EVENT_DISPATCHED_FAST_FPU      0x02     PMC
UMASK_DISPATCHED_FAST_FPU      0x00

EVENT_SEGMENT_REGISTER_LOAD             0x20     PMC
UMASK_SEGMENT_REGISTER_LOAD_ES             0x01
UMASK_SEGMENT_REGISTER_LOAD_CS             0x02
UMASK_SEGMENT_REGISTER_LOAD_SS             0x04
UMASK_SEGMENT_REGISTER_LOAD_DS             0x08
UMASK_SEGMENT_REGISTER_LOAD_FS             0x10
UMASK_SEGMENT_REGISTER_LOAD_GS             0x20
UMASK_SEGMENT_REGISTER_LOAD_HS             0x40

EVENT_PIPELINE_RESTART_SELF_MOD         0x21     PMC
UMASK_PIPELINE_RESTART_SELF_MOD         0x00

EVENT_PIPELINE_RESTART_PROBE_HIT        0x22     PMC
UMASK_PIPELINE_RESTART_PROBE_HIT        0x00

EVENT_LS_BUFFER_FULL                    0x23     PMC
UMASK_LS_BUFFER_FULL                    0x00

EVENT_LOCKED_OPERATION                     0x24     PMC
UMASK_LOCKED_OPERATION_INSTRUCTIONS        0x01
UMASK_LOCKED_OPERATION_SPECULATIVE_CYC     0x02
UMASK_LOCKED_OPERATION_NON_SPECULATIVE_CYC 0x04


EVENT_DATA_CACHE_ACCESSES        0x40     PMC
UMASK_DATA_CACHE_ACCESSES        0x00

EVENT_DATA_CACHE_MISSES          0x41     PMC
UMASK_DATA_CACHE_MISSES          0x00

EVENT_DATA_CACHE_REFILLS                0x42     PMC
UMASK_DATA_CACHE_REFILLS_NORTHBRIDGE    0x01
UMASK_DATA_CACHE_REFILLS_L2_SHARED      0x02
UMASK_DATA_CACHE_REFILLS_L2_EXCLUSIVE   0x04
UMASK_DATA_CACHE_REFILLS_L2_OWNED       0x08
UMASK_DATA_CACHE_REFILLS_L2_MODIFIED    0x10
UMASK_DATA_CACHE_REFILLS_L2_ALL         0x1F

EVENT_DATA_CACHE_REFILLS_NORTHBRIDGE    0x43     PMC
UMASK_DATA_CACHE_REFILLS_NORTHBRIDGE_INVALID     0x01
UMASK_DATA_CACHE_REFILLS_NORTHBRIDGE_SHARED      0x02
UMASK_DATA_CACHE_REFILLS_NORTHBRIDGE_EXCLUSIVE   0x04
UMASK_DATA_CACHE_REFILLS_NORTHBRIDGE_OWNED       0x08
UMASK_DATA_CACHE_REFILLS_NORTHBRIDGE_MODIFIED    0x10
UMASK_DATA_CACHE_REFILLS_NORTHBRIDGE_ALL         0x1E

EVENT_DATA_CACHE_EVICTED     0x44     PMC
UMASK_DATA_CACHE_EVICTED_INVALID     0x01
UMASK_DATA_CACHE_EVICTED_SHARED      0x02
UMASK_DATA_CACHE_EVICTED_EXCLUSIVE   0x04
UMASK_DATA_CACHE_EVICTED_OWNED       0x08
UMASK_DATA_CACHE_EVICTED_MODIFIED    0x10
UMASK_DATA_CACHE_EVICTED_PREFETCH_NTA         0x20
UMASK_DATA_CACHE_EVICTED_NOT_PREFETCH_NTA     0x40
UMASK_DATA_CACHE_EVICTED_ALL     0x1F

EVENT_DTLB_L2_HIT                 0x45     PMC
UMASK_DTLB_L2_HIT_4KB             0x01
UMASK_DTLB_L2_HIT_2MB             0x02
UMASK_DTLB_L2_HIT_1GB             0x04
UMASK_DTLB_L2_HIT_ANY             0x07

EVENT_DTLB_L2_MISS                 0x46     PMC
UMASK_DTLB_L2_MISS_4KB             0x01
UMASK_DTLB_L2_MISS_2MB             0x02
UMASK_DTLB_L2_MISS_1GB             0x04
UMASK_DTLB_L2_MISS_ANY             0x07

EVENT_MISALIGNED_ACCESS           0x47     PMC
UMASK_MISALIGNED_ACCESS           0x00

EVENT_LATE_CANCEL_ACCESS           0x48     PMC
UMASK_LATE_CANCEL_ACCESS           0x00

EVENT_EARLY_CANCEL_ACCESS           0x49     PMC
UMASK_EARLY_CANCEL_ACCESS           0x00

EVENT_SINGLE_BIT_ERRORS             0x4A     PMC
UMASK_SINGLE_BIT_ERRORS_SCRUBBER    0x01
UMASK_SINGLE_BIT_ERRORS_PIGGYBACK   0x02
UMASK_SINGLE_BIT_ERRORS_LOAD_PIPE   0x04
UMASK_SINGLE_BIT_ERRORS_STORE_PIPE  0x08

EVENT_PREFETCH_INSTRUCTION_DISPATCHED   0x4B     PMC
UMASK_PREFETCH_INSTRUCTION_DISPATCHED_LOAD   0x01
UMASK_PREFETCH_INSTRUCTION_DISPATCHED_STORE  0x02
UMASK_PREFETCH_INSTRUCTION_DISPATCHED_NTA    0x04

EVENT_DCACHE_LOCK_MISS           0x4C     PMC
UMASK_DCACHE_LOCK_MISS           0x02

EVENT_MEMORY_REQUEST                            0x65     PMC
UMASK_MEMORY_REQUEST_NON_CACHEABLE              0x01
UMASK_MEMORY_REQUEST_WRITE_COMBINED             0x02
UMASK_MEMORY_REQUEST_STREAMING_STORE            0x80

EVENT_DATA_PREFETCHER             0x67     PMC
UMASK_DATA_PREFETCHER_CANCELED    0x01
UMASK_DATA_PREFETCHER_ATTEMPTS    0x02

EVENT_NORTHBRIDGE_READ_RESPONSE     0x6C     PMC
UMASK_NORTHBRIDGE_READ_RESPONSE_EXCLUSIVE      0x01
UMASK_NORTHBRIDGE_READ_RESPONSE_MODIFIED       0x02
UMASK_NORTHBRIDGE_READ_RESPONSE_SHARED         0x04

EVENT_QUADWORDS_WRITE_TRANSFERS           0x6D     PMC
UMASK_QUADWORDS_WRITE_TRANSFERS           0x01

EVENT_L2_REQUESTS           0x7D     PMC
UMASK_L2_REQUESTS_ICACHE_FILL           0x01
UMASK_L2_REQUESTS_DCACHE_FILL           0x02
UMASK_L2_REQUESTS_TLBCACHE_FILL         0x04
UMASK_L2_REQUESTS_TAG_SNOOP_REQUEST     0x08
UMASK_L2_REQUESTS_CANCELLED_REQUEST     0x10

EVENT_L2_MISSES           0x7E     PMC
UMASK_L2_MISSES_ICACHE_FILL           0x01
UMASK_L2_MISSES_DCACHE_FILL           0x02
UMASK_L2_MISSES_TLB_WALK              0x04

EVENT_L2_FILL           0x7F     PMC
UMASK_L2_FILL_VICTIMS           0x01
UMASK_L2_FILL_WRITEBACKS        0x02

EVENT_ICACHE_FETCHES           0x80     PMC
UMASK_ICACHE_FETCHES           0x00

EVENT_ICACHE_MISSES           0x81     PMC
UMASK_ICACHE_MISSES           0x00

EVENT_ICACHE_REFILLS_L2           0x82     PMC
UMASK_ICACHE_REFILLS_L2           0x00

EVENT_ICACHE_REFILLS_MEM          0x83     PMC
UMASK_ICACHE_REFILLS_MEM          0x00

EVENT_ITLB_L2_HIT          0x84     PMC
UMASK_ITLB_L2_HIT          0x00

EVENT_ITLB_L2_MISS           0x85     PMC
UMASK_ITLB_L2_MISS_4KB       0x01
UMASK_ITLB_L2_MISS_2MB       0x02
UMASK_ITLB_L2_MISS_ANY       0x03

EVENT_PIPELINE_RESTART_STREAM_PROBE    0x86     PMC
UMASK_PIPELINE_RESTART_STREAM_PROBE    0x00

EVENT_INSTRUCTION_FETCH_STALL    0x87     PMC
UMASK_INSTRUCTION_FETCH_STALL    0x00

EVENT_RETURN_STACK_HITS    0x88     PMC
UMASK_RETURN_STACK_HITS    0x00

EVENT_RETURN_STACK_OVERFLOW    0x89     PMC
UMASK_RETURN_STACK_OVERFLOW    0x00

EVENT_RETIRED_CLFLUSH                    0x26     PMC
UMASK_RETIRED_CLFLUSH                    0x00

EVENT_RETIRED_CPUID                    0x26     PMC
UMASK_RETIRED_CPUID                    0x00

EVENT_CPU_CLOCKS_UNHALTED           0x76     PMC
UMASK_CPU_CLOCKS_UNHALTED           0x00


EVENT_INSTRUCTIONS_RETIRED    0xC0     PMC
UMASK_INSTRUCTIONS_RETIRED    0x00

EVENT_UOPS_RETIRED    0xC1     PMC
UMASK_UOPS_RETIRED    0x00

EVENT_BRANCH_RETIRED    0xC2     PMC
UMASK_BRANCH_RETIRED    0x00

EVENT_BRANCH_MISPREDICT_RETIRED    0xC3     PMC
UMASK_BRANCH_MISPREDICT_RETIRED    0x00

EVENT_BRANCH_TAKEN_RETIRED    0xC4     PMC
UMASK_BRANCH_TAKEN_RETIRED    0x00

EVENT_BRANCH_TAKEN_MISPREDICTED_RETIRED    0xC5     PMC
UMASK_BRANCH_TAKEN_MISPREDICTED_RETIRED    0x00

EVENT_TRANSFER_FAR_CONTROL_RETIRED    0xC6     PMC
UMASK_TRANSFER_FAR_CONTROL_RETIRED    0x00

EVENT_BRANCH_RESYNCS_RETIRED    0xC7     PMC
UMASK_BRANCH_RESYNCS_RETIRED    0x00

EVENT_NEAR_RETURNS_RETIRED    0xC8     PMC
UMASK_NEAR_RETURNS_RETIRED    0x00

EVENT_NEAR_RETURNS_MISPREDICTED_RETIRED    0xC9     PMC
UMASK_NEAR_RETURNS_MISPREDICTED_RETIRED    0x00

EVENT_BRANCH_INDIRECT_MISPREDICT_RETIRED    0xCA     PMC
UMASK_BRANCH_INDIRECT_MISPREDICT_RETIRED    0x00

EVENT_INSTRUCTIONS_RETIRED    0xCB     PMC
UMASK_INSTRUCTIONS_RETIRED_X87    0x01
UMASK_INSTRUCTIONS_RETIRED_MMX    0x02
UMASK_INSTRUCTIONS_RETIRED_SSE    0x04

EVENT_FASTPATH_RETIRED    0xCC     PMC
UMASK_FASTPATH_RETIRED_0    0x01
UMASK_FASTPATH_RETIRED_1    0x02
UMASK_FASTPATH_RETIRED_2    0x04

EVENT_INTERRUPTS_MASKED_CYCLES    0xCE     PMC
UMASK_INTERRUPTS_MASKED_CYCLES    0x00

EVENT_INTERRUPTS_TAKEN    0xCF     PMC
UMASK_INTERRUPTS_TAKEN    0x00

EVENT_DECODER_EMPTY_CYCLES    0xD0     PMC
UMASK_DECODER_EMPTY_CYCLES    0x00

EVENT_DISPATCH_STALLS    0xD1     PMC
UMASK_DISPATCH_STALLS    0x00

EVENT_DISPATCH_STALLS_BRANCH    0xD2     PMC
UMASK_DISPATCH_STALLS_BRANCH    0x00

EVENT_DISPATCH_STALLS_SERIAL    0xD3     PMC
UMASK_DISPATCH_STALLS_SERIAL    0x00

EVENT_DISPATCH_STALLS_SEGMENT_LOAD    0xD4     PMC
UMASK_DISPATCH_STALLS_SEGMENT_LOAD    0x00

EVENT_DISPATCH_STALLS_ROB_FULL    0xD5     PMC
UMASK_DISPATCH_STALLS_ROB_FULL    0x00

EVENT_DISPATCH_STALLS_RES_FULL    0xD6     PMC
UMASK_DISPATCH_STALLS_RES_FULL    0x00

EVENT_DISPATCH_STALLS_FPU_FULL    0xD7     PMC
UMASK_DISPATCH_STALLS_FPU_FULL    0x00

EVENT_DISPATCH_STALLS_LS_FULL    0xD8     PMC
UMASK_DISPATCH_STALLS_LS_FULL    0x00

EVENT_DISPATCH_STALLS_ALL_QUIT    0xD9     PMC
UMASK_DISPATCH_STALLS_ALL_QUIT    0x00

EVENT_DISPATCH_STALLS_DRAIN    0xDA     PMC
UMASK_DISPATCH_STALLS_DRAIN    0x00

EVENT_FPU_EXCEPTIONS    0xDB     PMC
UMASK_FPU_EXCEPTIONS_X87_RECLASS   0x01
UMASK_FPU_EXCEPTIONS_SSE_RETYPE    0x02
UMASK_FPU_EXCEPTIONS_SSE_RECLASS   0x04
UMASK_FPU_EXCEPTIONS_MICROTRAPS    0x08


EVENT_DRAM_ACCESSES    0xE0     PMC
UMASK_DRAM_ACCESSES_ALL             0x00
UMASK_DRAM_ACCESSES_PAGE_HIT        0x01
UMASK_DRAM_ACCESSES_PAGE_MISS       0x02
UMASK_DRAM_ACCESSES_PAGE_CONFLICT   0x04

EVENT_DRAM_PAGE_TABLE_OVERFLOW    0xE1     PMC
UMASK_DRAM_PAGE_TABLE_OVERFLOW_ALL        0x00

EVENT_DRAM_CONTROLLER_TURNAROUNDS    0xE3     PMC
UMASK_DRAM_CONTROLLER_TURNAROUNDS_CHIP_SELECT       0x01
UMASK_DRAM_CONTROLLER_TURNAROUNDS_READ_TO_WRITE     0x02
UMASK_DRAM_CONTROLLER_TURNAROUNDS_WRITE_TO_READ     0x04

EVENT_DRAM_CONTROLLER_BYPASS_SATURATION    0xE4     PMC
UMASK_DRAM_CONTROLLER_BYPASS_SATURATION_HIGH       0x01
UMASK_DRAM_CONTROLLER_BYPASS_SATURATION_MEDIUM     0x02
UMASK_DRAM_CONTROLLER_BYPASS_SATURATION_DRAM_INTERFACE       0x04
UMASK_DRAM_CONTROLLER_BYPASS_SATURATION_DRAM_QUEUE           0x08

EVENT_DRAM_SIZED_BLOCKS       0xE5     PMC
UMASK_DRAM_SIZED_BLOCKS_WRITES_32       0x04
UMASK_DRAM_SIZED_BLOCKS_WRITES_64       0x08
UMASK_DRAM_SIZED_BLOCKS_READS_32        0x10
UMASK_DRAM_SIZED_BLOCKS_READS_64        0x20


EVENT_CACHE_BLOCK_COMMANDS    0xEA     PMC
UMASK_CACHE_BLOCK_COMMANDS_VICTIM         0x01
UMASK_CACHE_BLOCK_COMMANDS_READ           0x04
UMASK_CACHE_BLOCK_COMMANDS_READ_SHARED    0x08
UMASK_CACHE_BLOCK_COMMANDS_READ_MODIFIED  0x10
UMASK_CACHE_BLOCK_COMMANDS_DIRTY          0x20

EVENT_HYPERTRANSPORT_LINK0       0xF6     PMC
UMASK_HYPERTRANSPORT_LINK0_CMD_DWORD_SENT       0x01
UMASK_HYPERTRANSPORT_LINK0_DATA_DWORD_SENT       0x02
UMASK_HYPERTRANSPORT_LINK0_BUFFER_RELEASE_DWORD_SENT       0x04
UMASK_HYPERTRANSPORT_LINK0_IDLE       0x08

EVENT_HYPERTRANSPORT_LINK1       0xF7     PMC
UMASK_HYPERTRANSPORT_LINK1_CMD_DWORD_SENT       0x01
UMASK_HYPERTRANSPORT_LINK1_DATA_DWORD_SENT       0x02
UMASK_HYPERTRANSPORT_LINK1_BUFFER_RELEASE_DWORD_SENT       0x04
UMASK_HYPERTRANSPORT_LINK1_IDLE       0x08

EVENT_HYPERTRANSPORT_LINK2       0xF8     PMC
UMASK_HYPERTRANSPORT_LINK2_CMD_DWORD_SENT       0x01
UMASK_HYPERTRANSPORT_LINK2_DATA_DWORD_SENT       0x02
UMASK_HYPERTRANSPORT_LINK2_BUFFER_RELEASE_DWORD_SENT       0x04
UMASK_HYPERTRANSPORT_LINK2_IDLE       0x08


