mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
Merge branch 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf updates from Ingo Molnar:
"Kernel side changes:
- Add branch type profiling/tracing support. (Jin Yao)
- Add the PERF_SAMPLE_PHYS_ADDR ABI to allow the tracing/profiling of
physical memory addresses, where the PMU supports it. (Kan Liang)
- Export some PMU capability details in the new
/sys/bus/event_source/devices/cpu/caps/ sysfs directory. (Andi
Kleen)
- Aux data fixes and updates (Will Deacon)
- kprobes fixes and updates (Masami Hiramatsu)
- AMD uncore PMU driver fixes and updates (Janakarajan Natarajan)
On the tooling side, here's a (limited!) list of highlights - there
were many other changes that I could not list, see the shortlog and
git history for details:
UI improvements:
- Implement a visual marker for fused x86 instructions in the
annotate TUI browser, available now in 'perf report', more work
needed to have it available as well in 'perf top' (Jin Yao)
Further explanation from one of Jin's patches:
│ ┌──cmpl $0x0,argp_program_version_hook
81.93 │ ├──je 20
│ │ lock cmpxchg %esi,0x38a9a4(%rip)
│ │↓ jne 29
│ │↓ jmp 43
11.47 │20:└─→cmpxch %esi,0x38a999(%rip)
That means the cmpl+je is a fused instruction pair and they should
be considered together.
- Record the branch type and then show statistics and info about in
callchain entries (Jin Yao)
Example from one of Jin's patches:
# perf record -g -j any,save_type
# perf report --branch-history --stdio --no-children
38.50% div.c:45 [.] main div
|
---main div.c:42 (RET CROSS_2M cycles:2)
compute_flag div.c:28 (cycles:2)
compute_flag div.c:27 (RET CROSS_2M cycles:1)
rand rand.c:28 (cycles:1)
rand rand.c:28 (RET CROSS_2M cycles:1)
__random random.c:298 (cycles:1)
__random random.c:297 (COND_BWD CROSS_2M cycles:1)
__random random.c:295 (cycles:1)
__random random.c:295 (COND_BWD CROSS_2M cycles:1)
__random random.c:295 (cycles:1)
__random random.c:295 (RET CROSS_2M cycles:9)
namespaces support:
- Add initial support for namespaces, using setns to access files in
namespaces, grabbing their build-ids, etc. (Krister Johansen)
perf trace enhancements:
- Beautify pkey_{alloc,free,mprotect} arguments in 'perf trace'
(Arnaldo Carvalho de Melo)
- Add initial 'clone' syscall args beautifier in 'perf trace'
(Arnaldo Carvalho de Melo)
- Ignore 'fd' and 'offset' args for MAP_ANONYMOUS in 'perf trace'
(Arnaldo Carvalho de Melo)
- Beautifiers for the 'cmd' arg of several ioctl types, including:
sound, DRM, KVM, vhost virtio and perf_events. (Arnaldo Carvalho de
Melo)
- Add PERF_SAMPLE_CALLCHAIN and PERF_RECORD_MMAP[2] to 'perf data'
CTF conversion, allowing CTF trace visualization tools to show
callchains and to resolve symbols (Geneviève Bastien)
- Beautify the fcntl syscall, which is an interesting one in the
sense that infrastructure had to be put in place to change the
formatters of some arguments according to the value in a previous
one, i.e. cmd dictates how arg and the syscall return will be
formatted. (Arnaldo Carvalho de Melo
perf stat enhancements:
- Use group read for event groups in 'perf stat', reducing overhead
when groups are defined in the event specification, i.e. when using
{} to enclose a list of events, asking them to be read at the same
time, e.g.: "perf stat -e '{cycles,instructions}'" (Jiri Olsa)
pipe mode improvements:
- Process tracing data in 'perf annotate' pipe mode (David
Carrillo-Cisneros)
- Add header record types to pipe-mode, now this command:
$ perf record -o - -e cycles sleep 1 | perf report --stdio --header
Will show the same as in non-pipe mode, i.e. involving a perf.data
file (David Carrillo-Cisneros)
Vendor specific hardware event support updates/enhancements:
- Update POWER9 vendor events tables (Sukadev Bhattiprolu)
- Add POWER9 PMU events Sukadev (Bhattiprolu)
- Support additional POWER8+ PVR in PMU mapfile (Shriya)
- Add Skylake server uncore JSON vendor events (Andi Kleen)
- Support exporting Intel PT data to sqlite3 with python perf
scripts, this is in addition to the postgresql support that was
already there (Adrian Hunter)"
* 'perf-core-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (253 commits)
perf symbols: Fix plt entry calculation for ARM and AARCH64
perf probe: Fix kprobe blacklist checking condition
perf/x86: Fix caps/ for !Intel
perf/core, x86: Add PERF_SAMPLE_PHYS_ADDR
perf/core, pt, bts: Get rid of itrace_started
perf trace beauty: Beautify pkey_{alloc,free,mprotect} arguments
tools headers: Sync cpu features kernel ABI headers with tooling headers
perf tools: Pass full path of FEATURES_DUMP
perf tools: Robustify detection of clang binary
tools lib: Allow external definition of CC, AR and LD
perf tools: Allow external definition of flex and bison binary names
tools build tests: Don't hardcode gcc name
perf report: Group stat values on global event id
perf values: Zero value buffers
perf values: Fix allocation check
perf values: Fix thread index bug
perf report: Add dump_read function
perf record: Set read_format for inherit_stat
perf c2c: Fix remote HITM detection for Skylake
perf tools: Fix static build with newer toolchains
...
This commit is contained in:
commit
9657752cb5
311 changed files with 22585 additions and 1963 deletions
|
|
@ -203,6 +203,14 @@ struct kvm_arch_memory_slot {
|
|||
#define KVM_DEV_ARM_VGIC_LINE_LEVEL_INTID_MASK 0x3ff
|
||||
#define VGIC_LEVEL_INFO_LINE_LEVEL 0
|
||||
|
||||
/* Device Control API on vcpu fd */
|
||||
#define KVM_ARM_VCPU_PMU_V3_CTRL 0
|
||||
#define KVM_ARM_VCPU_PMU_V3_IRQ 0
|
||||
#define KVM_ARM_VCPU_PMU_V3_INIT 1
|
||||
#define KVM_ARM_VCPU_TIMER_CTRL 1
|
||||
#define KVM_ARM_VCPU_TIMER_IRQ_VTIMER 0
|
||||
#define KVM_ARM_VCPU_TIMER_IRQ_PTIMER 1
|
||||
|
||||
#define KVM_DEV_ARM_VGIC_CTRL_INIT 0
|
||||
#define KVM_DEV_ARM_ITS_SAVE_TABLES 1
|
||||
#define KVM_DEV_ARM_ITS_RESTORE_TABLES 2
|
||||
|
|
|
|||
|
|
@ -232,6 +232,9 @@ struct kvm_arch_memory_slot {
|
|||
#define KVM_ARM_VCPU_PMU_V3_CTRL 0
|
||||
#define KVM_ARM_VCPU_PMU_V3_IRQ 0
|
||||
#define KVM_ARM_VCPU_PMU_V3_INIT 1
|
||||
#define KVM_ARM_VCPU_TIMER_CTRL 1
|
||||
#define KVM_ARM_VCPU_TIMER_IRQ_VTIMER 0
|
||||
#define KVM_ARM_VCPU_TIMER_IRQ_PTIMER 1
|
||||
|
||||
/* KVM_IRQ_LINE irq field index values */
|
||||
#define KVM_ARM_IRQ_TYPE_SHIFT 24
|
||||
|
|
|
|||
|
|
@ -60,6 +60,12 @@ struct kvm_regs {
|
|||
|
||||
#define KVM_SREGS_E_FSL_PIDn (1 << 0) /* PID1/PID2 */
|
||||
|
||||
/* flags for kvm_run.flags */
|
||||
#define KVM_RUN_PPC_NMI_DISP_MASK (3 << 0)
|
||||
#define KVM_RUN_PPC_NMI_DISP_FULLY_RECOV (1 << 0)
|
||||
#define KVM_RUN_PPC_NMI_DISP_LIMITED_RECOV (2 << 0)
|
||||
#define KVM_RUN_PPC_NMI_DISP_NOT_RECOV (3 << 0)
|
||||
|
||||
/*
|
||||
* Feature bits indicate which sections of the sregs struct are valid,
|
||||
* both in KVM_GET_SREGS and KVM_SET_SREGS. On KVM_SET_SREGS, registers
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@
|
|||
#define KVM_DEV_FLIC_CLEAR_IO_IRQ 8
|
||||
#define KVM_DEV_FLIC_AISM 9
|
||||
#define KVM_DEV_FLIC_AIRQ_INJECT 10
|
||||
#define KVM_DEV_FLIC_AISM_ALL 11
|
||||
/*
|
||||
* We can have up to 4*64k pending subchannels + 8 adapter interrupts,
|
||||
* as well as up to ASYNC_PF_PER_VCPU*KVM_MAX_VCPUS pfault done interrupts.
|
||||
|
|
@ -53,6 +54,11 @@ struct kvm_s390_ais_req {
|
|||
__u16 mode;
|
||||
};
|
||||
|
||||
struct kvm_s390_ais_all {
|
||||
__u8 simm;
|
||||
__u8 nimm;
|
||||
};
|
||||
|
||||
#define KVM_S390_IO_ADAPTER_MASK 1
|
||||
#define KVM_S390_IO_ADAPTER_MAP 2
|
||||
#define KVM_S390_IO_ADAPTER_UNMAP 3
|
||||
|
|
@ -70,6 +76,7 @@ struct kvm_s390_io_adapter_req {
|
|||
#define KVM_S390_VM_TOD 1
|
||||
#define KVM_S390_VM_CRYPTO 2
|
||||
#define KVM_S390_VM_CPU_MODEL 3
|
||||
#define KVM_S390_VM_MIGRATION 4
|
||||
|
||||
/* kvm attributes for mem_ctrl */
|
||||
#define KVM_S390_VM_MEM_ENABLE_CMMA 0
|
||||
|
|
@ -151,6 +158,11 @@ struct kvm_s390_vm_cpu_subfunc {
|
|||
#define KVM_S390_VM_CRYPTO_DISABLE_AES_KW 2
|
||||
#define KVM_S390_VM_CRYPTO_DISABLE_DEA_KW 3
|
||||
|
||||
/* kvm attributes for migration mode */
|
||||
#define KVM_S390_VM_MIGRATION_STOP 0
|
||||
#define KVM_S390_VM_MIGRATION_START 1
|
||||
#define KVM_S390_VM_MIGRATION_STATUS 2
|
||||
|
||||
/* for KVM_GET_REGS and KVM_SET_REGS */
|
||||
struct kvm_regs {
|
||||
/* general purpose regs for s390 */
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@
|
|||
#define X86_FEATURE_PERFCTR_NB ( 6*32+24) /* NB performance counter extensions */
|
||||
#define X86_FEATURE_BPEXT (6*32+26) /* data breakpoint extension */
|
||||
#define X86_FEATURE_PTSC ( 6*32+27) /* performance time-stamp counter */
|
||||
#define X86_FEATURE_PERFCTR_L2 ( 6*32+28) /* L2 performance counter extensions */
|
||||
#define X86_FEATURE_PERFCTR_LLC ( 6*32+28) /* Last Level Cache performance counter extensions */
|
||||
#define X86_FEATURE_MWAITX ( 6*32+29) /* MWAIT extension (MONITORX/MWAITX) */
|
||||
|
||||
/*
|
||||
|
|
@ -286,6 +286,7 @@
|
|||
#define X86_FEATURE_PAUSEFILTER (15*32+10) /* filtered pause intercept */
|
||||
#define X86_FEATURE_PFTHRESHOLD (15*32+12) /* pause filter threshold */
|
||||
#define X86_FEATURE_AVIC (15*32+13) /* Virtual Interrupt Controller */
|
||||
#define X86_FEATURE_V_VMSAVE_VMLOAD (15*32+15) /* Virtual VMSAVE VMLOAD */
|
||||
|
||||
/* Intel-defined CPU features, CPUID level 0x00000007:0 (ecx), word 16 */
|
||||
#define X86_FEATURE_AVX512VBMI (16*32+ 1) /* AVX512 Vector Bit Manipulation instructions*/
|
||||
|
|
|
|||
|
|
@ -10,3 +10,6 @@
|
|||
#ifndef __NR_getcpu
|
||||
# define __NR_getcpu 318
|
||||
#endif
|
||||
#ifndef __NR_setns
|
||||
# define __NR_setns 346
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -10,3 +10,6 @@
|
|||
#ifndef __NR_getcpu
|
||||
# define __NR_getcpu 309
|
||||
#endif
|
||||
#ifndef __NR_setns
|
||||
#define __NR_setns 308
|
||||
#endif
|
||||
|
|
|
|||
17
tools/arch/x86/include/uapi/asm/unistd.h
Normal file
17
tools/arch/x86/include/uapi/asm/unistd.h
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#ifndef _UAPI_ASM_X86_UNISTD_H
|
||||
#define _UAPI_ASM_X86_UNISTD_H
|
||||
|
||||
/* x32 syscall flag bit */
|
||||
#define __X32_SYSCALL_BIT 0x40000000
|
||||
|
||||
#ifndef __KERNEL__
|
||||
# ifdef __i386__
|
||||
# include <asm/unistd_32.h>
|
||||
# elif defined(__ILP32__)
|
||||
# include <asm/unistd_x32.h>
|
||||
# else
|
||||
# include <asm/unistd_64.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif /* _UAPI_ASM_X86_UNISTD_H */
|
||||
|
|
@ -64,7 +64,8 @@ FEATURE_TESTS_BASIC := \
|
|||
get_cpuid \
|
||||
bpf \
|
||||
sched_getcpu \
|
||||
sdt
|
||||
sdt \
|
||||
setns
|
||||
|
||||
# FEATURE_TESTS_BASIC + FEATURE_TESTS_EXTRA is the complete list
|
||||
# of all feature tests
|
||||
|
|
|
|||
|
|
@ -49,7 +49,8 @@ FILES= \
|
|||
test-sdt.bin \
|
||||
test-cxx.bin \
|
||||
test-jvmti.bin \
|
||||
test-sched_getcpu.bin
|
||||
test-sched_getcpu.bin \
|
||||
test-setns.bin
|
||||
|
||||
FILES := $(addprefix $(OUTPUT),$(FILES))
|
||||
|
||||
|
|
@ -95,6 +96,9 @@ $(OUTPUT)test-glibc.bin:
|
|||
$(OUTPUT)test-sched_getcpu.bin:
|
||||
$(BUILD)
|
||||
|
||||
$(OUTPUT)test-setns.bin:
|
||||
$(BUILD)
|
||||
|
||||
DWARFLIBS := -ldw
|
||||
ifeq ($(findstring -static,${LDFLAGS}),-static)
|
||||
DWARFLIBS += -lelf -lebl -lz -llzma -lbz2
|
||||
|
|
|
|||
|
|
@ -153,6 +153,10 @@
|
|||
# include "test-sdt.c"
|
||||
#undef main
|
||||
|
||||
#define main main_test_setns
|
||||
# include "test-setns.c"
|
||||
#undef main
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
main_test_libpython();
|
||||
|
|
@ -188,6 +192,7 @@ int main(int argc, char *argv[])
|
|||
main_test_libcrypto();
|
||||
main_test_sched_getcpu();
|
||||
main_test_sdt();
|
||||
main_test_setns();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
7
tools/build/feature/test-setns.c
Normal file
7
tools/build/feature/test-setns.c
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
#define _GNU_SOURCE
|
||||
#include <sched.h>
|
||||
|
||||
int main(void)
|
||||
{
|
||||
return setns(0, 0);
|
||||
}
|
||||
|
|
@ -8,7 +8,7 @@ ex:
|
|||
include $(srctree)/tools/build/Makefile.include
|
||||
|
||||
ex: ex-in.o libex-in.o
|
||||
gcc -o $@ $^
|
||||
$(CC) -o $@ $^
|
||||
|
||||
ex.%: fixdep FORCE
|
||||
make -f $(srctree)/tools/build/Makefile.build dir=. $@
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
#ifndef _TOOLS_LINUX_STRING_H_
|
||||
#define _TOOLS_LINUX_STRING_H_
|
||||
|
||||
|
||||
#include <linux/types.h> /* for size_t */
|
||||
#include <string.h>
|
||||
|
||||
void *memdup(const void *src, size_t len);
|
||||
|
||||
|
|
@ -18,6 +18,14 @@ extern size_t strlcpy(char *dest, const char *src, size_t size);
|
|||
|
||||
char *str_error_r(int errnum, char *buf, size_t buflen);
|
||||
|
||||
int prefixcmp(const char *str, const char *prefix);
|
||||
/**
|
||||
* strstarts - does @str start with @prefix?
|
||||
* @str: string to examine
|
||||
* @prefix: prefix to look for.
|
||||
*/
|
||||
static inline bool strstarts(const char *str, const char *prefix)
|
||||
{
|
||||
return strncmp(str, prefix, strlen(prefix)) == 0;
|
||||
}
|
||||
|
||||
#endif /* _LINUX_STRING_H_ */
|
||||
|
|
|
|||
220
tools/include/uapi/asm-generic/fcntl.h
Normal file
220
tools/include/uapi/asm-generic/fcntl.h
Normal file
|
|
@ -0,0 +1,220 @@
|
|||
#ifndef _ASM_GENERIC_FCNTL_H
|
||||
#define _ASM_GENERIC_FCNTL_H
|
||||
|
||||
#include <linux/types.h>
|
||||
|
||||
/*
|
||||
* FMODE_EXEC is 0x20
|
||||
* FMODE_NONOTIFY is 0x4000000
|
||||
* These cannot be used by userspace O_* until internal and external open
|
||||
* flags are split.
|
||||
* -Eric Paris
|
||||
*/
|
||||
|
||||
/*
|
||||
* When introducing new O_* bits, please check its uniqueness in fcntl_init().
|
||||
*/
|
||||
|
||||
#define O_ACCMODE 00000003
|
||||
#define O_RDONLY 00000000
|
||||
#define O_WRONLY 00000001
|
||||
#define O_RDWR 00000002
|
||||
#ifndef O_CREAT
|
||||
#define O_CREAT 00000100 /* not fcntl */
|
||||
#endif
|
||||
#ifndef O_EXCL
|
||||
#define O_EXCL 00000200 /* not fcntl */
|
||||
#endif
|
||||
#ifndef O_NOCTTY
|
||||
#define O_NOCTTY 00000400 /* not fcntl */
|
||||
#endif
|
||||
#ifndef O_TRUNC
|
||||
#define O_TRUNC 00001000 /* not fcntl */
|
||||
#endif
|
||||
#ifndef O_APPEND
|
||||
#define O_APPEND 00002000
|
||||
#endif
|
||||
#ifndef O_NONBLOCK
|
||||
#define O_NONBLOCK 00004000
|
||||
#endif
|
||||
#ifndef O_DSYNC
|
||||
#define O_DSYNC 00010000 /* used to be O_SYNC, see below */
|
||||
#endif
|
||||
#ifndef FASYNC
|
||||
#define FASYNC 00020000 /* fcntl, for BSD compatibility */
|
||||
#endif
|
||||
#ifndef O_DIRECT
|
||||
#define O_DIRECT 00040000 /* direct disk access hint */
|
||||
#endif
|
||||
#ifndef O_LARGEFILE
|
||||
#define O_LARGEFILE 00100000
|
||||
#endif
|
||||
#ifndef O_DIRECTORY
|
||||
#define O_DIRECTORY 00200000 /* must be a directory */
|
||||
#endif
|
||||
#ifndef O_NOFOLLOW
|
||||
#define O_NOFOLLOW 00400000 /* don't follow links */
|
||||
#endif
|
||||
#ifndef O_NOATIME
|
||||
#define O_NOATIME 01000000
|
||||
#endif
|
||||
#ifndef O_CLOEXEC
|
||||
#define O_CLOEXEC 02000000 /* set close_on_exec */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Before Linux 2.6.33 only O_DSYNC semantics were implemented, but using
|
||||
* the O_SYNC flag. We continue to use the existing numerical value
|
||||
* for O_DSYNC semantics now, but using the correct symbolic name for it.
|
||||
* This new value is used to request true Posix O_SYNC semantics. It is
|
||||
* defined in this strange way to make sure applications compiled against
|
||||
* new headers get at least O_DSYNC semantics on older kernels.
|
||||
*
|
||||
* This has the nice side-effect that we can simply test for O_DSYNC
|
||||
* wherever we do not care if O_DSYNC or O_SYNC is used.
|
||||
*
|
||||
* Note: __O_SYNC must never be used directly.
|
||||
*/
|
||||
#ifndef O_SYNC
|
||||
#define __O_SYNC 04000000
|
||||
#define O_SYNC (__O_SYNC|O_DSYNC)
|
||||
#endif
|
||||
|
||||
#ifndef O_PATH
|
||||
#define O_PATH 010000000
|
||||
#endif
|
||||
|
||||
#ifndef __O_TMPFILE
|
||||
#define __O_TMPFILE 020000000
|
||||
#endif
|
||||
|
||||
/* a horrid kludge trying to make sure that this will fail on old kernels */
|
||||
#define O_TMPFILE (__O_TMPFILE | O_DIRECTORY)
|
||||
#define O_TMPFILE_MASK (__O_TMPFILE | O_DIRECTORY | O_CREAT)
|
||||
|
||||
#ifndef O_NDELAY
|
||||
#define O_NDELAY O_NONBLOCK
|
||||
#endif
|
||||
|
||||
#define F_DUPFD 0 /* dup */
|
||||
#define F_GETFD 1 /* get close_on_exec */
|
||||
#define F_SETFD 2 /* set/clear close_on_exec */
|
||||
#define F_GETFL 3 /* get file->f_flags */
|
||||
#define F_SETFL 4 /* set file->f_flags */
|
||||
#ifndef F_GETLK
|
||||
#define F_GETLK 5
|
||||
#define F_SETLK 6
|
||||
#define F_SETLKW 7
|
||||
#endif
|
||||
#ifndef F_SETOWN
|
||||
#define F_SETOWN 8 /* for sockets. */
|
||||
#define F_GETOWN 9 /* for sockets. */
|
||||
#endif
|
||||
#ifndef F_SETSIG
|
||||
#define F_SETSIG 10 /* for sockets. */
|
||||
#define F_GETSIG 11 /* for sockets. */
|
||||
#endif
|
||||
|
||||
#ifndef CONFIG_64BIT
|
||||
#ifndef F_GETLK64
|
||||
#define F_GETLK64 12 /* using 'struct flock64' */
|
||||
#define F_SETLK64 13
|
||||
#define F_SETLKW64 14
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef F_SETOWN_EX
|
||||
#define F_SETOWN_EX 15
|
||||
#define F_GETOWN_EX 16
|
||||
#endif
|
||||
|
||||
#ifndef F_GETOWNER_UIDS
|
||||
#define F_GETOWNER_UIDS 17
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Open File Description Locks
|
||||
*
|
||||
* Usually record locks held by a process are released on *any* close and are
|
||||
* not inherited across a fork().
|
||||
*
|
||||
* These cmd values will set locks that conflict with process-associated
|
||||
* record locks, but are "owned" by the open file description, not the
|
||||
* process. This means that they are inherited across fork() like BSD (flock)
|
||||
* locks, and they are only released automatically when the last reference to
|
||||
* the the open file against which they were acquired is put.
|
||||
*/
|
||||
#define F_OFD_GETLK 36
|
||||
#define F_OFD_SETLK 37
|
||||
#define F_OFD_SETLKW 38
|
||||
|
||||
#define F_OWNER_TID 0
|
||||
#define F_OWNER_PID 1
|
||||
#define F_OWNER_PGRP 2
|
||||
|
||||
struct f_owner_ex {
|
||||
int type;
|
||||
__kernel_pid_t pid;
|
||||
};
|
||||
|
||||
/* for F_[GET|SET]FL */
|
||||
#define FD_CLOEXEC 1 /* actually anything with low bit set goes */
|
||||
|
||||
/* for posix fcntl() and lockf() */
|
||||
#ifndef F_RDLCK
|
||||
#define F_RDLCK 0
|
||||
#define F_WRLCK 1
|
||||
#define F_UNLCK 2
|
||||
#endif
|
||||
|
||||
/* for old implementation of bsd flock () */
|
||||
#ifndef F_EXLCK
|
||||
#define F_EXLCK 4 /* or 3 */
|
||||
#define F_SHLCK 8 /* or 4 */
|
||||
#endif
|
||||
|
||||
/* operations for bsd flock(), also used by the kernel implementation */
|
||||
#define LOCK_SH 1 /* shared lock */
|
||||
#define LOCK_EX 2 /* exclusive lock */
|
||||
#define LOCK_NB 4 /* or'd with one of the above to prevent
|
||||
blocking */
|
||||
#define LOCK_UN 8 /* remove lock */
|
||||
|
||||
#define LOCK_MAND 32 /* This is a mandatory flock ... */
|
||||
#define LOCK_READ 64 /* which allows concurrent read operations */
|
||||
#define LOCK_WRITE 128 /* which allows concurrent write operations */
|
||||
#define LOCK_RW 192 /* which allows concurrent read & write ops */
|
||||
|
||||
#define F_LINUX_SPECIFIC_BASE 1024
|
||||
|
||||
#ifndef HAVE_ARCH_STRUCT_FLOCK
|
||||
#ifndef __ARCH_FLOCK_PAD
|
||||
#define __ARCH_FLOCK_PAD
|
||||
#endif
|
||||
|
||||
struct flock {
|
||||
short l_type;
|
||||
short l_whence;
|
||||
__kernel_off_t l_start;
|
||||
__kernel_off_t l_len;
|
||||
__kernel_pid_t l_pid;
|
||||
__ARCH_FLOCK_PAD
|
||||
};
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_ARCH_STRUCT_FLOCK64
|
||||
#ifndef __ARCH_FLOCK64_PAD
|
||||
#define __ARCH_FLOCK64_PAD
|
||||
#endif
|
||||
|
||||
struct flock64 {
|
||||
short l_type;
|
||||
short l_whence;
|
||||
__kernel_loff_t l_start;
|
||||
__kernel_loff_t l_len;
|
||||
__kernel_pid_t l_pid;
|
||||
__ARCH_FLOCK64_PAD
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif /* _ASM_GENERIC_FCNTL_H */
|
||||
118
tools/include/uapi/asm-generic/ioctls.h
Normal file
118
tools/include/uapi/asm-generic/ioctls.h
Normal file
|
|
@ -0,0 +1,118 @@
|
|||
#ifndef __ASM_GENERIC_IOCTLS_H
|
||||
#define __ASM_GENERIC_IOCTLS_H
|
||||
|
||||
#include <linux/ioctl.h>
|
||||
|
||||
/*
|
||||
* These are the most common definitions for tty ioctl numbers.
|
||||
* Most of them do not use the recommended _IOC(), but there is
|
||||
* probably some source code out there hardcoding the number,
|
||||
* so we might as well use them for all new platforms.
|
||||
*
|
||||
* The architectures that use different values here typically
|
||||
* try to be compatible with some Unix variants for the same
|
||||
* architecture.
|
||||
*/
|
||||
|
||||
/* 0x54 is just a magic number to make these relatively unique ('T') */
|
||||
|
||||
#define TCGETS 0x5401
|
||||
#define TCSETS 0x5402
|
||||
#define TCSETSW 0x5403
|
||||
#define TCSETSF 0x5404
|
||||
#define TCGETA 0x5405
|
||||
#define TCSETA 0x5406
|
||||
#define TCSETAW 0x5407
|
||||
#define TCSETAF 0x5408
|
||||
#define TCSBRK 0x5409
|
||||
#define TCXONC 0x540A
|
||||
#define TCFLSH 0x540B
|
||||
#define TIOCEXCL 0x540C
|
||||
#define TIOCNXCL 0x540D
|
||||
#define TIOCSCTTY 0x540E
|
||||
#define TIOCGPGRP 0x540F
|
||||
#define TIOCSPGRP 0x5410
|
||||
#define TIOCOUTQ 0x5411
|
||||
#define TIOCSTI 0x5412
|
||||
#define TIOCGWINSZ 0x5413
|
||||
#define TIOCSWINSZ 0x5414
|
||||
#define TIOCMGET 0x5415
|
||||
#define TIOCMBIS 0x5416
|
||||
#define TIOCMBIC 0x5417
|
||||
#define TIOCMSET 0x5418
|
||||
#define TIOCGSOFTCAR 0x5419
|
||||
#define TIOCSSOFTCAR 0x541A
|
||||
#define FIONREAD 0x541B
|
||||
#define TIOCINQ FIONREAD
|
||||
#define TIOCLINUX 0x541C
|
||||
#define TIOCCONS 0x541D
|
||||
#define TIOCGSERIAL 0x541E
|
||||
#define TIOCSSERIAL 0x541F
|
||||
#define TIOCPKT 0x5420
|
||||
#define FIONBIO 0x5421
|
||||
#define TIOCNOTTY 0x5422
|
||||
#define TIOCSETD 0x5423
|
||||
#define TIOCGETD 0x5424
|
||||
#define TCSBRKP 0x5425 /* Needed for POSIX tcsendbreak() */
|
||||
#define TIOCSBRK 0x5427 /* BSD compatibility */
|
||||
#define TIOCCBRK 0x5428 /* BSD compatibility */
|
||||
#define TIOCGSID 0x5429 /* Return the session ID of FD */
|
||||
#define TCGETS2 _IOR('T', 0x2A, struct termios2)
|
||||
#define TCSETS2 _IOW('T', 0x2B, struct termios2)
|
||||
#define TCSETSW2 _IOW('T', 0x2C, struct termios2)
|
||||
#define TCSETSF2 _IOW('T', 0x2D, struct termios2)
|
||||
#define TIOCGRS485 0x542E
|
||||
#ifndef TIOCSRS485
|
||||
#define TIOCSRS485 0x542F
|
||||
#endif
|
||||
#define TIOCGPTN _IOR('T', 0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
|
||||
#define TIOCSPTLCK _IOW('T', 0x31, int) /* Lock/unlock Pty */
|
||||
#define TIOCGDEV _IOR('T', 0x32, unsigned int) /* Get primary device node of /dev/console */
|
||||
#define TCGETX 0x5432 /* SYS5 TCGETX compatibility */
|
||||
#define TCSETX 0x5433
|
||||
#define TCSETXF 0x5434
|
||||
#define TCSETXW 0x5435
|
||||
#define TIOCSIG _IOW('T', 0x36, int) /* pty: generate signal */
|
||||
#define TIOCVHANGUP 0x5437
|
||||
#define TIOCGPKT _IOR('T', 0x38, int) /* Get packet mode state */
|
||||
#define TIOCGPTLCK _IOR('T', 0x39, int) /* Get Pty lock state */
|
||||
#define TIOCGEXCL _IOR('T', 0x40, int) /* Get exclusive mode state */
|
||||
#define TIOCGPTPEER _IO('T', 0x41) /* Safely open the slave */
|
||||
|
||||
#define FIONCLEX 0x5450
|
||||
#define FIOCLEX 0x5451
|
||||
#define FIOASYNC 0x5452
|
||||
#define TIOCSERCONFIG 0x5453
|
||||
#define TIOCSERGWILD 0x5454
|
||||
#define TIOCSERSWILD 0x5455
|
||||
#define TIOCGLCKTRMIOS 0x5456
|
||||
#define TIOCSLCKTRMIOS 0x5457
|
||||
#define TIOCSERGSTRUCT 0x5458 /* For debugging only */
|
||||
#define TIOCSERGETLSR 0x5459 /* Get line status register */
|
||||
#define TIOCSERGETMULTI 0x545A /* Get multiport config */
|
||||
#define TIOCSERSETMULTI 0x545B /* Set multiport config */
|
||||
|
||||
#define TIOCMIWAIT 0x545C /* wait for a change on serial input line(s) */
|
||||
#define TIOCGICOUNT 0x545D /* read serial port inline interrupt counts */
|
||||
|
||||
/*
|
||||
* Some arches already define FIOQSIZE due to a historical
|
||||
* conflict with a Hayes modem-specific ioctl value.
|
||||
*/
|
||||
#ifndef FIOQSIZE
|
||||
# define FIOQSIZE 0x5460
|
||||
#endif
|
||||
|
||||
/* Used for packet mode */
|
||||
#define TIOCPKT_DATA 0
|
||||
#define TIOCPKT_FLUSHREAD 1
|
||||
#define TIOCPKT_FLUSHWRITE 2
|
||||
#define TIOCPKT_STOP 4
|
||||
#define TIOCPKT_START 8
|
||||
#define TIOCPKT_NOSTOP 16
|
||||
#define TIOCPKT_DOSTOP 32
|
||||
#define TIOCPKT_IOCTL 64
|
||||
|
||||
#define TIOCSER_TEMT 0x01 /* Transmitter physically empty */
|
||||
|
||||
#endif /* __ASM_GENERIC_IOCTLS_H */
|
||||
933
tools/include/uapi/drm/drm.h
Normal file
933
tools/include/uapi/drm/drm.h
Normal file
|
|
@ -0,0 +1,933 @@
|
|||
/**
|
||||
* \file drm.h
|
||||
* Header for the Direct Rendering Manager
|
||||
*
|
||||
* \author Rickard E. (Rik) Faith <faith@valinux.com>
|
||||
*
|
||||
* \par Acknowledgments:
|
||||
* Dec 1999, Richard Henderson <rth@twiddle.net>, move to generic \c cmpxchg.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Copyright 1999 Precision Insight, Inc., Cedar Park, Texas.
|
||||
* Copyright 2000 VA Linux Systems, Inc., Sunnyvale, California.
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice (including the next
|
||||
* paragraph) shall be included in all copies or substantial portions of the
|
||||
* Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
* VA LINUX SYSTEMS AND/OR ITS SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
|
||||
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
|
||||
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#ifndef _DRM_H_
|
||||
#define _DRM_H_
|
||||
|
||||
#if defined(__KERNEL__)
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <asm/ioctl.h>
|
||||
typedef unsigned int drm_handle_t;
|
||||
|
||||
#elif defined(__linux__)
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <asm/ioctl.h>
|
||||
typedef unsigned int drm_handle_t;
|
||||
|
||||
#else /* One of the BSDs */
|
||||
|
||||
#include <sys/ioccom.h>
|
||||
#include <sys/types.h>
|
||||
typedef int8_t __s8;
|
||||
typedef uint8_t __u8;
|
||||
typedef int16_t __s16;
|
||||
typedef uint16_t __u16;
|
||||
typedef int32_t __s32;
|
||||
typedef uint32_t __u32;
|
||||
typedef int64_t __s64;
|
||||
typedef uint64_t __u64;
|
||||
typedef size_t __kernel_size_t;
|
||||
typedef unsigned long drm_handle_t;
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define DRM_NAME "drm" /**< Name in kernel, /dev, and /proc */
|
||||
#define DRM_MIN_ORDER 5 /**< At least 2^5 bytes = 32 bytes */
|
||||
#define DRM_MAX_ORDER 22 /**< Up to 2^22 bytes = 4MB */
|
||||
#define DRM_RAM_PERCENT 10 /**< How much system ram can we lock? */
|
||||
|
||||
#define _DRM_LOCK_HELD 0x80000000U /**< Hardware lock is held */
|
||||
#define _DRM_LOCK_CONT 0x40000000U /**< Hardware lock is contended */
|
||||
#define _DRM_LOCK_IS_HELD(lock) ((lock) & _DRM_LOCK_HELD)
|
||||
#define _DRM_LOCK_IS_CONT(lock) ((lock) & _DRM_LOCK_CONT)
|
||||
#define _DRM_LOCKING_CONTEXT(lock) ((lock) & ~(_DRM_LOCK_HELD|_DRM_LOCK_CONT))
|
||||
|
||||
typedef unsigned int drm_context_t;
|
||||
typedef unsigned int drm_drawable_t;
|
||||
typedef unsigned int drm_magic_t;
|
||||
|
||||
/**
|
||||
* Cliprect.
|
||||
*
|
||||
* \warning: If you change this structure, make sure you change
|
||||
* XF86DRIClipRectRec in the server as well
|
||||
*
|
||||
* \note KW: Actually it's illegal to change either for
|
||||
* backwards-compatibility reasons.
|
||||
*/
|
||||
struct drm_clip_rect {
|
||||
unsigned short x1;
|
||||
unsigned short y1;
|
||||
unsigned short x2;
|
||||
unsigned short y2;
|
||||
};
|
||||
|
||||
/**
|
||||
* Drawable information.
|
||||
*/
|
||||
struct drm_drawable_info {
|
||||
unsigned int num_rects;
|
||||
struct drm_clip_rect *rects;
|
||||
};
|
||||
|
||||
/**
|
||||
* Texture region,
|
||||
*/
|
||||
struct drm_tex_region {
|
||||
unsigned char next;
|
||||
unsigned char prev;
|
||||
unsigned char in_use;
|
||||
unsigned char padding;
|
||||
unsigned int age;
|
||||
};
|
||||
|
||||
/**
|
||||
* Hardware lock.
|
||||
*
|
||||
* The lock structure is a simple cache-line aligned integer. To avoid
|
||||
* processor bus contention on a multiprocessor system, there should not be any
|
||||
* other data stored in the same cache line.
|
||||
*/
|
||||
struct drm_hw_lock {
|
||||
__volatile__ unsigned int lock; /**< lock variable */
|
||||
char padding[60]; /**< Pad to cache line */
|
||||
};
|
||||
|
||||
/**
|
||||
* DRM_IOCTL_VERSION ioctl argument type.
|
||||
*
|
||||
* \sa drmGetVersion().
|
||||
*/
|
||||
struct drm_version {
|
||||
int version_major; /**< Major version */
|
||||
int version_minor; /**< Minor version */
|
||||
int version_patchlevel; /**< Patch level */
|
||||
__kernel_size_t name_len; /**< Length of name buffer */
|
||||
char __user *name; /**< Name of driver */
|
||||
__kernel_size_t date_len; /**< Length of date buffer */
|
||||
char __user *date; /**< User-space buffer to hold date */
|
||||
__kernel_size_t desc_len; /**< Length of desc buffer */
|
||||
char __user *desc; /**< User-space buffer to hold desc */
|
||||
};
|
||||
|
||||
/**
|
||||
* DRM_IOCTL_GET_UNIQUE ioctl argument type.
|
||||
*
|
||||
* \sa drmGetBusid() and drmSetBusId().
|
||||
*/
|
||||
struct drm_unique {
|
||||
__kernel_size_t unique_len; /**< Length of unique */
|
||||
char __user *unique; /**< Unique name for driver instantiation */
|
||||
};
|
||||
|
||||
struct drm_list {
|
||||
int count; /**< Length of user-space structures */
|
||||
struct drm_version __user *version;
|
||||
};
|
||||
|
||||
struct drm_block {
|
||||
int unused;
|
||||
};
|
||||
|
||||
/**
|
||||
* DRM_IOCTL_CONTROL ioctl argument type.
|
||||
*
|
||||
* \sa drmCtlInstHandler() and drmCtlUninstHandler().
|
||||
*/
|
||||
struct drm_control {
|
||||
enum {
|
||||
DRM_ADD_COMMAND,
|
||||
DRM_RM_COMMAND,
|
||||
DRM_INST_HANDLER,
|
||||
DRM_UNINST_HANDLER
|
||||
} func;
|
||||
int irq;
|
||||
};
|
||||
|
||||
/**
|
||||
* Type of memory to map.
|
||||
*/
|
||||
enum drm_map_type {
|
||||
_DRM_FRAME_BUFFER = 0, /**< WC (no caching), no core dump */
|
||||
_DRM_REGISTERS = 1, /**< no caching, no core dump */
|
||||
_DRM_SHM = 2, /**< shared, cached */
|
||||
_DRM_AGP = 3, /**< AGP/GART */
|
||||
_DRM_SCATTER_GATHER = 4, /**< Scatter/gather memory for PCI DMA */
|
||||
_DRM_CONSISTENT = 5 /**< Consistent memory for PCI DMA */
|
||||
};
|
||||
|
||||
/**
|
||||
* Memory mapping flags.
|
||||
*/
|
||||
enum drm_map_flags {
|
||||
_DRM_RESTRICTED = 0x01, /**< Cannot be mapped to user-virtual */
|
||||
_DRM_READ_ONLY = 0x02,
|
||||
_DRM_LOCKED = 0x04, /**< shared, cached, locked */
|
||||
_DRM_KERNEL = 0x08, /**< kernel requires access */
|
||||
_DRM_WRITE_COMBINING = 0x10, /**< use write-combining if available */
|
||||
_DRM_CONTAINS_LOCK = 0x20, /**< SHM page that contains lock */
|
||||
_DRM_REMOVABLE = 0x40, /**< Removable mapping */
|
||||
_DRM_DRIVER = 0x80 /**< Managed by driver */
|
||||
};
|
||||
|
||||
struct drm_ctx_priv_map {
|
||||
unsigned int ctx_id; /**< Context requesting private mapping */
|
||||
void *handle; /**< Handle of map */
|
||||
};
|
||||
|
||||
/**
|
||||
* DRM_IOCTL_GET_MAP, DRM_IOCTL_ADD_MAP and DRM_IOCTL_RM_MAP ioctls
|
||||
* argument type.
|
||||
*
|
||||
* \sa drmAddMap().
|
||||
*/
|
||||
struct drm_map {
|
||||
unsigned long offset; /**< Requested physical address (0 for SAREA)*/
|
||||
unsigned long size; /**< Requested physical size (bytes) */
|
||||
enum drm_map_type type; /**< Type of memory to map */
|
||||
enum drm_map_flags flags; /**< Flags */
|
||||
void *handle; /**< User-space: "Handle" to pass to mmap() */
|
||||
/**< Kernel-space: kernel-virtual address */
|
||||
int mtrr; /**< MTRR slot used */
|
||||
/* Private data */
|
||||
};
|
||||
|
||||
/**
|
||||
* DRM_IOCTL_GET_CLIENT ioctl argument type.
|
||||
*/
|
||||
struct drm_client {
|
||||
int idx; /**< Which client desired? */
|
||||
int auth; /**< Is client authenticated? */
|
||||
unsigned long pid; /**< Process ID */
|
||||
unsigned long uid; /**< User ID */
|
||||
unsigned long magic; /**< Magic */
|
||||
unsigned long iocs; /**< Ioctl count */
|
||||
};
|
||||
|
||||
enum drm_stat_type {
|
||||
_DRM_STAT_LOCK,
|
||||
_DRM_STAT_OPENS,
|
||||
_DRM_STAT_CLOSES,
|
||||
_DRM_STAT_IOCTLS,
|
||||
_DRM_STAT_LOCKS,
|
||||
_DRM_STAT_UNLOCKS,
|
||||
_DRM_STAT_VALUE, /**< Generic value */
|
||||
_DRM_STAT_BYTE, /**< Generic byte counter (1024bytes/K) */
|
||||
_DRM_STAT_COUNT, /**< Generic non-byte counter (1000/k) */
|
||||
|
||||
_DRM_STAT_IRQ, /**< IRQ */
|
||||
_DRM_STAT_PRIMARY, /**< Primary DMA bytes */
|
||||
_DRM_STAT_SECONDARY, /**< Secondary DMA bytes */
|
||||
_DRM_STAT_DMA, /**< DMA */
|
||||
_DRM_STAT_SPECIAL, /**< Special DMA (e.g., priority or polled) */
|
||||
_DRM_STAT_MISSED /**< Missed DMA opportunity */
|
||||
/* Add to the *END* of the list */
|
||||
};
|
||||
|
||||
/**
|
||||
* DRM_IOCTL_GET_STATS ioctl argument type.
|
||||
*/
|
||||
struct drm_stats {
|
||||
unsigned long count;
|
||||
struct {
|
||||
unsigned long value;
|
||||
enum drm_stat_type type;
|
||||
} data[15];
|
||||
};
|
||||
|
||||
/**
|
||||
* Hardware locking flags.
|
||||
*/
|
||||
enum drm_lock_flags {
|
||||
_DRM_LOCK_READY = 0x01, /**< Wait until hardware is ready for DMA */
|
||||
_DRM_LOCK_QUIESCENT = 0x02, /**< Wait until hardware quiescent */
|
||||
_DRM_LOCK_FLUSH = 0x04, /**< Flush this context's DMA queue first */
|
||||
_DRM_LOCK_FLUSH_ALL = 0x08, /**< Flush all DMA queues first */
|
||||
/* These *HALT* flags aren't supported yet
|
||||
-- they will be used to support the
|
||||
full-screen DGA-like mode. */
|
||||
_DRM_HALT_ALL_QUEUES = 0x10, /**< Halt all current and future queues */
|
||||
_DRM_HALT_CUR_QUEUES = 0x20 /**< Halt all current queues */
|
||||
};
|
||||
|
||||
/**
|
||||
* DRM_IOCTL_LOCK, DRM_IOCTL_UNLOCK and DRM_IOCTL_FINISH ioctl argument type.
|
||||
*
|
||||
* \sa drmGetLock() and drmUnlock().
|
||||
*/
|
||||
struct drm_lock {
|
||||
int context;
|
||||
enum drm_lock_flags flags;
|
||||
};
|
||||
|
||||
/**
|
||||
* DMA flags
|
||||
*
|
||||
* \warning
|
||||
* These values \e must match xf86drm.h.
|
||||
*
|
||||
* \sa drm_dma.
|
||||
*/
|
||||
enum drm_dma_flags {
|
||||
/* Flags for DMA buffer dispatch */
|
||||
_DRM_DMA_BLOCK = 0x01, /**<
|
||||
* Block until buffer dispatched.
|
||||
*
|
||||
* \note The buffer may not yet have
|
||||
* been processed by the hardware --
|
||||
* getting a hardware lock with the
|
||||
* hardware quiescent will ensure
|
||||
* that the buffer has been
|
||||
* processed.
|
||||
*/
|
||||
_DRM_DMA_WHILE_LOCKED = 0x02, /**< Dispatch while lock held */
|
||||
_DRM_DMA_PRIORITY = 0x04, /**< High priority dispatch */
|
||||
|
||||
/* Flags for DMA buffer request */
|
||||
_DRM_DMA_WAIT = 0x10, /**< Wait for free buffers */
|
||||
_DRM_DMA_SMALLER_OK = 0x20, /**< Smaller-than-requested buffers OK */
|
||||
_DRM_DMA_LARGER_OK = 0x40 /**< Larger-than-requested buffers OK */
|
||||
};
|
||||
|
||||
/**
|
||||
* DRM_IOCTL_ADD_BUFS and DRM_IOCTL_MARK_BUFS ioctl argument type.
|
||||
*
|
||||
* \sa drmAddBufs().
|
||||
*/
|
||||
struct drm_buf_desc {
|
||||
int count; /**< Number of buffers of this size */
|
||||
int size; /**< Size in bytes */
|
||||
int low_mark; /**< Low water mark */
|
||||
int high_mark; /**< High water mark */
|
||||
enum {
|
||||
_DRM_PAGE_ALIGN = 0x01, /**< Align on page boundaries for DMA */
|
||||
_DRM_AGP_BUFFER = 0x02, /**< Buffer is in AGP space */
|
||||
_DRM_SG_BUFFER = 0x04, /**< Scatter/gather memory buffer */
|
||||
_DRM_FB_BUFFER = 0x08, /**< Buffer is in frame buffer */
|
||||
_DRM_PCI_BUFFER_RO = 0x10 /**< Map PCI DMA buffer read-only */
|
||||
} flags;
|
||||
unsigned long agp_start; /**<
|
||||
* Start address of where the AGP buffers are
|
||||
* in the AGP aperture
|
||||
*/
|
||||
};
|
||||
|
||||
/**
|
||||
* DRM_IOCTL_INFO_BUFS ioctl argument type.
|
||||
*/
|
||||
struct drm_buf_info {
|
||||
int count; /**< Entries in list */
|
||||
struct drm_buf_desc __user *list;
|
||||
};
|
||||
|
||||
/**
|
||||
* DRM_IOCTL_FREE_BUFS ioctl argument type.
|
||||
*/
|
||||
struct drm_buf_free {
|
||||
int count;
|
||||
int __user *list;
|
||||
};
|
||||
|
||||
/**
|
||||
* Buffer information
|
||||
*
|
||||
* \sa drm_buf_map.
|
||||
*/
|
||||
struct drm_buf_pub {
|
||||
int idx; /**< Index into the master buffer list */
|
||||
int total; /**< Buffer size */
|
||||
int used; /**< Amount of buffer in use (for DMA) */
|
||||
void __user *address; /**< Address of buffer */
|
||||
};
|
||||
|
||||
/**
|
||||
* DRM_IOCTL_MAP_BUFS ioctl argument type.
|
||||
*/
|
||||
struct drm_buf_map {
|
||||
int count; /**< Length of the buffer list */
|
||||
#ifdef __cplusplus
|
||||
void __user *virt;
|
||||
#else
|
||||
void __user *virtual; /**< Mmap'd area in user-virtual */
|
||||
#endif
|
||||
struct drm_buf_pub __user *list; /**< Buffer information */
|
||||
};
|
||||
|
||||
/**
|
||||
* DRM_IOCTL_DMA ioctl argument type.
|
||||
*
|
||||
* Indices here refer to the offset into the buffer list in drm_buf_get.
|
||||
*
|
||||
* \sa drmDMA().
|
||||
*/
|
||||
struct drm_dma {
|
||||
int context; /**< Context handle */
|
||||
int send_count; /**< Number of buffers to send */
|
||||
int __user *send_indices; /**< List of handles to buffers */
|
||||
int __user *send_sizes; /**< Lengths of data to send */
|
||||
enum drm_dma_flags flags; /**< Flags */
|
||||
int request_count; /**< Number of buffers requested */
|
||||
int request_size; /**< Desired size for buffers */
|
||||
int __user *request_indices; /**< Buffer information */
|
||||
int __user *request_sizes;
|
||||
int granted_count; /**< Number of buffers granted */
|
||||
};
|
||||
|
||||
enum drm_ctx_flags {
|
||||
_DRM_CONTEXT_PRESERVED = 0x01,
|
||||
_DRM_CONTEXT_2DONLY = 0x02
|
||||
};
|
||||
|
||||
/**
|
||||
* DRM_IOCTL_ADD_CTX ioctl argument type.
|
||||
*
|
||||
* \sa drmCreateContext() and drmDestroyContext().
|
||||
*/
|
||||
struct drm_ctx {
|
||||
drm_context_t handle;
|
||||
enum drm_ctx_flags flags;
|
||||
};
|
||||
|
||||
/**
|
||||
* DRM_IOCTL_RES_CTX ioctl argument type.
|
||||
*/
|
||||
struct drm_ctx_res {
|
||||
int count;
|
||||
struct drm_ctx __user *contexts;
|
||||
};
|
||||
|
||||
/**
|
||||
* DRM_IOCTL_ADD_DRAW and DRM_IOCTL_RM_DRAW ioctl argument type.
|
||||
*/
|
||||
struct drm_draw {
|
||||
drm_drawable_t handle;
|
||||
};
|
||||
|
||||
/**
|
||||
* DRM_IOCTL_UPDATE_DRAW ioctl argument type.
|
||||
*/
|
||||
typedef enum {
|
||||
DRM_DRAWABLE_CLIPRECTS
|
||||
} drm_drawable_info_type_t;
|
||||
|
||||
struct drm_update_draw {
|
||||
drm_drawable_t handle;
|
||||
unsigned int type;
|
||||
unsigned int num;
|
||||
unsigned long long data;
|
||||
};
|
||||
|
||||
/**
|
||||
* DRM_IOCTL_GET_MAGIC and DRM_IOCTL_AUTH_MAGIC ioctl argument type.
|
||||
*/
|
||||
struct drm_auth {
|
||||
drm_magic_t magic;
|
||||
};
|
||||
|
||||
/**
|
||||
* DRM_IOCTL_IRQ_BUSID ioctl argument type.
|
||||
*
|
||||
* \sa drmGetInterruptFromBusID().
|
||||
*/
|
||||
struct drm_irq_busid {
|
||||
int irq; /**< IRQ number */
|
||||
int busnum; /**< bus number */
|
||||
int devnum; /**< device number */
|
||||
int funcnum; /**< function number */
|
||||
};
|
||||
|
||||
enum drm_vblank_seq_type {
|
||||
_DRM_VBLANK_ABSOLUTE = 0x0, /**< Wait for specific vblank sequence number */
|
||||
_DRM_VBLANK_RELATIVE = 0x1, /**< Wait for given number of vblanks */
|
||||
/* bits 1-6 are reserved for high crtcs */
|
||||
_DRM_VBLANK_HIGH_CRTC_MASK = 0x0000003e,
|
||||
_DRM_VBLANK_EVENT = 0x4000000, /**< Send event instead of blocking */
|
||||
_DRM_VBLANK_FLIP = 0x8000000, /**< Scheduled buffer swap should flip */
|
||||
_DRM_VBLANK_NEXTONMISS = 0x10000000, /**< If missed, wait for next vblank */
|
||||
_DRM_VBLANK_SECONDARY = 0x20000000, /**< Secondary display controller */
|
||||
_DRM_VBLANK_SIGNAL = 0x40000000 /**< Send signal instead of blocking, unsupported */
|
||||
};
|
||||
#define _DRM_VBLANK_HIGH_CRTC_SHIFT 1
|
||||
|
||||
#define _DRM_VBLANK_TYPES_MASK (_DRM_VBLANK_ABSOLUTE | _DRM_VBLANK_RELATIVE)
|
||||
#define _DRM_VBLANK_FLAGS_MASK (_DRM_VBLANK_EVENT | _DRM_VBLANK_SIGNAL | \
|
||||
_DRM_VBLANK_SECONDARY | _DRM_VBLANK_NEXTONMISS)
|
||||
|
||||
struct drm_wait_vblank_request {
|
||||
enum drm_vblank_seq_type type;
|
||||
unsigned int sequence;
|
||||
unsigned long signal;
|
||||
};
|
||||
|
||||
struct drm_wait_vblank_reply {
|
||||
enum drm_vblank_seq_type type;
|
||||
unsigned int sequence;
|
||||
long tval_sec;
|
||||
long tval_usec;
|
||||
};
|
||||
|
||||
/**
|
||||
* DRM_IOCTL_WAIT_VBLANK ioctl argument type.
|
||||
*
|
||||
* \sa drmWaitVBlank().
|
||||
*/
|
||||
union drm_wait_vblank {
|
||||
struct drm_wait_vblank_request request;
|
||||
struct drm_wait_vblank_reply reply;
|
||||
};
|
||||
|
||||
#define _DRM_PRE_MODESET 1
|
||||
#define _DRM_POST_MODESET 2
|
||||
|
||||
/**
|
||||
* DRM_IOCTL_MODESET_CTL ioctl argument type
|
||||
*
|
||||
* \sa drmModesetCtl().
|
||||
*/
|
||||
struct drm_modeset_ctl {
|
||||
__u32 crtc;
|
||||
__u32 cmd;
|
||||
};
|
||||
|
||||
/**
|
||||
* DRM_IOCTL_AGP_ENABLE ioctl argument type.
|
||||
*
|
||||
* \sa drmAgpEnable().
|
||||
*/
|
||||
struct drm_agp_mode {
|
||||
unsigned long mode; /**< AGP mode */
|
||||
};
|
||||
|
||||
/**
|
||||
* DRM_IOCTL_AGP_ALLOC and DRM_IOCTL_AGP_FREE ioctls argument type.
|
||||
*
|
||||
* \sa drmAgpAlloc() and drmAgpFree().
|
||||
*/
|
||||
struct drm_agp_buffer {
|
||||
unsigned long size; /**< In bytes -- will round to page boundary */
|
||||
unsigned long handle; /**< Used for binding / unbinding */
|
||||
unsigned long type; /**< Type of memory to allocate */
|
||||
unsigned long physical; /**< Physical used by i810 */
|
||||
};
|
||||
|
||||
/**
|
||||
* DRM_IOCTL_AGP_BIND and DRM_IOCTL_AGP_UNBIND ioctls argument type.
|
||||
*
|
||||
* \sa drmAgpBind() and drmAgpUnbind().
|
||||
*/
|
||||
struct drm_agp_binding {
|
||||
unsigned long handle; /**< From drm_agp_buffer */
|
||||
unsigned long offset; /**< In bytes -- will round to page boundary */
|
||||
};
|
||||
|
||||
/**
|
||||
* DRM_IOCTL_AGP_INFO ioctl argument type.
|
||||
*
|
||||
* \sa drmAgpVersionMajor(), drmAgpVersionMinor(), drmAgpGetMode(),
|
||||
* drmAgpBase(), drmAgpSize(), drmAgpMemoryUsed(), drmAgpMemoryAvail(),
|
||||
* drmAgpVendorId() and drmAgpDeviceId().
|
||||
*/
|
||||
struct drm_agp_info {
|
||||
int agp_version_major;
|
||||
int agp_version_minor;
|
||||
unsigned long mode;
|
||||
unsigned long aperture_base; /* physical address */
|
||||
unsigned long aperture_size; /* bytes */
|
||||
unsigned long memory_allowed; /* bytes */
|
||||
unsigned long memory_used;
|
||||
|
||||
/* PCI information */
|
||||
unsigned short id_vendor;
|
||||
unsigned short id_device;
|
||||
};
|
||||
|
||||
/**
|
||||
* DRM_IOCTL_SG_ALLOC ioctl argument type.
|
||||
*/
|
||||
struct drm_scatter_gather {
|
||||
unsigned long size; /**< In bytes -- will round to page boundary */
|
||||
unsigned long handle; /**< Used for mapping / unmapping */
|
||||
};
|
||||
|
||||
/**
|
||||
* DRM_IOCTL_SET_VERSION ioctl argument type.
|
||||
*/
|
||||
struct drm_set_version {
|
||||
int drm_di_major;
|
||||
int drm_di_minor;
|
||||
int drm_dd_major;
|
||||
int drm_dd_minor;
|
||||
};
|
||||
|
||||
/** DRM_IOCTL_GEM_CLOSE ioctl argument type */
|
||||
struct drm_gem_close {
|
||||
/** Handle of the object to be closed. */
|
||||
__u32 handle;
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
/** DRM_IOCTL_GEM_FLINK ioctl argument type */
|
||||
struct drm_gem_flink {
|
||||
/** Handle for the object being named */
|
||||
__u32 handle;
|
||||
|
||||
/** Returned global name */
|
||||
__u32 name;
|
||||
};
|
||||
|
||||
/** DRM_IOCTL_GEM_OPEN ioctl argument type */
|
||||
struct drm_gem_open {
|
||||
/** Name of object being opened */
|
||||
__u32 name;
|
||||
|
||||
/** Returned handle for the object */
|
||||
__u32 handle;
|
||||
|
||||
/** Returned size of the object */
|
||||
__u64 size;
|
||||
};
|
||||
|
||||
#define DRM_CAP_DUMB_BUFFER 0x1
|
||||
#define DRM_CAP_VBLANK_HIGH_CRTC 0x2
|
||||
#define DRM_CAP_DUMB_PREFERRED_DEPTH 0x3
|
||||
#define DRM_CAP_DUMB_PREFER_SHADOW 0x4
|
||||
#define DRM_CAP_PRIME 0x5
|
||||
#define DRM_PRIME_CAP_IMPORT 0x1
|
||||
#define DRM_PRIME_CAP_EXPORT 0x2
|
||||
#define DRM_CAP_TIMESTAMP_MONOTONIC 0x6
|
||||
#define DRM_CAP_ASYNC_PAGE_FLIP 0x7
|
||||
/*
|
||||
* The CURSOR_WIDTH and CURSOR_HEIGHT capabilities return a valid widthxheight
|
||||
* combination for the hardware cursor. The intention is that a hardware
|
||||
* agnostic userspace can query a cursor plane size to use.
|
||||
*
|
||||
* Note that the cross-driver contract is to merely return a valid size;
|
||||
* drivers are free to attach another meaning on top, eg. i915 returns the
|
||||
* maximum plane size.
|
||||
*/
|
||||
#define DRM_CAP_CURSOR_WIDTH 0x8
|
||||
#define DRM_CAP_CURSOR_HEIGHT 0x9
|
||||
#define DRM_CAP_ADDFB2_MODIFIERS 0x10
|
||||
#define DRM_CAP_PAGE_FLIP_TARGET 0x11
|
||||
#define DRM_CAP_CRTC_IN_VBLANK_EVENT 0x12
|
||||
#define DRM_CAP_SYNCOBJ 0x13
|
||||
|
||||
/** DRM_IOCTL_GET_CAP ioctl argument type */
|
||||
struct drm_get_cap {
|
||||
__u64 capability;
|
||||
__u64 value;
|
||||
};
|
||||
|
||||
/**
|
||||
* DRM_CLIENT_CAP_STEREO_3D
|
||||
*
|
||||
* if set to 1, the DRM core will expose the stereo 3D capabilities of the
|
||||
* monitor by advertising the supported 3D layouts in the flags of struct
|
||||
* drm_mode_modeinfo.
|
||||
*/
|
||||
#define DRM_CLIENT_CAP_STEREO_3D 1
|
||||
|
||||
/**
|
||||
* DRM_CLIENT_CAP_UNIVERSAL_PLANES
|
||||
*
|
||||
* If set to 1, the DRM core will expose all planes (overlay, primary, and
|
||||
* cursor) to userspace.
|
||||
*/
|
||||
#define DRM_CLIENT_CAP_UNIVERSAL_PLANES 2
|
||||
|
||||
/**
|
||||
* DRM_CLIENT_CAP_ATOMIC
|
||||
*
|
||||
* If set to 1, the DRM core will expose atomic properties to userspace
|
||||
*/
|
||||
#define DRM_CLIENT_CAP_ATOMIC 3
|
||||
|
||||
/** DRM_IOCTL_SET_CLIENT_CAP ioctl argument type */
|
||||
struct drm_set_client_cap {
|
||||
__u64 capability;
|
||||
__u64 value;
|
||||
};
|
||||
|
||||
#define DRM_RDWR O_RDWR
|
||||
#define DRM_CLOEXEC O_CLOEXEC
|
||||
struct drm_prime_handle {
|
||||
__u32 handle;
|
||||
|
||||
/** Flags.. only applicable for handle->fd */
|
||||
__u32 flags;
|
||||
|
||||
/** Returned dmabuf file descriptor */
|
||||
__s32 fd;
|
||||
};
|
||||
|
||||
struct drm_syncobj_create {
|
||||
__u32 handle;
|
||||
__u32 flags;
|
||||
};
|
||||
|
||||
struct drm_syncobj_destroy {
|
||||
__u32 handle;
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
#define DRM_SYNCOBJ_FD_TO_HANDLE_FLAGS_IMPORT_SYNC_FILE (1 << 0)
|
||||
#define DRM_SYNCOBJ_HANDLE_TO_FD_FLAGS_EXPORT_SYNC_FILE (1 << 0)
|
||||
struct drm_syncobj_handle {
|
||||
__u32 handle;
|
||||
__u32 flags;
|
||||
|
||||
__s32 fd;
|
||||
__u32 pad;
|
||||
};
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#include "drm_mode.h"
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define DRM_IOCTL_BASE 'd'
|
||||
#define DRM_IO(nr) _IO(DRM_IOCTL_BASE,nr)
|
||||
#define DRM_IOR(nr,type) _IOR(DRM_IOCTL_BASE,nr,type)
|
||||
#define DRM_IOW(nr,type) _IOW(DRM_IOCTL_BASE,nr,type)
|
||||
#define DRM_IOWR(nr,type) _IOWR(DRM_IOCTL_BASE,nr,type)
|
||||
|
||||
#define DRM_IOCTL_VERSION DRM_IOWR(0x00, struct drm_version)
|
||||
#define DRM_IOCTL_GET_UNIQUE DRM_IOWR(0x01, struct drm_unique)
|
||||
#define DRM_IOCTL_GET_MAGIC DRM_IOR( 0x02, struct drm_auth)
|
||||
#define DRM_IOCTL_IRQ_BUSID DRM_IOWR(0x03, struct drm_irq_busid)
|
||||
#define DRM_IOCTL_GET_MAP DRM_IOWR(0x04, struct drm_map)
|
||||
#define DRM_IOCTL_GET_CLIENT DRM_IOWR(0x05, struct drm_client)
|
||||
#define DRM_IOCTL_GET_STATS DRM_IOR( 0x06, struct drm_stats)
|
||||
#define DRM_IOCTL_SET_VERSION DRM_IOWR(0x07, struct drm_set_version)
|
||||
#define DRM_IOCTL_MODESET_CTL DRM_IOW(0x08, struct drm_modeset_ctl)
|
||||
#define DRM_IOCTL_GEM_CLOSE DRM_IOW (0x09, struct drm_gem_close)
|
||||
#define DRM_IOCTL_GEM_FLINK DRM_IOWR(0x0a, struct drm_gem_flink)
|
||||
#define DRM_IOCTL_GEM_OPEN DRM_IOWR(0x0b, struct drm_gem_open)
|
||||
#define DRM_IOCTL_GET_CAP DRM_IOWR(0x0c, struct drm_get_cap)
|
||||
#define DRM_IOCTL_SET_CLIENT_CAP DRM_IOW( 0x0d, struct drm_set_client_cap)
|
||||
|
||||
#define DRM_IOCTL_SET_UNIQUE DRM_IOW( 0x10, struct drm_unique)
|
||||
#define DRM_IOCTL_AUTH_MAGIC DRM_IOW( 0x11, struct drm_auth)
|
||||
#define DRM_IOCTL_BLOCK DRM_IOWR(0x12, struct drm_block)
|
||||
#define DRM_IOCTL_UNBLOCK DRM_IOWR(0x13, struct drm_block)
|
||||
#define DRM_IOCTL_CONTROL DRM_IOW( 0x14, struct drm_control)
|
||||
#define DRM_IOCTL_ADD_MAP DRM_IOWR(0x15, struct drm_map)
|
||||
#define DRM_IOCTL_ADD_BUFS DRM_IOWR(0x16, struct drm_buf_desc)
|
||||
#define DRM_IOCTL_MARK_BUFS DRM_IOW( 0x17, struct drm_buf_desc)
|
||||
#define DRM_IOCTL_INFO_BUFS DRM_IOWR(0x18, struct drm_buf_info)
|
||||
#define DRM_IOCTL_MAP_BUFS DRM_IOWR(0x19, struct drm_buf_map)
|
||||
#define DRM_IOCTL_FREE_BUFS DRM_IOW( 0x1a, struct drm_buf_free)
|
||||
|
||||
#define DRM_IOCTL_RM_MAP DRM_IOW( 0x1b, struct drm_map)
|
||||
|
||||
#define DRM_IOCTL_SET_SAREA_CTX DRM_IOW( 0x1c, struct drm_ctx_priv_map)
|
||||
#define DRM_IOCTL_GET_SAREA_CTX DRM_IOWR(0x1d, struct drm_ctx_priv_map)
|
||||
|
||||
#define DRM_IOCTL_SET_MASTER DRM_IO(0x1e)
|
||||
#define DRM_IOCTL_DROP_MASTER DRM_IO(0x1f)
|
||||
|
||||
#define DRM_IOCTL_ADD_CTX DRM_IOWR(0x20, struct drm_ctx)
|
||||
#define DRM_IOCTL_RM_CTX DRM_IOWR(0x21, struct drm_ctx)
|
||||
#define DRM_IOCTL_MOD_CTX DRM_IOW( 0x22, struct drm_ctx)
|
||||
#define DRM_IOCTL_GET_CTX DRM_IOWR(0x23, struct drm_ctx)
|
||||
#define DRM_IOCTL_SWITCH_CTX DRM_IOW( 0x24, struct drm_ctx)
|
||||
#define DRM_IOCTL_NEW_CTX DRM_IOW( 0x25, struct drm_ctx)
|
||||
#define DRM_IOCTL_RES_CTX DRM_IOWR(0x26, struct drm_ctx_res)
|
||||
#define DRM_IOCTL_ADD_DRAW DRM_IOWR(0x27, struct drm_draw)
|
||||
#define DRM_IOCTL_RM_DRAW DRM_IOWR(0x28, struct drm_draw)
|
||||
#define DRM_IOCTL_DMA DRM_IOWR(0x29, struct drm_dma)
|
||||
#define DRM_IOCTL_LOCK DRM_IOW( 0x2a, struct drm_lock)
|
||||
#define DRM_IOCTL_UNLOCK DRM_IOW( 0x2b, struct drm_lock)
|
||||
#define DRM_IOCTL_FINISH DRM_IOW( 0x2c, struct drm_lock)
|
||||
|
||||
#define DRM_IOCTL_PRIME_HANDLE_TO_FD DRM_IOWR(0x2d, struct drm_prime_handle)
|
||||
#define DRM_IOCTL_PRIME_FD_TO_HANDLE DRM_IOWR(0x2e, struct drm_prime_handle)
|
||||
|
||||
#define DRM_IOCTL_AGP_ACQUIRE DRM_IO( 0x30)
|
||||
#define DRM_IOCTL_AGP_RELEASE DRM_IO( 0x31)
|
||||
#define DRM_IOCTL_AGP_ENABLE DRM_IOW( 0x32, struct drm_agp_mode)
|
||||
#define DRM_IOCTL_AGP_INFO DRM_IOR( 0x33, struct drm_agp_info)
|
||||
#define DRM_IOCTL_AGP_ALLOC DRM_IOWR(0x34, struct drm_agp_buffer)
|
||||
#define DRM_IOCTL_AGP_FREE DRM_IOW( 0x35, struct drm_agp_buffer)
|
||||
#define DRM_IOCTL_AGP_BIND DRM_IOW( 0x36, struct drm_agp_binding)
|
||||
#define DRM_IOCTL_AGP_UNBIND DRM_IOW( 0x37, struct drm_agp_binding)
|
||||
|
||||
#define DRM_IOCTL_SG_ALLOC DRM_IOWR(0x38, struct drm_scatter_gather)
|
||||
#define DRM_IOCTL_SG_FREE DRM_IOW( 0x39, struct drm_scatter_gather)
|
||||
|
||||
#define DRM_IOCTL_WAIT_VBLANK DRM_IOWR(0x3a, union drm_wait_vblank)
|
||||
|
||||
#define DRM_IOCTL_UPDATE_DRAW DRM_IOW(0x3f, struct drm_update_draw)
|
||||
|
||||
#define DRM_IOCTL_MODE_GETRESOURCES DRM_IOWR(0xA0, struct drm_mode_card_res)
|
||||
#define DRM_IOCTL_MODE_GETCRTC DRM_IOWR(0xA1, struct drm_mode_crtc)
|
||||
#define DRM_IOCTL_MODE_SETCRTC DRM_IOWR(0xA2, struct drm_mode_crtc)
|
||||
#define DRM_IOCTL_MODE_CURSOR DRM_IOWR(0xA3, struct drm_mode_cursor)
|
||||
#define DRM_IOCTL_MODE_GETGAMMA DRM_IOWR(0xA4, struct drm_mode_crtc_lut)
|
||||
#define DRM_IOCTL_MODE_SETGAMMA DRM_IOWR(0xA5, struct drm_mode_crtc_lut)
|
||||
#define DRM_IOCTL_MODE_GETENCODER DRM_IOWR(0xA6, struct drm_mode_get_encoder)
|
||||
#define DRM_IOCTL_MODE_GETCONNECTOR DRM_IOWR(0xA7, struct drm_mode_get_connector)
|
||||
#define DRM_IOCTL_MODE_ATTACHMODE DRM_IOWR(0xA8, struct drm_mode_mode_cmd) /* deprecated (never worked) */
|
||||
#define DRM_IOCTL_MODE_DETACHMODE DRM_IOWR(0xA9, struct drm_mode_mode_cmd) /* deprecated (never worked) */
|
||||
|
||||
#define DRM_IOCTL_MODE_GETPROPERTY DRM_IOWR(0xAA, struct drm_mode_get_property)
|
||||
#define DRM_IOCTL_MODE_SETPROPERTY DRM_IOWR(0xAB, struct drm_mode_connector_set_property)
|
||||
#define DRM_IOCTL_MODE_GETPROPBLOB DRM_IOWR(0xAC, struct drm_mode_get_blob)
|
||||
#define DRM_IOCTL_MODE_GETFB DRM_IOWR(0xAD, struct drm_mode_fb_cmd)
|
||||
#define DRM_IOCTL_MODE_ADDFB DRM_IOWR(0xAE, struct drm_mode_fb_cmd)
|
||||
#define DRM_IOCTL_MODE_RMFB DRM_IOWR(0xAF, unsigned int)
|
||||
#define DRM_IOCTL_MODE_PAGE_FLIP DRM_IOWR(0xB0, struct drm_mode_crtc_page_flip)
|
||||
#define DRM_IOCTL_MODE_DIRTYFB DRM_IOWR(0xB1, struct drm_mode_fb_dirty_cmd)
|
||||
|
||||
#define DRM_IOCTL_MODE_CREATE_DUMB DRM_IOWR(0xB2, struct drm_mode_create_dumb)
|
||||
#define DRM_IOCTL_MODE_MAP_DUMB DRM_IOWR(0xB3, struct drm_mode_map_dumb)
|
||||
#define DRM_IOCTL_MODE_DESTROY_DUMB DRM_IOWR(0xB4, struct drm_mode_destroy_dumb)
|
||||
#define DRM_IOCTL_MODE_GETPLANERESOURCES DRM_IOWR(0xB5, struct drm_mode_get_plane_res)
|
||||
#define DRM_IOCTL_MODE_GETPLANE DRM_IOWR(0xB6, struct drm_mode_get_plane)
|
||||
#define DRM_IOCTL_MODE_SETPLANE DRM_IOWR(0xB7, struct drm_mode_set_plane)
|
||||
#define DRM_IOCTL_MODE_ADDFB2 DRM_IOWR(0xB8, struct drm_mode_fb_cmd2)
|
||||
#define DRM_IOCTL_MODE_OBJ_GETPROPERTIES DRM_IOWR(0xB9, struct drm_mode_obj_get_properties)
|
||||
#define DRM_IOCTL_MODE_OBJ_SETPROPERTY DRM_IOWR(0xBA, struct drm_mode_obj_set_property)
|
||||
#define DRM_IOCTL_MODE_CURSOR2 DRM_IOWR(0xBB, struct drm_mode_cursor2)
|
||||
#define DRM_IOCTL_MODE_ATOMIC DRM_IOWR(0xBC, struct drm_mode_atomic)
|
||||
#define DRM_IOCTL_MODE_CREATEPROPBLOB DRM_IOWR(0xBD, struct drm_mode_create_blob)
|
||||
#define DRM_IOCTL_MODE_DESTROYPROPBLOB DRM_IOWR(0xBE, struct drm_mode_destroy_blob)
|
||||
|
||||
#define DRM_IOCTL_SYNCOBJ_CREATE DRM_IOWR(0xBF, struct drm_syncobj_create)
|
||||
#define DRM_IOCTL_SYNCOBJ_DESTROY DRM_IOWR(0xC0, struct drm_syncobj_destroy)
|
||||
#define DRM_IOCTL_SYNCOBJ_HANDLE_TO_FD DRM_IOWR(0xC1, struct drm_syncobj_handle)
|
||||
#define DRM_IOCTL_SYNCOBJ_FD_TO_HANDLE DRM_IOWR(0xC2, struct drm_syncobj_handle)
|
||||
|
||||
/**
|
||||
* Device specific ioctls should only be in their respective headers
|
||||
* The device specific ioctl range is from 0x40 to 0x9f.
|
||||
* Generic IOCTLS restart at 0xA0.
|
||||
*
|
||||
* \sa drmCommandNone(), drmCommandRead(), drmCommandWrite(), and
|
||||
* drmCommandReadWrite().
|
||||
*/
|
||||
#define DRM_COMMAND_BASE 0x40
|
||||
#define DRM_COMMAND_END 0xA0
|
||||
|
||||
/**
|
||||
* Header for events written back to userspace on the drm fd. The
|
||||
* type defines the type of event, the length specifies the total
|
||||
* length of the event (including the header), and user_data is
|
||||
* typically a 64 bit value passed with the ioctl that triggered the
|
||||
* event. A read on the drm fd will always only return complete
|
||||
* events, that is, if for example the read buffer is 100 bytes, and
|
||||
* there are two 64 byte events pending, only one will be returned.
|
||||
*
|
||||
* Event types 0 - 0x7fffffff are generic drm events, 0x80000000 and
|
||||
* up are chipset specific.
|
||||
*/
|
||||
struct drm_event {
|
||||
__u32 type;
|
||||
__u32 length;
|
||||
};
|
||||
|
||||
#define DRM_EVENT_VBLANK 0x01
|
||||
#define DRM_EVENT_FLIP_COMPLETE 0x02
|
||||
|
||||
struct drm_event_vblank {
|
||||
struct drm_event base;
|
||||
__u64 user_data;
|
||||
__u32 tv_sec;
|
||||
__u32 tv_usec;
|
||||
__u32 sequence;
|
||||
__u32 crtc_id; /* 0 on older kernels that do not support this */
|
||||
};
|
||||
|
||||
/* typedef area */
|
||||
#ifndef __KERNEL__
|
||||
typedef struct drm_clip_rect drm_clip_rect_t;
|
||||
typedef struct drm_drawable_info drm_drawable_info_t;
|
||||
typedef struct drm_tex_region drm_tex_region_t;
|
||||
typedef struct drm_hw_lock drm_hw_lock_t;
|
||||
typedef struct drm_version drm_version_t;
|
||||
typedef struct drm_unique drm_unique_t;
|
||||
typedef struct drm_list drm_list_t;
|
||||
typedef struct drm_block drm_block_t;
|
||||
typedef struct drm_control drm_control_t;
|
||||
typedef enum drm_map_type drm_map_type_t;
|
||||
typedef enum drm_map_flags drm_map_flags_t;
|
||||
typedef struct drm_ctx_priv_map drm_ctx_priv_map_t;
|
||||
typedef struct drm_map drm_map_t;
|
||||
typedef struct drm_client drm_client_t;
|
||||
typedef enum drm_stat_type drm_stat_type_t;
|
||||
typedef struct drm_stats drm_stats_t;
|
||||
typedef enum drm_lock_flags drm_lock_flags_t;
|
||||
typedef struct drm_lock drm_lock_t;
|
||||
typedef enum drm_dma_flags drm_dma_flags_t;
|
||||
typedef struct drm_buf_desc drm_buf_desc_t;
|
||||
typedef struct drm_buf_info drm_buf_info_t;
|
||||
typedef struct drm_buf_free drm_buf_free_t;
|
||||
typedef struct drm_buf_pub drm_buf_pub_t;
|
||||
typedef struct drm_buf_map drm_buf_map_t;
|
||||
typedef struct drm_dma drm_dma_t;
|
||||
typedef union drm_wait_vblank drm_wait_vblank_t;
|
||||
typedef struct drm_agp_mode drm_agp_mode_t;
|
||||
typedef enum drm_ctx_flags drm_ctx_flags_t;
|
||||
typedef struct drm_ctx drm_ctx_t;
|
||||
typedef struct drm_ctx_res drm_ctx_res_t;
|
||||
typedef struct drm_draw drm_draw_t;
|
||||
typedef struct drm_update_draw drm_update_draw_t;
|
||||
typedef struct drm_auth drm_auth_t;
|
||||
typedef struct drm_irq_busid drm_irq_busid_t;
|
||||
typedef enum drm_vblank_seq_type drm_vblank_seq_type_t;
|
||||
|
||||
typedef struct drm_agp_buffer drm_agp_buffer_t;
|
||||
typedef struct drm_agp_binding drm_agp_binding_t;
|
||||
typedef struct drm_agp_info drm_agp_info_t;
|
||||
typedef struct drm_scatter_gather drm_scatter_gather_t;
|
||||
typedef struct drm_set_version drm_set_version_t;
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
1474
tools/include/uapi/drm/i915_drm.h
Normal file
1474
tools/include/uapi/drm/i915_drm.h
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -643,7 +643,7 @@ enum bpf_func_id {
|
|||
|
||||
/* Mode for BPF_FUNC_skb_adjust_room helper. */
|
||||
enum bpf_adj_room_mode {
|
||||
BPF_ADJ_ROOM_NET_OPTS,
|
||||
BPF_ADJ_ROOM_NET,
|
||||
};
|
||||
|
||||
/* user accessible mirror of in-kernel sk_buff.
|
||||
|
|
@ -750,6 +750,8 @@ struct bpf_map_info {
|
|||
|
||||
/* User bpf_sock_ops struct to access socket values and specify request ops
|
||||
* and their replies.
|
||||
* Some of this fields are in network (bigendian) byte order and may need
|
||||
* to be converted before use (bpf_ntohl() defined in samples/bpf/bpf_endian.h).
|
||||
* New fields can only be added at the end of this structure
|
||||
*/
|
||||
struct bpf_sock_ops {
|
||||
|
|
@ -759,12 +761,12 @@ struct bpf_sock_ops {
|
|||
__u32 replylong[4];
|
||||
};
|
||||
__u32 family;
|
||||
__u32 remote_ip4;
|
||||
__u32 local_ip4;
|
||||
__u32 remote_ip6[4];
|
||||
__u32 local_ip6[4];
|
||||
__u32 remote_port;
|
||||
__u32 local_port;
|
||||
__u32 remote_ip4; /* Stored in network byte order */
|
||||
__u32 local_ip4; /* Stored in network byte order */
|
||||
__u32 remote_ip6[4]; /* Stored in network byte order */
|
||||
__u32 local_ip6[4]; /* Stored in network byte order */
|
||||
__u32 remote_port; /* Stored in network byte order */
|
||||
__u32 local_port; /* stored in host byte order */
|
||||
};
|
||||
|
||||
/* List of known BPF sock_ops operators.
|
||||
|
|
|
|||
|
|
@ -42,6 +42,27 @@
|
|||
#define F_SEAL_WRITE 0x0008 /* prevent writes */
|
||||
/* (1U << 31) is reserved for signed error codes */
|
||||
|
||||
/*
|
||||
* Set/Get write life time hints. {GET,SET}_RW_HINT operate on the
|
||||
* underlying inode, while {GET,SET}_FILE_RW_HINT operate only on
|
||||
* the specific file.
|
||||
*/
|
||||
#define F_GET_RW_HINT (F_LINUX_SPECIFIC_BASE + 11)
|
||||
#define F_SET_RW_HINT (F_LINUX_SPECIFIC_BASE + 12)
|
||||
#define F_GET_FILE_RW_HINT (F_LINUX_SPECIFIC_BASE + 13)
|
||||
#define F_SET_FILE_RW_HINT (F_LINUX_SPECIFIC_BASE + 14)
|
||||
|
||||
/*
|
||||
* Valid hint values for F_{GET,SET}_RW_HINT. 0 is "not set", or can be
|
||||
* used to clear any hints previously set.
|
||||
*/
|
||||
#define RWF_WRITE_LIFE_NOT_SET 0
|
||||
#define RWH_WRITE_LIFE_NONE 1
|
||||
#define RWH_WRITE_LIFE_SHORT 2
|
||||
#define RWH_WRITE_LIFE_MEDIUM 3
|
||||
#define RWH_WRITE_LIFE_LONG 4
|
||||
#define RWH_WRITE_LIFE_EXTREME 5
|
||||
|
||||
/*
|
||||
* Types of directory notifications that may be requested.
|
||||
*/
|
||||
|
|
|
|||
1419
tools/include/uapi/linux/kvm.h
Normal file
1419
tools/include/uapi/linux/kvm.h
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -174,6 +174,8 @@ enum perf_branch_sample_type_shift {
|
|||
PERF_SAMPLE_BRANCH_NO_FLAGS_SHIFT = 14, /* no flags */
|
||||
PERF_SAMPLE_BRANCH_NO_CYCLES_SHIFT = 15, /* no cycles */
|
||||
|
||||
PERF_SAMPLE_BRANCH_TYPE_SAVE_SHIFT = 16, /* save branch type */
|
||||
|
||||
PERF_SAMPLE_BRANCH_MAX_SHIFT /* non-ABI */
|
||||
};
|
||||
|
||||
|
|
@ -198,9 +200,30 @@ enum perf_branch_sample_type {
|
|||
PERF_SAMPLE_BRANCH_NO_FLAGS = 1U << PERF_SAMPLE_BRANCH_NO_FLAGS_SHIFT,
|
||||
PERF_SAMPLE_BRANCH_NO_CYCLES = 1U << PERF_SAMPLE_BRANCH_NO_CYCLES_SHIFT,
|
||||
|
||||
PERF_SAMPLE_BRANCH_TYPE_SAVE =
|
||||
1U << PERF_SAMPLE_BRANCH_TYPE_SAVE_SHIFT,
|
||||
|
||||
PERF_SAMPLE_BRANCH_MAX = 1U << PERF_SAMPLE_BRANCH_MAX_SHIFT,
|
||||
};
|
||||
|
||||
/*
|
||||
* Common flow change classification
|
||||
*/
|
||||
enum {
|
||||
PERF_BR_UNKNOWN = 0, /* unknown */
|
||||
PERF_BR_COND = 1, /* conditional */
|
||||
PERF_BR_UNCOND = 2, /* unconditional */
|
||||
PERF_BR_IND = 3, /* indirect */
|
||||
PERF_BR_CALL = 4, /* function call */
|
||||
PERF_BR_IND_CALL = 5, /* indirect function call */
|
||||
PERF_BR_RET = 6, /* function return */
|
||||
PERF_BR_SYSCALL = 7, /* syscall */
|
||||
PERF_BR_SYSRET = 8, /* syscall return */
|
||||
PERF_BR_COND_CALL = 9, /* conditional function call */
|
||||
PERF_BR_COND_RET = 10, /* conditional function return */
|
||||
PERF_BR_MAX,
|
||||
};
|
||||
|
||||
#define PERF_SAMPLE_BRANCH_PLM_ALL \
|
||||
(PERF_SAMPLE_BRANCH_USER|\
|
||||
PERF_SAMPLE_BRANCH_KERNEL|\
|
||||
|
|
@ -931,14 +954,20 @@ union perf_mem_data_src {
|
|||
mem_snoop:5, /* snoop mode */
|
||||
mem_lock:2, /* lock instr */
|
||||
mem_dtlb:7, /* tlb access */
|
||||
mem_rsvd:31;
|
||||
mem_lvl_num:4, /* memory hierarchy level number */
|
||||
mem_remote:1, /* remote */
|
||||
mem_snoopx:2, /* snoop mode, ext */
|
||||
mem_rsvd:24;
|
||||
};
|
||||
};
|
||||
#elif defined(__BIG_ENDIAN_BITFIELD)
|
||||
union perf_mem_data_src {
|
||||
__u64 val;
|
||||
struct {
|
||||
__u64 mem_rsvd:31,
|
||||
__u64 mem_rsvd:24,
|
||||
mem_snoopx:2, /* snoop mode, ext */
|
||||
mem_remote:1, /* remote */
|
||||
mem_lvl_num:4, /* memory hierarchy level number */
|
||||
mem_dtlb:7, /* tlb access */
|
||||
mem_lock:2, /* lock instr */
|
||||
mem_snoop:5, /* snoop mode */
|
||||
|
|
@ -975,6 +1004,22 @@ union perf_mem_data_src {
|
|||
#define PERF_MEM_LVL_UNC 0x2000 /* Uncached memory */
|
||||
#define PERF_MEM_LVL_SHIFT 5
|
||||
|
||||
#define PERF_MEM_REMOTE_REMOTE 0x01 /* Remote */
|
||||
#define PERF_MEM_REMOTE_SHIFT 37
|
||||
|
||||
#define PERF_MEM_LVLNUM_L1 0x01 /* L1 */
|
||||
#define PERF_MEM_LVLNUM_L2 0x02 /* L2 */
|
||||
#define PERF_MEM_LVLNUM_L3 0x03 /* L3 */
|
||||
#define PERF_MEM_LVLNUM_L4 0x04 /* L4 */
|
||||
/* 5-0xa available */
|
||||
#define PERF_MEM_LVLNUM_ANY_CACHE 0x0b /* Any cache */
|
||||
#define PERF_MEM_LVLNUM_LFB 0x0c /* LFB */
|
||||
#define PERF_MEM_LVLNUM_RAM 0x0d /* RAM */
|
||||
#define PERF_MEM_LVLNUM_PMEM 0x0e /* PMEM */
|
||||
#define PERF_MEM_LVLNUM_NA 0x0f /* N/A */
|
||||
|
||||
#define PERF_MEM_LVLNUM_SHIFT 33
|
||||
|
||||
/* snoop mode */
|
||||
#define PERF_MEM_SNOOP_NA 0x01 /* not available */
|
||||
#define PERF_MEM_SNOOP_NONE 0x02 /* no snoop */
|
||||
|
|
@ -983,6 +1028,10 @@ union perf_mem_data_src {
|
|||
#define PERF_MEM_SNOOP_HITM 0x10 /* snoop hit modified */
|
||||
#define PERF_MEM_SNOOP_SHIFT 19
|
||||
|
||||
#define PERF_MEM_SNOOPX_FWD 0x01 /* forward */
|
||||
/* 1 free */
|
||||
#define PERF_MEM_SNOOPX_SHIFT 37
|
||||
|
||||
/* locked instruction */
|
||||
#define PERF_MEM_LOCK_NA 0x01 /* not available */
|
||||
#define PERF_MEM_LOCK_LOCKED 0x02 /* locked transaction */
|
||||
|
|
@ -1015,6 +1064,7 @@ union perf_mem_data_src {
|
|||
* in_tx: running in a hardware transaction
|
||||
* abort: aborting a hardware transaction
|
||||
* cycles: cycles from last branch (or 0 if not supported)
|
||||
* type: branch type
|
||||
*/
|
||||
struct perf_branch_entry {
|
||||
__u64 from;
|
||||
|
|
@ -1024,7 +1074,8 @@ struct perf_branch_entry {
|
|||
in_tx:1, /* in transaction */
|
||||
abort:1, /* transaction abort */
|
||||
cycles:16, /* cycle count to last branch */
|
||||
reserved:44;
|
||||
type:4, /* branch type */
|
||||
reserved:40;
|
||||
};
|
||||
|
||||
#endif /* _UAPI_LINUX_PERF_EVENT_H */
|
||||
|
|
|
|||
52
tools/include/uapi/linux/sched.h
Normal file
52
tools/include/uapi/linux/sched.h
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
#ifndef _UAPI_LINUX_SCHED_H
|
||||
#define _UAPI_LINUX_SCHED_H
|
||||
|
||||
/*
|
||||
* cloning flags:
|
||||
*/
|
||||
#define CSIGNAL 0x000000ff /* signal mask to be sent at exit */
|
||||
#define CLONE_VM 0x00000100 /* set if VM shared between processes */
|
||||
#define CLONE_FS 0x00000200 /* set if fs info shared between processes */
|
||||
#define CLONE_FILES 0x00000400 /* set if open files shared between processes */
|
||||
#define CLONE_SIGHAND 0x00000800 /* set if signal handlers and blocked signals shared */
|
||||
#define CLONE_PTRACE 0x00002000 /* set if we want to let tracing continue on the child too */
|
||||
#define CLONE_VFORK 0x00004000 /* set if the parent wants the child to wake it up on mm_release */
|
||||
#define CLONE_PARENT 0x00008000 /* set if we want to have the same parent as the cloner */
|
||||
#define CLONE_THREAD 0x00010000 /* Same thread group? */
|
||||
#define CLONE_NEWNS 0x00020000 /* New mount namespace group */
|
||||
#define CLONE_SYSVSEM 0x00040000 /* share system V SEM_UNDO semantics */
|
||||
#define CLONE_SETTLS 0x00080000 /* create a new TLS for the child */
|
||||
#define CLONE_PARENT_SETTID 0x00100000 /* set the TID in the parent */
|
||||
#define CLONE_CHILD_CLEARTID 0x00200000 /* clear the TID in the child */
|
||||
#define CLONE_DETACHED 0x00400000 /* Unused, ignored */
|
||||
#define CLONE_UNTRACED 0x00800000 /* set if the tracing process can't force CLONE_PTRACE on this clone */
|
||||
#define CLONE_CHILD_SETTID 0x01000000 /* set the TID in the child */
|
||||
#define CLONE_NEWCGROUP 0x02000000 /* New cgroup namespace */
|
||||
#define CLONE_NEWUTS 0x04000000 /* New utsname namespace */
|
||||
#define CLONE_NEWIPC 0x08000000 /* New ipc namespace */
|
||||
#define CLONE_NEWUSER 0x10000000 /* New user namespace */
|
||||
#define CLONE_NEWPID 0x20000000 /* New pid namespace */
|
||||
#define CLONE_NEWNET 0x40000000 /* New network namespace */
|
||||
#define CLONE_IO 0x80000000 /* Clone io context */
|
||||
|
||||
/*
|
||||
* Scheduling policies
|
||||
*/
|
||||
#define SCHED_NORMAL 0
|
||||
#define SCHED_FIFO 1
|
||||
#define SCHED_RR 2
|
||||
#define SCHED_BATCH 3
|
||||
/* SCHED_ISO: reserved but not implemented yet */
|
||||
#define SCHED_IDLE 5
|
||||
#define SCHED_DEADLINE 6
|
||||
|
||||
/* Can be ORed in to make sure the process is reverted back to SCHED_NORMAL on fork */
|
||||
#define SCHED_RESET_ON_FORK 0x40000000
|
||||
|
||||
/*
|
||||
* For the sched_{set,get}attr() calls
|
||||
*/
|
||||
#define SCHED_FLAG_RESET_ON_FORK 0x01
|
||||
#define SCHED_FLAG_RECLAIM 0x02
|
||||
|
||||
#endif /* _UAPI_LINUX_SCHED_H */
|
||||
209
tools/include/uapi/linux/vhost.h
Normal file
209
tools/include/uapi/linux/vhost.h
Normal file
|
|
@ -0,0 +1,209 @@
|
|||
#ifndef _LINUX_VHOST_H
|
||||
#define _LINUX_VHOST_H
|
||||
/* Userspace interface for in-kernel virtio accelerators. */
|
||||
|
||||
/* vhost is used to reduce the number of system calls involved in virtio.
|
||||
*
|
||||
* Existing virtio net code is used in the guest without modification.
|
||||
*
|
||||
* This header includes interface used by userspace hypervisor for
|
||||
* device configuration.
|
||||
*/
|
||||
|
||||
#include <linux/types.h>
|
||||
#include <linux/compiler.h>
|
||||
#include <linux/ioctl.h>
|
||||
#include <linux/virtio_config.h>
|
||||
#include <linux/virtio_ring.h>
|
||||
|
||||
struct vhost_vring_state {
|
||||
unsigned int index;
|
||||
unsigned int num;
|
||||
};
|
||||
|
||||
struct vhost_vring_file {
|
||||
unsigned int index;
|
||||
int fd; /* Pass -1 to unbind from file. */
|
||||
|
||||
};
|
||||
|
||||
struct vhost_vring_addr {
|
||||
unsigned int index;
|
||||
/* Option flags. */
|
||||
unsigned int flags;
|
||||
/* Flag values: */
|
||||
/* Whether log address is valid. If set enables logging. */
|
||||
#define VHOST_VRING_F_LOG 0
|
||||
|
||||
/* Start of array of descriptors (virtually contiguous) */
|
||||
__u64 desc_user_addr;
|
||||
/* Used structure address. Must be 32 bit aligned */
|
||||
__u64 used_user_addr;
|
||||
/* Available structure address. Must be 16 bit aligned */
|
||||
__u64 avail_user_addr;
|
||||
/* Logging support. */
|
||||
/* Log writes to used structure, at offset calculated from specified
|
||||
* address. Address must be 32 bit aligned. */
|
||||
__u64 log_guest_addr;
|
||||
};
|
||||
|
||||
/* no alignment requirement */
|
||||
struct vhost_iotlb_msg {
|
||||
__u64 iova;
|
||||
__u64 size;
|
||||
__u64 uaddr;
|
||||
#define VHOST_ACCESS_RO 0x1
|
||||
#define VHOST_ACCESS_WO 0x2
|
||||
#define VHOST_ACCESS_RW 0x3
|
||||
__u8 perm;
|
||||
#define VHOST_IOTLB_MISS 1
|
||||
#define VHOST_IOTLB_UPDATE 2
|
||||
#define VHOST_IOTLB_INVALIDATE 3
|
||||
#define VHOST_IOTLB_ACCESS_FAIL 4
|
||||
__u8 type;
|
||||
};
|
||||
|
||||
#define VHOST_IOTLB_MSG 0x1
|
||||
|
||||
struct vhost_msg {
|
||||
int type;
|
||||
union {
|
||||
struct vhost_iotlb_msg iotlb;
|
||||
__u8 padding[64];
|
||||
};
|
||||
};
|
||||
|
||||
struct vhost_memory_region {
|
||||
__u64 guest_phys_addr;
|
||||
__u64 memory_size; /* bytes */
|
||||
__u64 userspace_addr;
|
||||
__u64 flags_padding; /* No flags are currently specified. */
|
||||
};
|
||||
|
||||
/* All region addresses and sizes must be 4K aligned. */
|
||||
#define VHOST_PAGE_SIZE 0x1000
|
||||
|
||||
struct vhost_memory {
|
||||
__u32 nregions;
|
||||
__u32 padding;
|
||||
struct vhost_memory_region regions[0];
|
||||
};
|
||||
|
||||
/* ioctls */
|
||||
|
||||
#define VHOST_VIRTIO 0xAF
|
||||
|
||||
/* Features bitmask for forward compatibility. Transport bits are used for
|
||||
* vhost specific features. */
|
||||
#define VHOST_GET_FEATURES _IOR(VHOST_VIRTIO, 0x00, __u64)
|
||||
#define VHOST_SET_FEATURES _IOW(VHOST_VIRTIO, 0x00, __u64)
|
||||
|
||||
/* Set current process as the (exclusive) owner of this file descriptor. This
|
||||
* must be called before any other vhost command. Further calls to
|
||||
* VHOST_OWNER_SET fail until VHOST_OWNER_RESET is called. */
|
||||
#define VHOST_SET_OWNER _IO(VHOST_VIRTIO, 0x01)
|
||||
/* Give up ownership, and reset the device to default values.
|
||||
* Allows subsequent call to VHOST_OWNER_SET to succeed. */
|
||||
#define VHOST_RESET_OWNER _IO(VHOST_VIRTIO, 0x02)
|
||||
|
||||
/* Set up/modify memory layout */
|
||||
#define VHOST_SET_MEM_TABLE _IOW(VHOST_VIRTIO, 0x03, struct vhost_memory)
|
||||
|
||||
/* Write logging setup. */
|
||||
/* Memory writes can optionally be logged by setting bit at an offset
|
||||
* (calculated from the physical address) from specified log base.
|
||||
* The bit is set using an atomic 32 bit operation. */
|
||||
/* Set base address for logging. */
|
||||
#define VHOST_SET_LOG_BASE _IOW(VHOST_VIRTIO, 0x04, __u64)
|
||||
/* Specify an eventfd file descriptor to signal on log write. */
|
||||
#define VHOST_SET_LOG_FD _IOW(VHOST_VIRTIO, 0x07, int)
|
||||
|
||||
/* Ring setup. */
|
||||
/* Set number of descriptors in ring. This parameter can not
|
||||
* be modified while ring is running (bound to a device). */
|
||||
#define VHOST_SET_VRING_NUM _IOW(VHOST_VIRTIO, 0x10, struct vhost_vring_state)
|
||||
/* Set addresses for the ring. */
|
||||
#define VHOST_SET_VRING_ADDR _IOW(VHOST_VIRTIO, 0x11, struct vhost_vring_addr)
|
||||
/* Base value where queue looks for available descriptors */
|
||||
#define VHOST_SET_VRING_BASE _IOW(VHOST_VIRTIO, 0x12, struct vhost_vring_state)
|
||||
/* Get accessor: reads index, writes value in num */
|
||||
#define VHOST_GET_VRING_BASE _IOWR(VHOST_VIRTIO, 0x12, struct vhost_vring_state)
|
||||
|
||||
/* Set the vring byte order in num. Valid values are VHOST_VRING_LITTLE_ENDIAN
|
||||
* or VHOST_VRING_BIG_ENDIAN (other values return -EINVAL).
|
||||
* The byte order cannot be changed while the device is active: trying to do so
|
||||
* returns -EBUSY.
|
||||
* This is a legacy only API that is simply ignored when VIRTIO_F_VERSION_1 is
|
||||
* set.
|
||||
* Not all kernel configurations support this ioctl, but all configurations that
|
||||
* support SET also support GET.
|
||||
*/
|
||||
#define VHOST_VRING_LITTLE_ENDIAN 0
|
||||
#define VHOST_VRING_BIG_ENDIAN 1
|
||||
#define VHOST_SET_VRING_ENDIAN _IOW(VHOST_VIRTIO, 0x13, struct vhost_vring_state)
|
||||
#define VHOST_GET_VRING_ENDIAN _IOW(VHOST_VIRTIO, 0x14, struct vhost_vring_state)
|
||||
|
||||
/* The following ioctls use eventfd file descriptors to signal and poll
|
||||
* for events. */
|
||||
|
||||
/* Set eventfd to poll for added buffers */
|
||||
#define VHOST_SET_VRING_KICK _IOW(VHOST_VIRTIO, 0x20, struct vhost_vring_file)
|
||||
/* Set eventfd to signal when buffers have beed used */
|
||||
#define VHOST_SET_VRING_CALL _IOW(VHOST_VIRTIO, 0x21, struct vhost_vring_file)
|
||||
/* Set eventfd to signal an error */
|
||||
#define VHOST_SET_VRING_ERR _IOW(VHOST_VIRTIO, 0x22, struct vhost_vring_file)
|
||||
/* Set busy loop timeout (in us) */
|
||||
#define VHOST_SET_VRING_BUSYLOOP_TIMEOUT _IOW(VHOST_VIRTIO, 0x23, \
|
||||
struct vhost_vring_state)
|
||||
/* Get busy loop timeout (in us) */
|
||||
#define VHOST_GET_VRING_BUSYLOOP_TIMEOUT _IOW(VHOST_VIRTIO, 0x24, \
|
||||
struct vhost_vring_state)
|
||||
|
||||
/* VHOST_NET specific defines */
|
||||
|
||||
/* Attach virtio net ring to a raw socket, or tap device.
|
||||
* The socket must be already bound to an ethernet device, this device will be
|
||||
* used for transmit. Pass fd -1 to unbind from the socket and the transmit
|
||||
* device. This can be used to stop the ring (e.g. for migration). */
|
||||
#define VHOST_NET_SET_BACKEND _IOW(VHOST_VIRTIO, 0x30, struct vhost_vring_file)
|
||||
|
||||
/* Feature bits */
|
||||
/* Log all write descriptors. Can be changed while device is active. */
|
||||
#define VHOST_F_LOG_ALL 26
|
||||
/* vhost-net should add virtio_net_hdr for RX, and strip for TX packets. */
|
||||
#define VHOST_NET_F_VIRTIO_NET_HDR 27
|
||||
|
||||
/* VHOST_SCSI specific definitions */
|
||||
|
||||
/*
|
||||
* Used by QEMU userspace to ensure a consistent vhost-scsi ABI.
|
||||
*
|
||||
* ABI Rev 0: July 2012 version starting point for v3.6-rc merge candidate +
|
||||
* RFC-v2 vhost-scsi userspace. Add GET_ABI_VERSION ioctl usage
|
||||
* ABI Rev 1: January 2013. Ignore vhost_tpgt filed in struct vhost_scsi_target.
|
||||
* All the targets under vhost_wwpn can be seen and used by guset.
|
||||
*/
|
||||
|
||||
#define VHOST_SCSI_ABI_VERSION 1
|
||||
|
||||
struct vhost_scsi_target {
|
||||
int abi_version;
|
||||
char vhost_wwpn[224]; /* TRANSPORT_IQN_LEN */
|
||||
unsigned short vhost_tpgt;
|
||||
unsigned short reserved;
|
||||
};
|
||||
|
||||
#define VHOST_SCSI_SET_ENDPOINT _IOW(VHOST_VIRTIO, 0x40, struct vhost_scsi_target)
|
||||
#define VHOST_SCSI_CLEAR_ENDPOINT _IOW(VHOST_VIRTIO, 0x41, struct vhost_scsi_target)
|
||||
/* Changing this breaks userspace. */
|
||||
#define VHOST_SCSI_GET_ABI_VERSION _IOW(VHOST_VIRTIO, 0x42, int)
|
||||
/* Set and get the events missed flag */
|
||||
#define VHOST_SCSI_SET_EVENTS_MISSED _IOW(VHOST_VIRTIO, 0x43, __u32)
|
||||
#define VHOST_SCSI_GET_EVENTS_MISSED _IOW(VHOST_VIRTIO, 0x44, __u32)
|
||||
|
||||
/* VHOST_VSOCK specific defines */
|
||||
|
||||
#define VHOST_VSOCK_SET_GUEST_CID _IOW(VHOST_VIRTIO, 0x60, __u64)
|
||||
#define VHOST_VSOCK_SET_RUNNING _IOW(VHOST_VIRTIO, 0x61, int)
|
||||
|
||||
#endif
|
||||
1026
tools/include/uapi/sound/asound.h
Normal file
1026
tools/include/uapi/sound/asound.h
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -8,9 +8,9 @@ srctree := $(patsubst %/,%,$(dir $(srctree)))
|
|||
#$(info Determined 'srctree' to be $(srctree))
|
||||
endif
|
||||
|
||||
CC = $(CROSS_COMPILE)gcc
|
||||
AR = $(CROSS_COMPILE)ar
|
||||
LD = $(CROSS_COMPILE)ld
|
||||
CC ?= $(CROSS_COMPILE)gcc
|
||||
AR ?= $(CROSS_COMPILE)ar
|
||||
LD ?= $(CROSS_COMPILE)ld
|
||||
|
||||
MAKEFLAGS += --no-print-directory
|
||||
|
||||
|
|
@ -19,7 +19,7 @@ LIBFILE = $(OUTPUT)libapi.a
|
|||
CFLAGS := $(EXTRA_WARNINGS) $(EXTRA_CFLAGS)
|
||||
CFLAGS += -ggdb3 -Wall -Wextra -std=gnu99 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fPIC
|
||||
|
||||
ifeq ($(CC), clang)
|
||||
ifeq ($(CC_NO_CLANG), 0)
|
||||
CFLAGS += -O3
|
||||
else
|
||||
CFLAGS += -O6
|
||||
|
|
|
|||
|
|
@ -154,12 +154,12 @@ all: fixdep $(VERSION_FILES) all_cmd
|
|||
all_cmd: $(CMD_TARGETS)
|
||||
|
||||
$(BPF_IN): force elfdep bpfdep
|
||||
@(test -f ../../../include/uapi/linux/bpf.h -a -f ../../../include/uapi/linux/bpf.h && ( \
|
||||
@(test -f ../../include/uapi/linux/bpf.h -a -f ../../../include/uapi/linux/bpf.h && ( \
|
||||
(diff -B ../../include/uapi/linux/bpf.h ../../../include/uapi/linux/bpf.h >/dev/null) || \
|
||||
echo "Warning: tools/include/uapi/linux/bpf.h differs from kernel" >&2 )) || true
|
||||
@(test -f ../../../include/uapi/linux/bpf_common.h -a -f ../../../include/uapi/linux/bpf_common.h && ( \
|
||||
echo "Warning: Kernel ABI header at 'tools/include/uapi/linux/bpf.h' differs from latest version at 'include/uapi/linux/bpf.h'" >&2 )) || true
|
||||
@(test -f ../../include/uapi/linux/bpf_common.h -a -f ../../../include/uapi/linux/bpf_common.h && ( \
|
||||
(diff -B ../../include/uapi/linux/bpf_common.h ../../../include/uapi/linux/bpf_common.h >/dev/null) || \
|
||||
echo "Warning: tools/include/uapi/linux/bpf_common.h differs from kernel" >&2 )) || true
|
||||
echo "Warning: Kernel ABI header at 'tools/include/uapi/linux/bpf_common.h' differs from latest version at 'include/uapi/linux/bpf_common.h'" >&2 )) || true
|
||||
$(Q)$(MAKE) $(build)=libbpf
|
||||
|
||||
$(OUTPUT)libbpf.so: $(BPF_IN)
|
||||
|
|
|
|||
|
|
@ -39,27 +39,45 @@ void *memdup(const void *src, size_t len)
|
|||
* @s: input string
|
||||
* @res: result
|
||||
*
|
||||
* This routine returns 0 iff the first character is one of 'Yy1Nn0'.
|
||||
* Otherwise it will return -EINVAL. Value pointed to by res is
|
||||
* updated upon finding a match.
|
||||
* This routine returns 0 iff the first character is one of 'Yy1Nn0', or
|
||||
* [oO][NnFf] for "on" and "off". Otherwise it will return -EINVAL. Value
|
||||
* pointed to by res is updated upon finding a match.
|
||||
*/
|
||||
int strtobool(const char *s, bool *res)
|
||||
{
|
||||
if (!s)
|
||||
return -EINVAL;
|
||||
|
||||
switch (s[0]) {
|
||||
case 'y':
|
||||
case 'Y':
|
||||
case '1':
|
||||
*res = true;
|
||||
break;
|
||||
return 0;
|
||||
case 'n':
|
||||
case 'N':
|
||||
case '0':
|
||||
*res = false;
|
||||
break;
|
||||
return 0;
|
||||
case 'o':
|
||||
case 'O':
|
||||
switch (s[1]) {
|
||||
case 'n':
|
||||
case 'N':
|
||||
*res = true;
|
||||
return 0;
|
||||
case 'f':
|
||||
case 'F':
|
||||
*res = false;
|
||||
return 0;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
default:
|
||||
return -EINVAL;
|
||||
break;
|
||||
}
|
||||
return 0;
|
||||
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -87,12 +105,3 @@ size_t __weak strlcpy(char *dest, const char *src, size_t size)
|
|||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
int prefixcmp(const char *str, const char *prefix)
|
||||
{
|
||||
for (; ; str++, prefix++)
|
||||
if (!*prefix)
|
||||
return 0;
|
||||
else if (*str != *prefix)
|
||||
return (unsigned char)*prefix - (unsigned char)*str;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ LIBFILE = $(OUTPUT)libsubcmd.a
|
|||
CFLAGS := $(EXTRA_WARNINGS) $(EXTRA_CFLAGS)
|
||||
CFLAGS += -ggdb3 -Wall -Wextra -std=gnu99 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2 -fPIC
|
||||
|
||||
ifeq ($(CC), clang)
|
||||
ifeq ($(CC_NO_CLANG), 0)
|
||||
CFLAGS += -O3
|
||||
else
|
||||
CFLAGS += -O6
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ static void list_commands_in_dir(struct cmdnames *cmds,
|
|||
while ((de = readdir(dir)) != NULL) {
|
||||
int entlen;
|
||||
|
||||
if (prefixcmp(de->d_name, prefix))
|
||||
if (!strstarts(de->d_name, prefix))
|
||||
continue;
|
||||
|
||||
astrcat(&buf, de->d_name);
|
||||
|
|
|
|||
|
|
@ -368,7 +368,7 @@ retry:
|
|||
return 0;
|
||||
}
|
||||
if (!rest) {
|
||||
if (!prefixcmp(options->long_name, "no-")) {
|
||||
if (strstarts(options->long_name, "no-")) {
|
||||
/*
|
||||
* The long name itself starts with "no-", so
|
||||
* accept the option without "no-" so that users
|
||||
|
|
@ -381,7 +381,7 @@ retry:
|
|||
goto match;
|
||||
}
|
||||
/* Abbreviated case */
|
||||
if (!prefixcmp(options->long_name + 3, arg)) {
|
||||
if (strstarts(options->long_name + 3, arg)) {
|
||||
flags |= OPT_UNSET;
|
||||
goto is_abbreviated;
|
||||
}
|
||||
|
|
@ -406,7 +406,7 @@ is_abbreviated:
|
|||
continue;
|
||||
}
|
||||
/* negated and abbreviated very much? */
|
||||
if (!prefixcmp("no-", arg)) {
|
||||
if (strstarts("no-", arg)) {
|
||||
flags |= OPT_UNSET;
|
||||
goto is_abbreviated;
|
||||
}
|
||||
|
|
@ -416,7 +416,7 @@ is_abbreviated:
|
|||
flags |= OPT_UNSET;
|
||||
rest = skip_prefix(arg + 3, options->long_name);
|
||||
/* abbreviated and negated? */
|
||||
if (!rest && !prefixcmp(options->long_name, arg + 3))
|
||||
if (!rest && strstarts(options->long_name, arg + 3))
|
||||
goto is_abbreviated;
|
||||
if (!rest)
|
||||
continue;
|
||||
|
|
@ -456,7 +456,7 @@ static void check_typos(const char *arg, const struct option *options)
|
|||
if (strlen(arg) < 3)
|
||||
return;
|
||||
|
||||
if (!prefixcmp(arg, "no-")) {
|
||||
if (strstarts(arg, "no-")) {
|
||||
fprintf(stderr, " Error: did you mean `--%s` (with two dashes ?)", arg);
|
||||
exit(129);
|
||||
}
|
||||
|
|
@ -464,7 +464,7 @@ static void check_typos(const char *arg, const struct option *options)
|
|||
for (; options->type != OPTION_END; options++) {
|
||||
if (!options->long_name)
|
||||
continue;
|
||||
if (!prefixcmp(options->long_name, arg)) {
|
||||
if (strstarts(options->long_name, arg)) {
|
||||
fprintf(stderr, " Error: did you mean `--%s` (with two dashes ?)", arg);
|
||||
exit(129);
|
||||
}
|
||||
|
|
@ -933,10 +933,10 @@ opt:
|
|||
if (opts->long_name == NULL)
|
||||
continue;
|
||||
|
||||
if (!prefixcmp(opts->long_name, optstr))
|
||||
if (strstarts(opts->long_name, optstr))
|
||||
print_option_help(opts, 0);
|
||||
if (!prefixcmp("no-", optstr) &&
|
||||
!prefixcmp(opts->long_name, optstr + 3))
|
||||
if (strstarts("no-", optstr) &&
|
||||
strstarts(opts->long_name, optstr + 3))
|
||||
print_option_help(opts, 0);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -50,6 +50,6 @@ libperf-y += util/
|
|||
libperf-y += arch/
|
||||
libperf-y += ui/
|
||||
libperf-y += scripts/
|
||||
libperf-y += trace/beauty/
|
||||
libperf-$(CONFIG_AUDIT) += trace/beauty/
|
||||
|
||||
gtk-y += ui/gtk/
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ do-install-man: man
|
|||
# $(INSTALL) -m 644 $(DOC_MAN5) $(DESTDIR)$(man5dir); \
|
||||
# $(INSTALL) -m 644 $(DOC_MAN7) $(DESTDIR)$(man7dir)
|
||||
|
||||
install-man: check-man-tools man
|
||||
install-man: check-man-tools man do-install-man
|
||||
|
||||
ifdef missing_tools
|
||||
DO_INSTALL_MAN = $(warning Please install $(missing_tools) to have the man pages installed)
|
||||
|
|
|
|||
|
|
@ -104,9 +104,9 @@ system, asynchronous, interrupt, transaction abort, trace begin, trace end, and
|
|||
in transaction, respectively.
|
||||
|
||||
While it is possible to create scripts to analyze the data, an alternative
|
||||
approach is available to export the data to a postgresql database. Refer to
|
||||
script export-to-postgresql.py for more details, and to script
|
||||
call-graph-from-postgresql.py for an example of using the database.
|
||||
approach is available to export the data to a sqlite or postgresql database.
|
||||
Refer to script export-to-sqlite.py or export-to-postgresql.py for more details,
|
||||
and to script call-graph-from-sql.py for an example of using the database.
|
||||
|
||||
There is also script intel-pt-events.py which provides an example of how to
|
||||
unpack the raw data for power events and PTWRITE.
|
||||
|
|
|
|||
|
|
@ -43,6 +43,10 @@ OPTIONS
|
|||
--quiet::
|
||||
Do not show any message. (Suppress -v)
|
||||
|
||||
-n::
|
||||
--show-nr-samples::
|
||||
Show the number of samples for each symbol
|
||||
|
||||
-D::
|
||||
--dump-raw-trace::
|
||||
Dump raw trace in ASCII.
|
||||
|
|
@ -88,6 +92,8 @@ OPTIONS
|
|||
--asm-raw::
|
||||
Show raw instruction encoding of assembly instructions.
|
||||
|
||||
--show-total-period:: Show a column with the sum of periods.
|
||||
|
||||
--source::
|
||||
Interleave source code with assembly code. Enabled by default,
|
||||
disable with --no-source.
|
||||
|
|
|
|||
|
|
@ -61,6 +61,11 @@ OPTIONS
|
|||
--verbose::
|
||||
Be more verbose.
|
||||
|
||||
--target-ns=PID:
|
||||
Obtain mount namespace information from the target pid. This is
|
||||
used when creating a uprobe for a process that resides in a
|
||||
different mount namespace from the perf(1) utility.
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
linkperf:perf-record[1], linkperf:perf-report[1], linkperf:perf-buildid-list[1]
|
||||
|
|
|
|||
|
|
@ -130,6 +130,11 @@ OPTIONS
|
|||
--max-probes=NUM::
|
||||
Set the maximum number of probe points for an event. Default is 128.
|
||||
|
||||
--target-ns=PID:
|
||||
Obtain mount namespace information from the target pid. This is
|
||||
used when creating a uprobe for a process that resides in a
|
||||
different mount namespace from the perf(1) utility.
|
||||
|
||||
-x::
|
||||
--exec=PATH::
|
||||
Specify path to the executable or shared library file for user
|
||||
|
|
@ -264,6 +269,15 @@ Add probes at malloc() function on libc
|
|||
|
||||
./perf probe -x /lib/libc.so.6 malloc or ./perf probe /lib/libc.so.6 malloc
|
||||
|
||||
Add a uprobe to a target process running in a different mount namespace
|
||||
|
||||
./perf probe --target-ns <target pid> -x /lib64/libc.so.6 malloc
|
||||
|
||||
Add a USDT probe to a target process running in a different mount namespace
|
||||
|
||||
./perf probe --target-ns <target pid> -x /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.121-0.b13.el7_3.x86_64/jre/lib/amd64/server/libjvm.so %sdt_hotspot:thread__sleep__end
|
||||
|
||||
|
||||
SEE ALSO
|
||||
--------
|
||||
linkperf:perf-trace[1], linkperf:perf-record[1], linkperf:perf-buildid-cache[1]
|
||||
|
|
|
|||
|
|
@ -332,6 +332,7 @@ following filters are defined:
|
|||
- no_tx: only when the target is not in a hardware transaction
|
||||
- abort_tx: only when the target is a hardware transaction abort
|
||||
- cond: conditional branches
|
||||
- save_type: save branch type during sampling in case binary is not available later
|
||||
|
||||
+
|
||||
The option requires at least one branch type among any, any_call, any_ret, ind_call, cond.
|
||||
|
|
|
|||
|
|
@ -41,13 +41,13 @@ report::
|
|||
|
||||
- a symbolically formed event like 'pmu/param1=0x3,param2/' where
|
||||
param1 and param2 are defined as formats for the PMU in
|
||||
/sys/bus/event_sources/devices/<pmu>/format/*
|
||||
/sys/bus/event_source/devices/<pmu>/format/*
|
||||
|
||||
- a symbolically formed event like 'pmu/config=M,config1=N,config2=K/'
|
||||
where M, N, K are numbers (in decimal, hex, octal format).
|
||||
Acceptable values for each of 'config', 'config1' and 'config2'
|
||||
parameters are defined by corresponding entries in
|
||||
/sys/bus/event_sources/devices/<pmu>/format/*
|
||||
/sys/bus/event_source/devices/<pmu>/format/*
|
||||
|
||||
-i::
|
||||
--no-inherit::
|
||||
|
|
|
|||
|
|
@ -237,6 +237,10 @@ Default is to monitor all CPUS.
|
|||
--hierarchy::
|
||||
Enable hierarchy output.
|
||||
|
||||
--force::
|
||||
Don't do ownership validation.
|
||||
|
||||
|
||||
INTERACTIVE PROMPTING KEYS
|
||||
--------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -398,6 +398,11 @@ struct auxtrace_error_event {
|
|||
char msg[MAX_AUXTRACE_ERROR_MSG];
|
||||
};
|
||||
|
||||
PERF_RECORD_HEADER_FEATURE = 80,
|
||||
|
||||
Describes a header feature. These are records used in pipe-mode that
|
||||
contain information that otherwise would be in perf.data file's header.
|
||||
|
||||
Event types
|
||||
|
||||
Define the event attributes with their IDs.
|
||||
|
|
@ -422,8 +427,9 @@ struct perf_pipe_file_header {
|
|||
};
|
||||
|
||||
The information about attrs, data, and event_types is instead in the
|
||||
synthesized events PERF_RECORD_ATTR, PERF_RECORD_HEADER_TRACING_DATA and
|
||||
PERF_RECORD_HEADER_EVENT_TYPE that are generated by perf record in pipe-mode.
|
||||
synthesized events PERF_RECORD_ATTR, PERF_RECORD_HEADER_TRACING_DATA,
|
||||
PERF_RECORD_HEADER_EVENT_TYPE, and PERF_RECORD_HEADER_FEATURE
|
||||
that are generated by perf record in pipe-mode.
|
||||
|
||||
|
||||
References:
|
||||
|
|
|
|||
|
|
@ -70,15 +70,23 @@ tools/include/linux/hash.h
|
|||
tools/include/linux/kernel.h
|
||||
tools/include/linux/list.h
|
||||
tools/include/linux/log2.h
|
||||
tools/include/uapi/asm-generic/fcntl.h
|
||||
tools/include/uapi/asm-generic/ioctls.h
|
||||
tools/include/uapi/asm-generic/mman-common.h
|
||||
tools/include/uapi/asm-generic/mman.h
|
||||
tools/include/uapi/drm/drm.h
|
||||
tools/include/uapi/drm/i915_drm.h
|
||||
tools/include/uapi/linux/bpf.h
|
||||
tools/include/uapi/linux/bpf_common.h
|
||||
tools/include/uapi/linux/fcntl.h
|
||||
tools/include/uapi/linux/hw_breakpoint.h
|
||||
tools/include/uapi/linux/kvm.h
|
||||
tools/include/uapi/linux/mman.h
|
||||
tools/include/uapi/linux/perf_event.h
|
||||
tools/include/uapi/linux/sched.h
|
||||
tools/include/uapi/linux/stat.h
|
||||
tools/include/uapi/linux/vhost.h
|
||||
tools/include/uapi/sound/asound.h
|
||||
tools/include/linux/poison.h
|
||||
tools/include/linux/rbtree.h
|
||||
tools/include/linux/rbtree_augmented.h
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ ifeq ($(SRCARCH),x86)
|
|||
ifeq (${IS_64_BIT}, 1)
|
||||
CFLAGS += -DHAVE_ARCH_X86_64_SUPPORT -DHAVE_SYSCALL_TABLE -I$(OUTPUT)arch/x86/include/generated
|
||||
ARCH_INCLUDE = ../../arch/x86/lib/memcpy_64.S ../../arch/x86/lib/memset_64.S
|
||||
LIBUNWIND_LIBS = -lunwind -lunwind-x86_64
|
||||
LIBUNWIND_LIBS = -lunwind-x86_64 -lunwind -llzma
|
||||
$(call detected,CONFIG_X86_64)
|
||||
else
|
||||
LIBUNWIND_LIBS = -lunwind-x86 -llzma -lunwind
|
||||
|
|
@ -103,8 +103,12 @@ ifdef LIBDW_DIR
|
|||
LIBDW_CFLAGS := -I$(LIBDW_DIR)/include
|
||||
LIBDW_LDFLAGS := -L$(LIBDW_DIR)/lib
|
||||
endif
|
||||
DWARFLIBS := -ldw
|
||||
ifeq ($(findstring -static,${LDFLAGS}),-static)
|
||||
DWARFLIBS += -lelf -lebl -ldl -lz -llzma -lbz2
|
||||
endif
|
||||
FEATURE_CHECK_CFLAGS-libdw-dwarf-unwind := $(LIBDW_CFLAGS)
|
||||
FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind := $(LIBDW_LDFLAGS) -ldw
|
||||
FEATURE_CHECK_LDFLAGS-libdw-dwarf-unwind := $(LIBDW_LDFLAGS) $(DWARFLIBS)
|
||||
|
||||
# for linking with debug library, run like:
|
||||
# make DEBUG=1 LIBBABELTRACE_DIR=/opt/libbabeltrace/
|
||||
|
|
@ -144,7 +148,7 @@ ifndef DEBUG
|
|||
endif
|
||||
|
||||
ifeq ($(DEBUG),0)
|
||||
ifeq ($(CC), clang)
|
||||
ifeq ($(CC_NO_CLANG), 0)
|
||||
CFLAGS += -O3
|
||||
else
|
||||
CFLAGS += -O6
|
||||
|
|
@ -180,7 +184,7 @@ ifdef PYTHON_CONFIG
|
|||
PYTHON_EMBED_LDFLAGS := $(call strip-libs,$(PYTHON_EMBED_LDOPTS))
|
||||
PYTHON_EMBED_LIBADD := $(call grep-libs,$(PYTHON_EMBED_LDOPTS)) -lutil
|
||||
PYTHON_EMBED_CCOPTS := $(shell $(PYTHON_CONFIG_SQ) --cflags 2>/dev/null)
|
||||
ifeq ($(CC), clang)
|
||||
ifeq ($(CC_NO_CLANG), 1)
|
||||
PYTHON_EMBED_CCOPTS := $(filter-out -specs=%,$(PYTHON_EMBED_CCOPTS))
|
||||
endif
|
||||
FLAGS_PYTHON_EMBED := $(PYTHON_EMBED_CCOPTS) $(PYTHON_EMBED_LDOPTS)
|
||||
|
|
@ -330,6 +334,11 @@ ifeq ($(feature-sched_getcpu), 1)
|
|||
CFLAGS += -DHAVE_SCHED_GETCPU_SUPPORT
|
||||
endif
|
||||
|
||||
ifeq ($(feature-setns), 1)
|
||||
CFLAGS += -DHAVE_SETNS_SUPPORT
|
||||
$(call detected,CONFIG_SETNS)
|
||||
endif
|
||||
|
||||
ifndef NO_LIBELF
|
||||
CFLAGS += -DHAVE_LIBELF_SUPPORT
|
||||
EXTLIBS += -lelf
|
||||
|
|
@ -360,10 +369,6 @@ ifndef NO_LIBELF
|
|||
else
|
||||
CFLAGS += -DHAVE_DWARF_SUPPORT $(LIBDW_CFLAGS)
|
||||
LDFLAGS += $(LIBDW_LDFLAGS)
|
||||
DWARFLIBS := -ldw
|
||||
ifeq ($(findstring -static,${LDFLAGS}),-static)
|
||||
DWARFLIBS += -lelf -lebl -lz -llzma -lbz2
|
||||
endif
|
||||
EXTLIBS += ${DWARFLIBS}
|
||||
$(call detected,CONFIG_DWARF)
|
||||
endif # PERF_HAVE_DWARF_REGS
|
||||
|
|
@ -500,6 +505,10 @@ ifndef NO_LOCAL_LIBUNWIND
|
|||
EXTLIBS += $(LIBUNWIND_LIBS)
|
||||
LDFLAGS += $(LIBUNWIND_LIBS)
|
||||
endif
|
||||
ifeq ($(findstring -static,${LDFLAGS}),-static)
|
||||
# gcc -static links libgcc_eh which contans piece of libunwind
|
||||
LIBUNWIND_LDFLAGS += -Wl,--allow-multiple-definition
|
||||
endif
|
||||
|
||||
ifndef NO_LIBUNWIND
|
||||
CFLAGS += -DHAVE_LIBUNWIND_SUPPORT
|
||||
|
|
|
|||
|
|
@ -33,6 +33,11 @@ include ../scripts/utilities.mak
|
|||
#
|
||||
# Define EXTRA_CFLAGS=-m64 or EXTRA_CFLAGS=-m32 as appropriate for cross-builds.
|
||||
#
|
||||
# Define EXCLUDE_EXTLIBS=-lmylib to exclude libmylib from the auto-generated
|
||||
# EXTLIBS.
|
||||
#
|
||||
# Define EXTRA_PERFLIBS to pass extra libraries to PERFLIBS.
|
||||
#
|
||||
# Define NO_DWARF if you do not want debug-info analysis feature at all.
|
||||
#
|
||||
# Define WERROR=0 to disable treating any warnings as errors.
|
||||
|
|
@ -159,8 +164,8 @@ LN = ln -f
|
|||
MKDIR = mkdir
|
||||
FIND = find
|
||||
INSTALL = install
|
||||
FLEX = flex
|
||||
BISON = bison
|
||||
FLEX ?= flex
|
||||
BISON ?= bison
|
||||
STRIP = strip
|
||||
AWK = awk
|
||||
|
||||
|
|
@ -235,7 +240,7 @@ endif
|
|||
ifeq ($(FEATURES_DUMP),)
|
||||
FEATURE_DUMP_EXPORT := $(realpath $(OUTPUT)FEATURE-DUMP)
|
||||
else
|
||||
FEATURE_DUMP_EXPORT := $(FEATURES_DUMP)
|
||||
FEATURE_DUMP_EXPORT := $(realpath $(FEATURES_DUMP))
|
||||
endif
|
||||
|
||||
export prefix bindir sharedir sysconfdir DESTDIR
|
||||
|
|
@ -274,7 +279,13 @@ LIBTRACEEVENT = $(TE_PATH)libtraceevent.a
|
|||
export LIBTRACEEVENT
|
||||
|
||||
LIBTRACEEVENT_DYNAMIC_LIST = $(TE_PATH)libtraceevent-dynamic-list
|
||||
LIBTRACEEVENT_DYNAMIC_LIST_LDFLAGS = -Xlinker --dynamic-list=$(LIBTRACEEVENT_DYNAMIC_LIST)
|
||||
|
||||
#
|
||||
# The static build has no dynsym table, so this does not work for
|
||||
# static build. Looks like linker starts to scream about that now
|
||||
# (in Fedora 26) so we need to switch it off for static build.
|
||||
DYNAMIC_LIST_LDFLAGS = -Xlinker --dynamic-list=$(LIBTRACEEVENT_DYNAMIC_LIST)
|
||||
LIBTRACEEVENT_DYNAMIC_LIST_LDFLAGS = $(if $(findstring -static,$(LDFLAGS)),,$(DYNAMIC_LIST_LDFLAGS))
|
||||
|
||||
LIBAPI = $(API_PATH)libapi.a
|
||||
export LIBAPI
|
||||
|
|
@ -352,7 +363,8 @@ ifdef ASCIIDOC8
|
|||
export ASCIIDOC8
|
||||
endif
|
||||
|
||||
LIBS = -Wl,--whole-archive $(PERFLIBS) -Wl,--no-whole-archive -Wl,--start-group $(EXTLIBS) -Wl,--end-group
|
||||
EXTLIBS := $(call filter-out,$(EXCLUDE_EXTLIBS),$(EXTLIBS))
|
||||
LIBS = -Wl,--whole-archive $(PERFLIBS) $(EXTRA_PERFLIBS) -Wl,--no-whole-archive -Wl,--start-group $(EXTLIBS) -Wl,--end-group
|
||||
|
||||
ifeq ($(USE_CLANG), 1)
|
||||
CLANGLIBS_LIST = AST Basic CodeGen Driver Frontend Lex Tooling Edit Sema Analysis Parse Serialization
|
||||
|
|
@ -375,6 +387,60 @@ export INSTALL SHELL_PATH
|
|||
|
||||
SHELL = $(SHELL_PATH)
|
||||
|
||||
beauty_outdir := $(OUTPUT)trace/beauty/generated
|
||||
beauty_ioctl_outdir := $(beauty_outdir)/ioctl
|
||||
drm_ioctl_array := $(beauty_ioctl_outdir)/drm_ioctl_array.c
|
||||
drm_hdr_dir := $(srctree)/tools/include/uapi/drm
|
||||
drm_ioctl_tbl := $(srctree)/tools/perf/trace/beauty/drm_ioctl.sh
|
||||
|
||||
# Create output directory if not already present
|
||||
_dummy := $(shell [ -d '$(beauty_ioctl_outdir)' ] || mkdir -p '$(beauty_ioctl_outdir)')
|
||||
|
||||
$(drm_ioctl_array): $(drm_hdr_dir)/drm.h $(drm_hdr_dir)/i915_drm.h $(drm_ioctl_tbl)
|
||||
$(Q)$(SHELL) '$(drm_ioctl_tbl)' $(drm_hdr_dir) > $@
|
||||
|
||||
pkey_alloc_access_rights_array := $(beauty_outdir)/pkey_alloc_access_rights_array.c
|
||||
asm_generic_hdr_dir := $(srctree)/tools/include/uapi/asm-generic/
|
||||
pkey_alloc_access_rights_tbl := $(srctree)/tools/perf/trace/beauty/pkey_alloc_access_rights.sh
|
||||
|
||||
$(pkey_alloc_access_rights_array): $(asm_generic_hdr_dir)/mman-common.h $(pkey_alloc_access_rights_tbl)
|
||||
$(Q)$(SHELL) '$(pkey_alloc_access_rights_tbl)' $(asm_generic_hdr_dir) > $@
|
||||
|
||||
sndrv_ctl_ioctl_array := $(beauty_ioctl_outdir)/sndrv_ctl_ioctl_array.c
|
||||
sndrv_ctl_hdr_dir := $(srctree)/tools/include/uapi/sound
|
||||
sndrv_ctl_ioctl_tbl := $(srctree)/tools/perf/trace/beauty/sndrv_ctl_ioctl.sh
|
||||
|
||||
$(sndrv_ctl_ioctl_array): $(sndrv_ctl_hdr_dir)/asound.h $(sndrv_ctl_ioctl_tbl)
|
||||
$(Q)$(SHELL) '$(sndrv_ctl_ioctl_tbl)' $(sndrv_ctl_hdr_dir) > $@
|
||||
|
||||
sndrv_pcm_ioctl_array := $(beauty_ioctl_outdir)/sndrv_pcm_ioctl_array.c
|
||||
sndrv_pcm_hdr_dir := $(srctree)/tools/include/uapi/sound
|
||||
sndrv_pcm_ioctl_tbl := $(srctree)/tools/perf/trace/beauty/sndrv_pcm_ioctl.sh
|
||||
|
||||
$(sndrv_pcm_ioctl_array): $(sndrv_pcm_hdr_dir)/asound.h $(sndrv_pcm_ioctl_tbl)
|
||||
$(Q)$(SHELL) '$(sndrv_pcm_ioctl_tbl)' $(sndrv_pcm_hdr_dir) > $@
|
||||
|
||||
kvm_ioctl_array := $(beauty_ioctl_outdir)/kvm_ioctl_array.c
|
||||
kvm_hdr_dir := $(srctree)/tools/include/uapi/linux
|
||||
kvm_ioctl_tbl := $(srctree)/tools/perf/trace/beauty/kvm_ioctl.sh
|
||||
|
||||
$(kvm_ioctl_array): $(kvm_hdr_dir)/kvm.h $(kvm_ioctl_tbl)
|
||||
$(Q)$(SHELL) '$(kvm_ioctl_tbl)' $(kvm_hdr_dir) > $@
|
||||
|
||||
vhost_virtio_ioctl_array := $(beauty_ioctl_outdir)/vhost_virtio_ioctl_array.c
|
||||
vhost_virtio_hdr_dir := $(srctree)/tools/include/uapi/linux
|
||||
vhost_virtio_ioctl_tbl := $(srctree)/tools/perf/trace/beauty/vhost_virtio_ioctl.sh
|
||||
|
||||
$(vhost_virtio_ioctl_array): $(vhost_virtio_hdr_dir)/vhost.h $(vhost_virtio_ioctl_tbl)
|
||||
$(Q)$(SHELL) '$(vhost_virtio_ioctl_tbl)' $(vhost_virtio_hdr_dir) > $@
|
||||
|
||||
perf_ioctl_array := $(beauty_ioctl_outdir)/perf_ioctl_array.c
|
||||
perf_hdr_dir := $(srctree)/tools/include/uapi/linux
|
||||
perf_ioctl_tbl := $(srctree)/tools/perf/trace/beauty/perf_ioctl.sh
|
||||
|
||||
$(perf_ioctl_array): $(perf_hdr_dir)/perf_event.h $(perf_ioctl_tbl)
|
||||
$(Q)$(SHELL) '$(perf_ioctl_tbl)' $(perf_hdr_dir) > $@
|
||||
|
||||
all: shell_compatibility_test $(ALL_PROGRAMS) $(LANG_BINDINGS) $(OTHER_PROGRAMS)
|
||||
|
||||
$(OUTPUT)python/perf.so: $(PYTHON_EXT_SRCS) $(PYTHON_EXT_DEPS) $(LIBTRACEEVENT_DYNAMIC_LIST)
|
||||
|
|
@ -469,7 +535,13 @@ endif
|
|||
__build-dir = $(subst $(OUTPUT),,$(dir $@))
|
||||
build-dir = $(if $(__build-dir),$(__build-dir),.)
|
||||
|
||||
prepare: $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h archheaders
|
||||
prepare: $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)common-cmds.h archheaders $(drm_ioctl_array) \
|
||||
$(pkey_alloc_access_rights_array) \
|
||||
$(sndrv_pcm_ioctl_array) \
|
||||
$(sndrv_ctl_ioctl_array) \
|
||||
$(kvm_ioctl_array) \
|
||||
$(vhost_virtio_ioctl_array) \
|
||||
$(perf_ioctl_array)
|
||||
|
||||
$(OUTPUT)%.o: %.c prepare FORCE
|
||||
$(Q)$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=$(build-dir) $@
|
||||
|
|
@ -512,7 +584,7 @@ $(LIBJVMTI_IN): FORCE
|
|||
$(Q)$(MAKE) -f $(srctree)/tools/build/Makefile.build dir=jvmti obj=jvmti
|
||||
|
||||
$(OUTPUT)$(LIBJVMTI): $(LIBJVMTI_IN)
|
||||
$(QUIET_LINK)$(CC) -shared -Wl,-soname -Wl,$(LIBJVMTI) -o $@ $< -lelf -lrt
|
||||
$(QUIET_LINK)$(CC) -shared -Wl,-soname -Wl,$(LIBJVMTI) -o $@ $<
|
||||
endif
|
||||
|
||||
$(patsubst perf-%,%.o,$(PROGRAMS)): $(wildcard */*.h)
|
||||
|
|
@ -703,7 +775,11 @@ install-tests: all install-gtk
|
|||
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests'; \
|
||||
$(INSTALL) tests/attr.py '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests'; \
|
||||
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr'; \
|
||||
$(INSTALL) tests/attr/* '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr'
|
||||
$(INSTALL) tests/attr/* '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/attr'; \
|
||||
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell'; \
|
||||
$(INSTALL) tests/shell/*.sh '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell'; \
|
||||
$(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell/lib'; \
|
||||
$(INSTALL) tests/shell/lib/*.sh '$(DESTDIR_SQ)$(perfexec_instdir_SQ)/tests/shell/lib'
|
||||
|
||||
install-bin: install-tools install-tests install-traceevent-plugins
|
||||
|
||||
|
|
@ -734,7 +810,14 @@ clean:: $(LIBTRACEEVENT)-clean $(LIBAPI)-clean $(LIBBPF)-clean $(LIBSUBCMD)-clea
|
|||
$(call QUIET_CLEAN, core-gen) $(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo $(OUTPUT)common-cmds.h TAGS tags cscope* $(OUTPUT)PERF-VERSION-FILE $(OUTPUT)FEATURE-DUMP $(OUTPUT)util/*-bison* $(OUTPUT)util/*-flex* \
|
||||
$(OUTPUT)util/intel-pt-decoder/inat-tables.c \
|
||||
$(OUTPUT)tests/llvm-src-{base,kbuild,prologue,relocation}.c \
|
||||
$(OUTPUT)pmu-events/pmu-events.c
|
||||
$(OUTPUT)pmu-events/pmu-events.c \
|
||||
$(OUTPUT)$(drm_ioctl_array) \
|
||||
$(OUTPUT)$(pkey_alloc_access_rights_array) \
|
||||
$(OUTPUT)$(sndrv_ctl_ioctl_array) \
|
||||
$(OUTPUT)$(sndrv_pcm_ioctl_array) \
|
||||
$(OUTPUT)$(kvm_ioctl_array) \
|
||||
$(OUTPUT)$(vhost_virtio_ioctl_array) \
|
||||
$(OUTPUT)$(perf_ioctl_array)
|
||||
$(QUIET_SUBDIR0)Documentation $(QUIET_SUBDIR1) clean
|
||||
$(python-clean)
|
||||
|
||||
|
|
|
|||
|
|
@ -126,7 +126,7 @@ void arch__post_process_probe_trace_events(struct perf_probe_event *pev,
|
|||
struct rb_node *tmp;
|
||||
int i = 0;
|
||||
|
||||
map = get_target_map(pev->target, pev->uprobes);
|
||||
map = get_target_map(pev->target, pev->nsi, pev->uprobes);
|
||||
if (!map || map__load(map) < 0)
|
||||
return;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
libperf-y += header.o
|
||||
libperf-y += sym-handling.o
|
||||
libperf-y += kvm-stat.o
|
||||
|
||||
libperf-$(CONFIG_DWARF) += dwarf-regs.o
|
||||
|
|
|
|||
29
tools/perf/arch/s390/util/sym-handling.c
Normal file
29
tools/perf/arch/s390/util/sym-handling.c
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
/*
|
||||
* Architecture specific ELF symbol handling and relocation mapping.
|
||||
*
|
||||
* Copyright 2017 IBM Corp.
|
||||
* Author(s): Thomas Richter <tmricht@linux.vnet.ibm.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License (version 2 only)
|
||||
* as published by the Free Software Foundation.
|
||||
*/
|
||||
|
||||
#include "symbol.h"
|
||||
|
||||
#ifdef HAVE_LIBELF_SUPPORT
|
||||
bool elf__needs_adjust_symbols(GElf_Ehdr ehdr)
|
||||
{
|
||||
if (ehdr.e_type == ET_EXEC)
|
||||
return false;
|
||||
return ehdr.e_type == ET_REL || ehdr.e_type == ET_DYN;
|
||||
}
|
||||
|
||||
void arch__adjust_sym_map_offset(GElf_Sym *sym,
|
||||
GElf_Shdr *shdr __maybe_unused,
|
||||
struct map *map)
|
||||
{
|
||||
if (map->type == MAP__FUNCTION)
|
||||
sym->st_value += map->start;
|
||||
}
|
||||
#endif
|
||||
|
|
@ -20,7 +20,7 @@ _dummy := $(shell [ -d '$(out)' ] || mkdir -p '$(out)')
|
|||
$(header): $(sys)/syscall_64.tbl $(systbl)
|
||||
@(test -d ../../kernel -a -d ../../tools -a -d ../perf && ( \
|
||||
(diff -B arch/x86/entry/syscalls/syscall_64.tbl ../../arch/x86/entry/syscalls/syscall_64.tbl >/dev/null) \
|
||||
|| echo "Warning: x86_64's syscall_64.tbl differs from kernel" >&2 )) || true
|
||||
|| echo "Warning: Kernel ABI header at 'tools/arch/x86/entry/syscalls/syscall_64.tbl' differs from latest version at 'arch/x86/entry/syscalls/syscall_64.tbl'" >&2 )) || true
|
||||
$(Q)$(SHELL) '$(systbl)' $(sys)/syscall_64.tbl 'x86_64' > $@
|
||||
|
||||
clean::
|
||||
|
|
|
|||
|
|
@ -76,3 +76,49 @@ static struct ins x86__instructions[] = {
|
|||
{ .name = "xbeginq", .ops = &jump_ops, },
|
||||
{ .name = "retq", .ops = &ret_ops, },
|
||||
};
|
||||
|
||||
static bool x86__ins_is_fused(struct arch *arch, const char *ins1,
|
||||
const char *ins2)
|
||||
{
|
||||
if (arch->family != 6 || arch->model < 0x1e || strstr(ins2, "jmp"))
|
||||
return false;
|
||||
|
||||
if (arch->model == 0x1e) {
|
||||
/* Nehalem */
|
||||
if ((strstr(ins1, "cmp") && !strstr(ins1, "xchg")) ||
|
||||
strstr(ins1, "test")) {
|
||||
return true;
|
||||
}
|
||||
} else {
|
||||
/* Newer platform */
|
||||
if ((strstr(ins1, "cmp") && !strstr(ins1, "xchg")) ||
|
||||
strstr(ins1, "test") ||
|
||||
strstr(ins1, "add") ||
|
||||
strstr(ins1, "sub") ||
|
||||
strstr(ins1, "and") ||
|
||||
strstr(ins1, "inc") ||
|
||||
strstr(ins1, "dec")) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static int x86__cpuid_parse(struct arch *arch, char *cpuid)
|
||||
{
|
||||
unsigned int family, model, stepping;
|
||||
int ret;
|
||||
|
||||
/*
|
||||
* cpuid = "GenuineIntel,family,model,stepping"
|
||||
*/
|
||||
ret = sscanf(cpuid, "%*[^,],%u,%u,%u", &family, &model, &stepping);
|
||||
if (ret == 3) {
|
||||
arch->family = family;
|
||||
arch->model = model;
|
||||
return 0;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,14 @@
|
|||
#ifndef ARCH_TESTS_H
|
||||
#define ARCH_TESTS_H
|
||||
|
||||
#include <linux/compiler.h>
|
||||
struct test;
|
||||
|
||||
/* Tests */
|
||||
int test__rdpmc(int subtest);
|
||||
int test__perf_time_to_tsc(int subtest);
|
||||
int test__insn_x86(int subtest);
|
||||
int test__intel_cqm_count_nmi_context(int subtest);
|
||||
int test__rdpmc(struct test *test __maybe_unused, int subtest);
|
||||
int test__perf_time_to_tsc(struct test *test __maybe_unused, int subtest);
|
||||
int test__insn_x86(struct test *test __maybe_unused, int subtest);
|
||||
int test__intel_cqm_count_nmi_context(struct test *test __maybe_unused, int subtest);
|
||||
|
||||
#ifdef HAVE_DWARF_UNWIND_SUPPORT
|
||||
struct thread;
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ static int test_data_set(struct test_data *dat_set, int x86_64)
|
|||
* verbose (-v) option to see all the instructions and whether or not they
|
||||
* decoded successfuly.
|
||||
*/
|
||||
int test__insn_x86(int subtest __maybe_unused)
|
||||
int test__insn_x86(struct test *test __maybe_unused, int subtest __maybe_unused)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ static pid_t spawn(void)
|
|||
* the last read counter value to avoid triggering a WARN_ON_ONCE() in
|
||||
* smp_call_function_many() caused by sending IPIs from NMI context.
|
||||
*/
|
||||
int test__intel_cqm_count_nmi_context(int subtest __maybe_unused)
|
||||
int test__intel_cqm_count_nmi_context(struct test *test __maybe_unused, int subtest __maybe_unused)
|
||||
{
|
||||
struct perf_evlist *evlist = NULL;
|
||||
struct perf_evsel *evsel = NULL;
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
* %0 is returned, otherwise %-1 is returned. If TSC conversion is not
|
||||
* supported then then the test passes but " (not supported)" is printed.
|
||||
*/
|
||||
int test__perf_time_to_tsc(int subtest __maybe_unused)
|
||||
int test__perf_time_to_tsc(struct test *test __maybe_unused, int subtest __maybe_unused)
|
||||
{
|
||||
struct record_opts opts = {
|
||||
.mmap_pages = UINT_MAX,
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ out_close:
|
|||
return 0;
|
||||
}
|
||||
|
||||
int test__rdpmc(int subtest __maybe_unused)
|
||||
int test__rdpmc(struct test *test __maybe_unused, int subtest __maybe_unused)
|
||||
{
|
||||
int status = 0;
|
||||
int wret = 0;
|
||||
|
|
|
|||
|
|
@ -701,6 +701,7 @@ static int intel_pt_recording_options(struct auxtrace_record *itr,
|
|||
perf_evsel__set_sample_bit(switch_evsel, TID);
|
||||
perf_evsel__set_sample_bit(switch_evsel, TIME);
|
||||
perf_evsel__set_sample_bit(switch_evsel, CPU);
|
||||
perf_evsel__reset_sample_bit(switch_evsel, BRANCH_STACK);
|
||||
|
||||
opts->record_switch_events = false;
|
||||
ptr->have_sched_switch = 3;
|
||||
|
|
@ -752,6 +753,7 @@ static int intel_pt_recording_options(struct auxtrace_record *itr,
|
|||
tracking_evsel->attr.freq = 0;
|
||||
tracking_evsel->attr.sample_period = 1;
|
||||
|
||||
tracking_evsel->no_aux_samples = true;
|
||||
if (need_immediate)
|
||||
tracking_evsel->immediate = true;
|
||||
|
||||
|
|
@ -761,6 +763,7 @@ static int intel_pt_recording_options(struct auxtrace_record *itr,
|
|||
/* And the CPU for switch events */
|
||||
perf_evsel__set_sample_bit(tracking_evsel, CPU);
|
||||
}
|
||||
perf_evsel__reset_sample_bit(tracking_evsel, BRANCH_STACK);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -177,14 +177,11 @@ static int perf_evsel__add_sample(struct perf_evsel *evsel,
|
|||
*/
|
||||
process_branch_stack(sample->branch_stack, al, sample);
|
||||
|
||||
sample->period = 1;
|
||||
sample->weight = 1;
|
||||
|
||||
he = hists__add_entry(hists, al, NULL, NULL, NULL, sample, true);
|
||||
if (he == NULL)
|
||||
return -ENOMEM;
|
||||
|
||||
ret = hist_entry__inc_addr_samples(he, evsel->idx, al->addr);
|
||||
ret = hist_entry__inc_addr_samples(he, sample, evsel->idx, al->addr);
|
||||
hists__inc_nr_samples(hists, true);
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -397,6 +394,8 @@ int cmd_annotate(int argc, const char **argv)
|
|||
.namespaces = perf_event__process_namespaces,
|
||||
.attr = perf_event__process_attr,
|
||||
.build_id = perf_event__process_build_id,
|
||||
.tracing_data = perf_event__process_tracing_data,
|
||||
.feature = perf_event__process_feature,
|
||||
.ordered_events = true,
|
||||
.ordering_requires_timestamps = true,
|
||||
},
|
||||
|
|
@ -404,7 +403,7 @@ int cmd_annotate(int argc, const char **argv)
|
|||
struct perf_data_file file = {
|
||||
.mode = PERF_DATA_MODE_READ,
|
||||
};
|
||||
const struct option options[] = {
|
||||
struct option options[] = {
|
||||
OPT_STRING('i', "input", &input_name, "file",
|
||||
"input file name"),
|
||||
OPT_STRING('d', "dsos", &symbol_conf.dso_list_str, "dso[,dso...]",
|
||||
|
|
@ -446,13 +445,20 @@ int cmd_annotate(int argc, const char **argv)
|
|||
"Show event group information together"),
|
||||
OPT_BOOLEAN(0, "show-total-period", &symbol_conf.show_total_period,
|
||||
"Show a column with the sum of periods"),
|
||||
OPT_BOOLEAN('n', "show-nr-samples", &symbol_conf.show_nr_samples,
|
||||
"Show a column with the number of samples"),
|
||||
OPT_CALLBACK_DEFAULT(0, "stdio-color", NULL, "mode",
|
||||
"'always' (default), 'never' or 'auto' only applicable to --stdio mode",
|
||||
stdio__config_color, "always"),
|
||||
OPT_END()
|
||||
};
|
||||
int ret = hists__init();
|
||||
int ret;
|
||||
|
||||
set_option_flag(options, 0, "show-total-period", PARSE_OPT_EXCLUSIVE);
|
||||
set_option_flag(options, 0, "show-nr-samples", PARSE_OPT_EXCLUSIVE);
|
||||
|
||||
|
||||
ret = hists__init();
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
|
|
@ -468,6 +474,11 @@ int cmd_annotate(int argc, const char **argv)
|
|||
annotate.sym_hist_filter = argv[0];
|
||||
}
|
||||
|
||||
if (symbol_conf.show_nr_samples && annotate.use_gtk) {
|
||||
pr_err("--show-nr-samples is not available in --gtk mode at this time\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
if (quiet)
|
||||
perf_quiet_option();
|
||||
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@
|
|||
#include <unistd.h>
|
||||
#include "builtin.h"
|
||||
#include "perf.h"
|
||||
#include "namespaces.h"
|
||||
#include "util/cache.h"
|
||||
#include "util/debug.h"
|
||||
#include "util/header.h"
|
||||
|
|
@ -165,33 +166,41 @@ static int build_id_cache__add_kcore(const char *filename, bool force)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int build_id_cache__add_file(const char *filename)
|
||||
static int build_id_cache__add_file(const char *filename, struct nsinfo *nsi)
|
||||
{
|
||||
char sbuild_id[SBUILD_ID_SIZE];
|
||||
u8 build_id[BUILD_ID_SIZE];
|
||||
int err;
|
||||
struct nscookie nsc;
|
||||
|
||||
if (filename__read_build_id(filename, &build_id, sizeof(build_id)) < 0) {
|
||||
nsinfo__mountns_enter(nsi, &nsc);
|
||||
err = filename__read_build_id(filename, &build_id, sizeof(build_id));
|
||||
nsinfo__mountns_exit(&nsc);
|
||||
if (err < 0) {
|
||||
pr_debug("Couldn't read a build-id in %s\n", filename);
|
||||
return -1;
|
||||
}
|
||||
|
||||
build_id__sprintf(build_id, sizeof(build_id), sbuild_id);
|
||||
err = build_id_cache__add_s(sbuild_id, filename,
|
||||
err = build_id_cache__add_s(sbuild_id, filename, nsi,
|
||||
false, false);
|
||||
pr_debug("Adding %s %s: %s\n", sbuild_id, filename,
|
||||
err ? "FAIL" : "Ok");
|
||||
return err;
|
||||
}
|
||||
|
||||
static int build_id_cache__remove_file(const char *filename)
|
||||
static int build_id_cache__remove_file(const char *filename, struct nsinfo *nsi)
|
||||
{
|
||||
u8 build_id[BUILD_ID_SIZE];
|
||||
char sbuild_id[SBUILD_ID_SIZE];
|
||||
struct nscookie nsc;
|
||||
|
||||
int err;
|
||||
|
||||
if (filename__read_build_id(filename, &build_id, sizeof(build_id)) < 0) {
|
||||
nsinfo__mountns_enter(nsi, &nsc);
|
||||
err = filename__read_build_id(filename, &build_id, sizeof(build_id));
|
||||
nsinfo__mountns_exit(&nsc);
|
||||
if (err < 0) {
|
||||
pr_debug("Couldn't read a build-id in %s\n", filename);
|
||||
return -1;
|
||||
}
|
||||
|
|
@ -204,13 +213,13 @@ static int build_id_cache__remove_file(const char *filename)
|
|||
return err;
|
||||
}
|
||||
|
||||
static int build_id_cache__purge_path(const char *pathname)
|
||||
static int build_id_cache__purge_path(const char *pathname, struct nsinfo *nsi)
|
||||
{
|
||||
struct strlist *list;
|
||||
struct str_node *pos;
|
||||
int err;
|
||||
|
||||
err = build_id_cache__list_build_ids(pathname, &list);
|
||||
err = build_id_cache__list_build_ids(pathname, nsi, &list);
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
|
|
@ -234,7 +243,7 @@ static bool dso__missing_buildid_cache(struct dso *dso, int parm __maybe_unused)
|
|||
char filename[PATH_MAX];
|
||||
u8 build_id[BUILD_ID_SIZE];
|
||||
|
||||
if (dso__build_id_filename(dso, filename, sizeof(filename)) &&
|
||||
if (dso__build_id_filename(dso, filename, sizeof(filename), false) &&
|
||||
filename__read_build_id(filename, build_id,
|
||||
sizeof(build_id)) != sizeof(build_id)) {
|
||||
if (errno == ENOENT)
|
||||
|
|
@ -256,24 +265,30 @@ static int build_id_cache__fprintf_missing(struct perf_session *session, FILE *f
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int build_id_cache__update_file(const char *filename)
|
||||
static int build_id_cache__update_file(const char *filename, struct nsinfo *nsi)
|
||||
{
|
||||
u8 build_id[BUILD_ID_SIZE];
|
||||
char sbuild_id[SBUILD_ID_SIZE];
|
||||
struct nscookie nsc;
|
||||
|
||||
int err = 0;
|
||||
int err;
|
||||
|
||||
if (filename__read_build_id(filename, &build_id, sizeof(build_id)) < 0) {
|
||||
nsinfo__mountns_enter(nsi, &nsc);
|
||||
err = filename__read_build_id(filename, &build_id, sizeof(build_id));
|
||||
nsinfo__mountns_exit(&nsc);
|
||||
if (err < 0) {
|
||||
pr_debug("Couldn't read a build-id in %s\n", filename);
|
||||
return -1;
|
||||
}
|
||||
err = 0;
|
||||
|
||||
build_id__sprintf(build_id, sizeof(build_id), sbuild_id);
|
||||
if (build_id_cache__cached(sbuild_id))
|
||||
err = build_id_cache__remove_s(sbuild_id);
|
||||
|
||||
if (!err)
|
||||
err = build_id_cache__add_s(sbuild_id, filename, false, false);
|
||||
err = build_id_cache__add_s(sbuild_id, filename, nsi, false,
|
||||
false);
|
||||
|
||||
pr_debug("Updating %s %s: %s\n", sbuild_id, filename,
|
||||
err ? "FAIL" : "Ok");
|
||||
|
|
@ -286,6 +301,7 @@ int cmd_buildid_cache(int argc, const char **argv)
|
|||
struct strlist *list;
|
||||
struct str_node *pos;
|
||||
int ret = 0;
|
||||
int ns_id = -1;
|
||||
bool force = false;
|
||||
char const *add_name_list_str = NULL,
|
||||
*remove_name_list_str = NULL,
|
||||
|
|
@ -299,6 +315,7 @@ int cmd_buildid_cache(int argc, const char **argv)
|
|||
.mode = PERF_DATA_MODE_READ,
|
||||
};
|
||||
struct perf_session *session = NULL;
|
||||
struct nsinfo *nsi = NULL;
|
||||
|
||||
const struct option buildid_cache_options[] = {
|
||||
OPT_STRING('a', "add", &add_name_list_str,
|
||||
|
|
@ -315,6 +332,7 @@ int cmd_buildid_cache(int argc, const char **argv)
|
|||
OPT_STRING('u', "update", &update_name_list_str, "file list",
|
||||
"file(s) to update"),
|
||||
OPT_INCR('v', "verbose", &verbose, "be more verbose"),
|
||||
OPT_INTEGER(0, "target-ns", &ns_id, "target pid for namespace context"),
|
||||
OPT_END()
|
||||
};
|
||||
const char * const buildid_cache_usage[] = {
|
||||
|
|
@ -330,6 +348,9 @@ int cmd_buildid_cache(int argc, const char **argv)
|
|||
!missing_filename && !update_name_list_str))
|
||||
usage_with_options(buildid_cache_usage, buildid_cache_options);
|
||||
|
||||
if (ns_id > 0)
|
||||
nsi = nsinfo__new(ns_id);
|
||||
|
||||
if (missing_filename) {
|
||||
file.path = missing_filename;
|
||||
file.force = force;
|
||||
|
|
@ -348,7 +369,7 @@ int cmd_buildid_cache(int argc, const char **argv)
|
|||
list = strlist__new(add_name_list_str, NULL);
|
||||
if (list) {
|
||||
strlist__for_each_entry(pos, list)
|
||||
if (build_id_cache__add_file(pos->s)) {
|
||||
if (build_id_cache__add_file(pos->s, nsi)) {
|
||||
if (errno == EEXIST) {
|
||||
pr_debug("%s already in the cache\n",
|
||||
pos->s);
|
||||
|
|
@ -366,7 +387,7 @@ int cmd_buildid_cache(int argc, const char **argv)
|
|||
list = strlist__new(remove_name_list_str, NULL);
|
||||
if (list) {
|
||||
strlist__for_each_entry(pos, list)
|
||||
if (build_id_cache__remove_file(pos->s)) {
|
||||
if (build_id_cache__remove_file(pos->s, nsi)) {
|
||||
if (errno == ENOENT) {
|
||||
pr_debug("%s wasn't in the cache\n",
|
||||
pos->s);
|
||||
|
|
@ -384,7 +405,7 @@ int cmd_buildid_cache(int argc, const char **argv)
|
|||
list = strlist__new(purge_name_list_str, NULL);
|
||||
if (list) {
|
||||
strlist__for_each_entry(pos, list)
|
||||
if (build_id_cache__purge_path(pos->s)) {
|
||||
if (build_id_cache__purge_path(pos->s, nsi)) {
|
||||
if (errno == ENOENT) {
|
||||
pr_debug("%s wasn't in the cache\n",
|
||||
pos->s);
|
||||
|
|
@ -405,7 +426,7 @@ int cmd_buildid_cache(int argc, const char **argv)
|
|||
list = strlist__new(update_name_list_str, NULL);
|
||||
if (list) {
|
||||
strlist__for_each_entry(pos, list)
|
||||
if (build_id_cache__update_file(pos->s)) {
|
||||
if (build_id_cache__update_file(pos->s, nsi)) {
|
||||
if (errno == ENOENT) {
|
||||
pr_debug("%s wasn't in the cache\n",
|
||||
pos->s);
|
||||
|
|
@ -424,6 +445,7 @@ int cmd_buildid_cache(int argc, const char **argv)
|
|||
|
||||
out:
|
||||
perf_session__delete(session);
|
||||
nsinfo__zput(nsi);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@
|
|||
#include "util/util.h"
|
||||
#include "util/debug.h"
|
||||
#include "util/config.h"
|
||||
#include <linux/string.h>
|
||||
|
||||
static bool use_system_config, use_user_config;
|
||||
|
||||
|
|
@ -79,7 +80,7 @@ static int show_spec_config(struct perf_config_set *set, const char *var)
|
|||
return -1;
|
||||
|
||||
perf_config_items__for_each_entry(&set->sections, section) {
|
||||
if (prefixcmp(var, section->name) != 0)
|
||||
if (!strstarts(var, section->name))
|
||||
continue;
|
||||
|
||||
perf_config_items__for_each_entry(§ion->items, item) {
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ static int cmd_data_convert(int argc, const char **argv)
|
|||
};
|
||||
|
||||
#ifndef HAVE_LIBBABELTRACE_SUPPORT
|
||||
pr_err("No conversion support compiled in.\n");
|
||||
pr_err("No conversion support compiled in. perf should be compiled with environment variables LIBBABELTRACE=1 and LIBBABELTRACE_DIR=/path/to/libbabeltrace/\n");
|
||||
return -1;
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -381,7 +381,7 @@ static int perf_ftrace_config(const char *var, const char *value, void *cb)
|
|||
{
|
||||
struct perf_ftrace *ftrace = cb;
|
||||
|
||||
if (prefixcmp(var, "ftrace."))
|
||||
if (!strstarts(var, "ftrace."))
|
||||
return 0;
|
||||
|
||||
if (strcmp(var, "ftrace.tracer"))
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ static int check_emacsclient_version(void)
|
|||
*/
|
||||
finish_command(&ec_process);
|
||||
|
||||
if (prefixcmp(buffer.buf, "emacsclient")) {
|
||||
if (!strstarts(buffer.buf, "emacsclient")) {
|
||||
fprintf(stderr, "Failed to parse emacsclient version.\n");
|
||||
goto out;
|
||||
}
|
||||
|
|
@ -283,7 +283,7 @@ static int perf_help_config(const char *var, const char *value, void *cb)
|
|||
add_man_viewer(value);
|
||||
return 0;
|
||||
}
|
||||
if (!prefixcmp(var, "man."))
|
||||
if (!strstarts(var, "man."))
|
||||
return add_man_viewer_info(var, value);
|
||||
|
||||
return 0;
|
||||
|
|
@ -313,7 +313,7 @@ static const char *cmd_to_page(const char *perf_cmd)
|
|||
|
||||
if (!perf_cmd)
|
||||
return "perf";
|
||||
else if (!prefixcmp(perf_cmd, "perf"))
|
||||
else if (!strstarts(perf_cmd, "perf"))
|
||||
return perf_cmd;
|
||||
|
||||
return asprintf(&s, "perf-%s", perf_cmd) < 0 ? NULL : s;
|
||||
|
|
|
|||
|
|
@ -770,6 +770,7 @@ int cmd_inject(int argc, const char **argv)
|
|||
.finished_round = perf_event__repipe_oe_synth,
|
||||
.build_id = perf_event__repipe_op2_synth,
|
||||
.id_index = perf_event__repipe_op2_synth,
|
||||
.feature = perf_event__repipe_op2_synth,
|
||||
},
|
||||
.input_name = "-",
|
||||
.samples = LIST_HEAD_INIT(inject.samples),
|
||||
|
|
|
|||
|
|
@ -58,6 +58,7 @@ static struct {
|
|||
struct line_range line_range;
|
||||
char *target;
|
||||
struct strfilter *filter;
|
||||
struct nsinfo *nsi;
|
||||
} params;
|
||||
|
||||
/* Parse an event definition. Note that any error must die. */
|
||||
|
|
@ -80,6 +81,9 @@ static int parse_probe_event(const char *str)
|
|||
params.target_used = true;
|
||||
}
|
||||
|
||||
if (params.nsi)
|
||||
pev->nsi = nsinfo__get(params.nsi);
|
||||
|
||||
/* Parse a perf-probe command into event */
|
||||
ret = parse_perf_probe_command(str, pev);
|
||||
pr_debug("%d arguments\n", pev->nargs);
|
||||
|
|
@ -189,7 +193,7 @@ static int opt_set_target(const struct option *opt, const char *str,
|
|||
|
||||
/* Expand given path to absolute path, except for modulename */
|
||||
if (params.uprobes || strchr(str, '/')) {
|
||||
tmp = realpath(str, NULL);
|
||||
tmp = nsinfo__realpath(str, params.nsi);
|
||||
if (!tmp) {
|
||||
pr_warning("Failed to get the absolute path of %s: %m\n", str);
|
||||
return ret;
|
||||
|
|
@ -208,6 +212,34 @@ static int opt_set_target(const struct option *opt, const char *str,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static int opt_set_target_ns(const struct option *opt __maybe_unused,
|
||||
const char *str, int unset __maybe_unused)
|
||||
{
|
||||
int ret = -ENOENT;
|
||||
pid_t ns_pid;
|
||||
struct nsinfo *nsip;
|
||||
|
||||
if (str) {
|
||||
errno = 0;
|
||||
ns_pid = (pid_t)strtol(str, NULL, 10);
|
||||
if (errno != 0) {
|
||||
ret = -errno;
|
||||
pr_warning("Failed to parse %s as a pid: %s\n", str,
|
||||
strerror(errno));
|
||||
return ret;
|
||||
}
|
||||
nsip = nsinfo__new(ns_pid);
|
||||
if (nsip && nsip->need_setns)
|
||||
params.nsi = nsinfo__get(nsip);
|
||||
nsinfo__put(nsip);
|
||||
|
||||
ret = 0;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
/* Command option callbacks */
|
||||
|
||||
#ifdef HAVE_DWARF_SUPPORT
|
||||
|
|
@ -299,6 +331,7 @@ static void cleanup_params(void)
|
|||
line_range__clear(¶ms.line_range);
|
||||
free(params.target);
|
||||
strfilter__delete(params.filter);
|
||||
nsinfo__put(params.nsi);
|
||||
memset(¶ms, 0, sizeof(params));
|
||||
}
|
||||
|
||||
|
|
@ -383,7 +416,7 @@ static int del_perf_probe_caches(struct strfilter *filter)
|
|||
}
|
||||
|
||||
strlist__for_each_entry(nd, bidlist) {
|
||||
cache = probe_cache__new(nd->s);
|
||||
cache = probe_cache__new(nd->s, NULL);
|
||||
if (!cache)
|
||||
continue;
|
||||
if (probe_cache__filter_purge(cache, filter) < 0 ||
|
||||
|
|
@ -554,6 +587,8 @@ __cmd_probe(int argc, const char **argv)
|
|||
OPT_BOOLEAN(0, "cache", &probe_conf.cache, "Manipulate probe cache"),
|
||||
OPT_STRING(0, "symfs", &symbol_conf.symfs, "directory",
|
||||
"Look for files with symbols relative to this directory"),
|
||||
OPT_CALLBACK(0, "target-ns", NULL, "pid",
|
||||
"target pid for namespace contexts", opt_set_target_ns),
|
||||
OPT_END()
|
||||
};
|
||||
int ret;
|
||||
|
|
@ -634,15 +669,15 @@ __cmd_probe(int argc, const char **argv)
|
|||
pr_err_with_code(" Error: Failed to show event list.", ret);
|
||||
return ret;
|
||||
case 'F':
|
||||
ret = show_available_funcs(params.target, params.filter,
|
||||
params.uprobes);
|
||||
ret = show_available_funcs(params.target, params.nsi,
|
||||
params.filter, params.uprobes);
|
||||
if (ret < 0)
|
||||
pr_err_with_code(" Error: Failed to show functions.", ret);
|
||||
return ret;
|
||||
#ifdef HAVE_DWARF_SUPPORT
|
||||
case 'L':
|
||||
ret = show_line_range(¶ms.line_range, params.target,
|
||||
params.uprobes);
|
||||
params.nsi, params.uprobes);
|
||||
if (ret < 0)
|
||||
pr_err_with_code(" Error: Failed to show lines.", ret);
|
||||
return ret;
|
||||
|
|
|
|||
|
|
@ -799,6 +799,13 @@ static int record__synthesize(struct record *rec, bool tail)
|
|||
return 0;
|
||||
|
||||
if (file->is_pipe) {
|
||||
err = perf_event__synthesize_features(
|
||||
tool, session, rec->evlist, process_synthesized_event);
|
||||
if (err < 0) {
|
||||
pr_err("Couldn't synthesize features.\n");
|
||||
return err;
|
||||
}
|
||||
|
||||
err = perf_event__synthesize_attrs(tool, session,
|
||||
process_synthesized_event);
|
||||
if (err < 0) {
|
||||
|
|
@ -1821,7 +1828,7 @@ int cmd_record(int argc, const char **argv)
|
|||
record.opts.tail_synthesize = true;
|
||||
|
||||
if (rec->evlist->nr_entries == 0 &&
|
||||
perf_evlist__add_default(rec->evlist) < 0) {
|
||||
__perf_evlist__add_default(rec->evlist, !record.opts.no_samples) < 0) {
|
||||
pr_err("Not enough memory for event selector list\n");
|
||||
goto out;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@
|
|||
#include "util/time-utils.h"
|
||||
#include "util/auxtrace.h"
|
||||
#include "util/units.h"
|
||||
#include "util/branch.h"
|
||||
|
||||
#include <dlfcn.h>
|
||||
#include <errno.h>
|
||||
|
|
@ -73,6 +74,7 @@ struct report {
|
|||
u64 queue_size;
|
||||
int socket_filter;
|
||||
DECLARE_BITMAP(cpu_bitmap, MAX_NR_CPUS);
|
||||
struct branch_type_stat brtype_stat;
|
||||
};
|
||||
|
||||
static int report__config(const char *var, const char *value, void *cb)
|
||||
|
|
@ -113,43 +115,60 @@ static int hist_iter__report_callback(struct hist_entry_iter *iter,
|
|||
struct report *rep = arg;
|
||||
struct hist_entry *he = iter->he;
|
||||
struct perf_evsel *evsel = iter->evsel;
|
||||
struct perf_sample *sample = iter->sample;
|
||||
struct mem_info *mi;
|
||||
struct branch_info *bi;
|
||||
|
||||
if (!ui__has_annotation())
|
||||
return 0;
|
||||
|
||||
hist__account_cycles(iter->sample->branch_stack, al, iter->sample,
|
||||
hist__account_cycles(sample->branch_stack, al, sample,
|
||||
rep->nonany_branch_mode);
|
||||
|
||||
if (sort__mode == SORT_MODE__BRANCH) {
|
||||
bi = he->branch_info;
|
||||
err = addr_map_symbol__inc_samples(&bi->from, evsel->idx);
|
||||
err = addr_map_symbol__inc_samples(&bi->from, sample, evsel->idx);
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
err = addr_map_symbol__inc_samples(&bi->to, evsel->idx);
|
||||
err = addr_map_symbol__inc_samples(&bi->to, sample, evsel->idx);
|
||||
|
||||
} else if (rep->mem_mode) {
|
||||
mi = he->mem_info;
|
||||
err = addr_map_symbol__inc_samples(&mi->daddr, evsel->idx);
|
||||
err = addr_map_symbol__inc_samples(&mi->daddr, sample, evsel->idx);
|
||||
if (err)
|
||||
goto out;
|
||||
|
||||
err = hist_entry__inc_addr_samples(he, evsel->idx, al->addr);
|
||||
err = hist_entry__inc_addr_samples(he, sample, evsel->idx, al->addr);
|
||||
|
||||
} else if (symbol_conf.cumulate_callchain) {
|
||||
if (single)
|
||||
err = hist_entry__inc_addr_samples(he, evsel->idx,
|
||||
err = hist_entry__inc_addr_samples(he, sample, evsel->idx,
|
||||
al->addr);
|
||||
} else {
|
||||
err = hist_entry__inc_addr_samples(he, evsel->idx, al->addr);
|
||||
err = hist_entry__inc_addr_samples(he, sample, evsel->idx, al->addr);
|
||||
}
|
||||
|
||||
out:
|
||||
return err;
|
||||
}
|
||||
|
||||
static int hist_iter__branch_callback(struct hist_entry_iter *iter,
|
||||
struct addr_location *al __maybe_unused,
|
||||
bool single __maybe_unused,
|
||||
void *arg)
|
||||
{
|
||||
struct hist_entry *he = iter->he;
|
||||
struct report *rep = arg;
|
||||
struct branch_info *bi;
|
||||
|
||||
bi = he->branch_info;
|
||||
branch_type_count(&rep->brtype_stat, &bi->flags,
|
||||
bi->from.addr, bi->to.addr);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int process_sample_event(struct perf_tool *tool,
|
||||
union perf_event *event,
|
||||
struct perf_sample *sample,
|
||||
|
|
@ -188,6 +207,8 @@ static int process_sample_event(struct perf_tool *tool,
|
|||
*/
|
||||
if (!sample->branch_stack)
|
||||
goto out_put;
|
||||
|
||||
iter.add_entry_cb = hist_iter__branch_callback;
|
||||
iter.ops = &hist_iter_branch;
|
||||
} else if (rep->mem_mode) {
|
||||
iter.ops = &hist_iter_mem;
|
||||
|
|
@ -220,7 +241,7 @@ static int process_read_event(struct perf_tool *tool,
|
|||
const char *name = evsel ? perf_evsel__name(evsel) : "unknown";
|
||||
int err = perf_read_values_add_value(&rep->show_threads_values,
|
||||
event->read.pid, event->read.tid,
|
||||
event->read.id,
|
||||
evsel->idx,
|
||||
name,
|
||||
event->read.value);
|
||||
|
||||
|
|
@ -228,10 +249,6 @@ static int process_read_event(struct perf_tool *tool,
|
|||
return err;
|
||||
}
|
||||
|
||||
dump_printf(": %d %d %s %" PRIu64 "\n", event->read.pid, event->read.tid,
|
||||
evsel ? perf_evsel__name(evsel) : "FAIL",
|
||||
event->read.value);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -258,10 +275,11 @@ static int report__setup_sample_type(struct report *rep)
|
|||
"'perf record' without -g?\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
if (symbol_conf.use_callchain) {
|
||||
ui__error("Selected -g or --branch-history but no "
|
||||
"callchain data. Did\n"
|
||||
"you call 'perf record' without -g?\n");
|
||||
if (symbol_conf.use_callchain &&
|
||||
!symbol_conf.show_branchflag_count) {
|
||||
ui__error("Selected -g or --branch-history.\n"
|
||||
"But no callchain or branch data.\n"
|
||||
"Did you call 'perf record' without -g or -b?\n");
|
||||
return -1;
|
||||
}
|
||||
} else if (!callchain_param.enabled &&
|
||||
|
|
@ -396,7 +414,8 @@ static int perf_evlist__tty_browse_hists(struct perf_evlist *evlist,
|
|||
|
||||
hists__fprintf_nr_sample_events(hists, rep, evname, stdout);
|
||||
hists__fprintf(hists, !quiet, 0, 0, rep->min_percent, stdout,
|
||||
symbol_conf.use_callchain);
|
||||
symbol_conf.use_callchain ||
|
||||
symbol_conf.show_branchflag_count);
|
||||
fprintf(stdout, "\n\n");
|
||||
}
|
||||
|
||||
|
|
@ -410,6 +429,9 @@ static int perf_evlist__tty_browse_hists(struct perf_evlist *evlist,
|
|||
perf_read_values_destroy(&rep->show_threads_values);
|
||||
}
|
||||
|
||||
if (sort__mode == SORT_MODE__BRANCH)
|
||||
branch_type_stat_display(stdout, &rep->brtype_stat);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
@ -718,6 +740,7 @@ int cmd_report(int argc, const char **argv)
|
|||
.id_index = perf_event__process_id_index,
|
||||
.auxtrace_info = perf_event__process_auxtrace_info,
|
||||
.auxtrace = perf_event__process_auxtrace,
|
||||
.feature = perf_event__process_feature,
|
||||
.ordered_events = true,
|
||||
.ordering_requires_timestamps = true,
|
||||
},
|
||||
|
|
@ -943,6 +966,8 @@ repeat:
|
|||
if (has_br_stack && branch_call_mode)
|
||||
symbol_conf.show_branchflag_count = true;
|
||||
|
||||
memset(&report.brtype_stat, 0, sizeof(struct branch_type_stat));
|
||||
|
||||
/*
|
||||
* Branch mode is a tristate:
|
||||
* -1 means default, so decide based on the file having branch data.
|
||||
|
|
@ -988,6 +1013,10 @@ repeat:
|
|||
/* Force tty output for header output and per-thread stat. */
|
||||
if (report.header || report.header_only || report.show_threads)
|
||||
use_browser = 0;
|
||||
if (report.header || report.header_only)
|
||||
report.tool.show_feat_hdr = SHOW_FEAT_HEADER;
|
||||
if (report.show_full_info)
|
||||
report.tool.show_feat_hdr = SHOW_FEAT_HEADER_FULL_INFO;
|
||||
|
||||
if (strcmp(input_name, "-") != 0)
|
||||
setup_browser(true);
|
||||
|
|
|
|||
|
|
@ -2199,16 +2199,11 @@ static struct script_desc *script_desc__findnew(const char *name)
|
|||
|
||||
s = script_desc__new(name);
|
||||
if (!s)
|
||||
goto out_delete_desc;
|
||||
return NULL;
|
||||
|
||||
script_desc__add(s);
|
||||
|
||||
return s;
|
||||
|
||||
out_delete_desc:
|
||||
script_desc__delete(s);
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static const char *ends_with(const char *str, const char *suffix)
|
||||
|
|
@ -2682,6 +2677,7 @@ int cmd_script(int argc, const char **argv)
|
|||
.attr = process_attr,
|
||||
.event_update = perf_event__process_event_update,
|
||||
.tracing_data = perf_event__process_tracing_data,
|
||||
.feature = perf_event__process_feature,
|
||||
.build_id = perf_event__process_build_id,
|
||||
.id_index = perf_event__process_id_index,
|
||||
.auxtrace_info = perf_event__process_auxtrace_info,
|
||||
|
|
@ -2972,10 +2968,13 @@ int cmd_script(int argc, const char **argv)
|
|||
return -1;
|
||||
|
||||
if (header || header_only) {
|
||||
script.tool.show_feat_hdr = SHOW_FEAT_HEADER;
|
||||
perf_session__fprintf_info(session, stdout, show_full_info);
|
||||
if (header_only)
|
||||
goto out_delete;
|
||||
}
|
||||
if (show_full_info)
|
||||
script.tool.show_feat_hdr = SHOW_FEAT_HEADER_FULL_INFO;
|
||||
|
||||
if (symbol__init(&session->header.env) < 0)
|
||||
goto out_delete;
|
||||
|
|
|
|||
|
|
@ -213,10 +213,20 @@ static void perf_stat__reset_stats(void)
|
|||
static int create_perf_stat_counter(struct perf_evsel *evsel)
|
||||
{
|
||||
struct perf_event_attr *attr = &evsel->attr;
|
||||
struct perf_evsel *leader = evsel->leader;
|
||||
|
||||
if (stat_config.scale)
|
||||
if (stat_config.scale) {
|
||||
attr->read_format = PERF_FORMAT_TOTAL_TIME_ENABLED |
|
||||
PERF_FORMAT_TOTAL_TIME_RUNNING;
|
||||
}
|
||||
|
||||
/*
|
||||
* The event is part of non trivial group, let's enable
|
||||
* the group read (for leader) and ID retrieval for all
|
||||
* members.
|
||||
*/
|
||||
if (leader->nr_members > 1)
|
||||
attr->read_format |= PERF_FORMAT_ID|PERF_FORMAT_GROUP;
|
||||
|
||||
attr->inherit = !no_inherit;
|
||||
|
||||
|
|
@ -333,13 +343,21 @@ static int read_counter(struct perf_evsel *counter)
|
|||
struct perf_counts_values *count;
|
||||
|
||||
count = perf_counts(counter->counts, cpu, thread);
|
||||
if (perf_evsel__read(counter, cpu, thread, count)) {
|
||||
|
||||
/*
|
||||
* The leader's group read loads data into its group members
|
||||
* (via perf_evsel__read_counter) and sets threir count->loaded.
|
||||
*/
|
||||
if (!count->loaded &&
|
||||
perf_evsel__read_counter(counter, cpu, thread)) {
|
||||
counter->counts->scaled = -1;
|
||||
perf_counts(counter->counts, cpu, thread)->ena = 0;
|
||||
perf_counts(counter->counts, cpu, thread)->run = 0;
|
||||
return -1;
|
||||
}
|
||||
|
||||
count->loaded = false;
|
||||
|
||||
if (STAT_RECORD) {
|
||||
if (perf_evsel__write_stat_event(counter, cpu, thread, count)) {
|
||||
pr_err("failed to write stat event\n");
|
||||
|
|
@ -559,6 +577,11 @@ static int store_counter_ids(struct perf_evsel *counter)
|
|||
return __store_counter_ids(counter, cpus, threads);
|
||||
}
|
||||
|
||||
static bool perf_evsel__should_store_id(struct perf_evsel *counter)
|
||||
{
|
||||
return STAT_RECORD || counter->attr.read_format & PERF_FORMAT_ID;
|
||||
}
|
||||
|
||||
static int __run_perf_stat(int argc, const char **argv)
|
||||
{
|
||||
int interval = stat_config.interval;
|
||||
|
|
@ -631,7 +654,8 @@ try_again:
|
|||
if (l > unit_width)
|
||||
unit_width = l;
|
||||
|
||||
if (STAT_RECORD && store_counter_ids(counter))
|
||||
if (perf_evsel__should_store_id(counter) &&
|
||||
store_counter_ids(counter))
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ static int perf_top__parse_source(struct perf_top *top, struct hist_entry *he)
|
|||
return err;
|
||||
}
|
||||
|
||||
err = symbol__disassemble(sym, map, NULL, 0, NULL);
|
||||
err = symbol__disassemble(sym, map, NULL, 0, NULL, NULL);
|
||||
if (err == 0) {
|
||||
out_assign:
|
||||
top->sym_filter_entry = he;
|
||||
|
|
@ -183,6 +183,7 @@ static void ui__warn_map_erange(struct map *map, struct symbol *sym, u64 ip)
|
|||
|
||||
static void perf_top__record_precise_ip(struct perf_top *top,
|
||||
struct hist_entry *he,
|
||||
struct perf_sample *sample,
|
||||
int counter, u64 ip)
|
||||
{
|
||||
struct annotation *notes;
|
||||
|
|
@ -199,7 +200,7 @@ static void perf_top__record_precise_ip(struct perf_top *top,
|
|||
if (pthread_mutex_trylock(¬es->lock))
|
||||
return;
|
||||
|
||||
err = hist_entry__inc_addr_samples(he, counter, ip);
|
||||
err = hist_entry__inc_addr_samples(he, sample, counter, ip);
|
||||
|
||||
pthread_mutex_unlock(¬es->lock);
|
||||
|
||||
|
|
@ -586,6 +587,13 @@ static void *display_thread_tui(void *arg)
|
|||
.refresh = top->delay_secs,
|
||||
};
|
||||
|
||||
/* In order to read symbols from other namespaces perf to needs to call
|
||||
* setns(2). This isn't permitted if the struct_fs has multiple users.
|
||||
* unshare(2) the fs so that we may continue to setns into namespaces
|
||||
* that we're observing.
|
||||
*/
|
||||
unshare(CLONE_FS);
|
||||
|
||||
perf_top__sort_new_samples(top);
|
||||
|
||||
/*
|
||||
|
|
@ -627,6 +635,13 @@ static void *display_thread(void *arg)
|
|||
struct perf_top *top = arg;
|
||||
int delay_msecs, c;
|
||||
|
||||
/* In order to read symbols from other namespaces perf to needs to call
|
||||
* setns(2). This isn't permitted if the struct_fs has multiple users.
|
||||
* unshare(2) the fs so that we may continue to setns into namespaces
|
||||
* that we're observing.
|
||||
*/
|
||||
unshare(CLONE_FS);
|
||||
|
||||
display_setup_sig();
|
||||
pthread__unblock_sigwinch();
|
||||
repeat:
|
||||
|
|
@ -671,7 +686,7 @@ static int hist_iter__top_callback(struct hist_entry_iter *iter,
|
|||
struct perf_evsel *evsel = iter->evsel;
|
||||
|
||||
if (perf_hpp_list.sym && single)
|
||||
perf_top__record_precise_ip(top, he, evsel->idx, al->addr);
|
||||
perf_top__record_precise_ip(top, he, iter->sample, evsel->idx, al->addr);
|
||||
|
||||
hist__account_cycles(iter->sample->branch_stack, al, iter->sample,
|
||||
!(top->record_opts.branch_stack & PERF_SAMPLE_BRANCH_ANY));
|
||||
|
|
@ -1205,6 +1220,7 @@ int cmd_top(int argc, const char **argv)
|
|||
"Show raw trace event output (do not use print fmt or plugins)"),
|
||||
OPT_BOOLEAN(0, "hierarchy", &symbol_conf.report_hierarchy,
|
||||
"Show entries in a hierarchy"),
|
||||
OPT_BOOLEAN(0, "force", &symbol_conf.force, "don't complain, do it"),
|
||||
OPT_END()
|
||||
};
|
||||
const char * const top_usage[] = {
|
||||
|
|
|
|||
|
|
@ -64,6 +64,10 @@
|
|||
# define O_CLOEXEC 02000000
|
||||
#endif
|
||||
|
||||
#ifndef F_LINUX_SPECIFIC_BASE
|
||||
# define F_LINUX_SPECIFIC_BASE 1024
|
||||
#endif
|
||||
|
||||
struct trace {
|
||||
struct perf_tool tool;
|
||||
struct syscalltbl *sctbl;
|
||||
|
|
@ -279,34 +283,21 @@ out_delete:
|
|||
({ struct syscall_tp *fields = evsel->priv; \
|
||||
fields->name.pointer(&fields->name, sample); })
|
||||
|
||||
struct strarray {
|
||||
int offset;
|
||||
int nr_entries;
|
||||
const char **entries;
|
||||
};
|
||||
size_t strarray__scnprintf(struct strarray *sa, char *bf, size_t size, const char *intfmt, int val)
|
||||
{
|
||||
int idx = val - sa->offset;
|
||||
|
||||
#define DEFINE_STRARRAY(array) struct strarray strarray__##array = { \
|
||||
.nr_entries = ARRAY_SIZE(array), \
|
||||
.entries = array, \
|
||||
}
|
||||
if (idx < 0 || idx >= sa->nr_entries)
|
||||
return scnprintf(bf, size, intfmt, val);
|
||||
|
||||
#define DEFINE_STRARRAY_OFFSET(array, off) struct strarray strarray__##array = { \
|
||||
.offset = off, \
|
||||
.nr_entries = ARRAY_SIZE(array), \
|
||||
.entries = array, \
|
||||
return scnprintf(bf, size, "%s", sa->entries[idx]);
|
||||
}
|
||||
|
||||
static size_t __syscall_arg__scnprintf_strarray(char *bf, size_t size,
|
||||
const char *intfmt,
|
||||
struct syscall_arg *arg)
|
||||
{
|
||||
struct strarray *sa = arg->parm;
|
||||
int idx = arg->val - sa->offset;
|
||||
|
||||
if (idx < 0 || idx >= sa->nr_entries)
|
||||
return scnprintf(bf, size, intfmt, arg->val);
|
||||
|
||||
return scnprintf(bf, size, "%s", sa->entries[idx]);
|
||||
return strarray__scnprintf(arg->parm, bf, size, intfmt, arg->val);
|
||||
}
|
||||
|
||||
static size_t syscall_arg__scnprintf_strarray(char *bf, size_t size,
|
||||
|
|
@ -317,24 +308,35 @@ static size_t syscall_arg__scnprintf_strarray(char *bf, size_t size,
|
|||
|
||||
#define SCA_STRARRAY syscall_arg__scnprintf_strarray
|
||||
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
/*
|
||||
* FIXME: Make this available to all arches as soon as the ioctl beautifier
|
||||
* gets rewritten to support all arches.
|
||||
*/
|
||||
static size_t syscall_arg__scnprintf_strhexarray(char *bf, size_t size,
|
||||
struct syscall_arg *arg)
|
||||
{
|
||||
return __syscall_arg__scnprintf_strarray(bf, size, "%#x", arg);
|
||||
struct strarrays {
|
||||
int nr_entries;
|
||||
struct strarray **entries;
|
||||
};
|
||||
|
||||
#define DEFINE_STRARRAYS(array) struct strarrays strarrays__##array = { \
|
||||
.nr_entries = ARRAY_SIZE(array), \
|
||||
.entries = array, \
|
||||
}
|
||||
|
||||
#define SCA_STRHEXARRAY syscall_arg__scnprintf_strhexarray
|
||||
#endif /* defined(__i386__) || defined(__x86_64__) */
|
||||
size_t syscall_arg__scnprintf_strarrays(char *bf, size_t size,
|
||||
struct syscall_arg *arg)
|
||||
{
|
||||
struct strarrays *sas = arg->parm;
|
||||
int i;
|
||||
|
||||
static size_t syscall_arg__scnprintf_fd(char *bf, size_t size,
|
||||
struct syscall_arg *arg);
|
||||
for (i = 0; i < sas->nr_entries; ++i) {
|
||||
struct strarray *sa = sas->entries[i];
|
||||
int idx = arg->val - sa->offset;
|
||||
|
||||
#define SCA_FD syscall_arg__scnprintf_fd
|
||||
if (idx >= 0 && idx < sa->nr_entries) {
|
||||
if (sa->entries[idx] == NULL)
|
||||
break;
|
||||
return scnprintf(bf, size, "%s", sa->entries[idx]);
|
||||
}
|
||||
}
|
||||
|
||||
return scnprintf(bf, size, "%d", arg->val);
|
||||
}
|
||||
|
||||
#ifndef AT_FDCWD
|
||||
#define AT_FDCWD -100
|
||||
|
|
@ -358,21 +360,20 @@ static size_t syscall_arg__scnprintf_close_fd(char *bf, size_t size,
|
|||
|
||||
#define SCA_CLOSE_FD syscall_arg__scnprintf_close_fd
|
||||
|
||||
static size_t syscall_arg__scnprintf_hex(char *bf, size_t size,
|
||||
struct syscall_arg *arg)
|
||||
size_t syscall_arg__scnprintf_hex(char *bf, size_t size, struct syscall_arg *arg)
|
||||
{
|
||||
return scnprintf(bf, size, "%#lx", arg->val);
|
||||
}
|
||||
|
||||
#define SCA_HEX syscall_arg__scnprintf_hex
|
||||
|
||||
static size_t syscall_arg__scnprintf_int(char *bf, size_t size,
|
||||
struct syscall_arg *arg)
|
||||
size_t syscall_arg__scnprintf_int(char *bf, size_t size, struct syscall_arg *arg)
|
||||
{
|
||||
return scnprintf(bf, size, "%d", arg->val);
|
||||
}
|
||||
|
||||
#define SCA_INT syscall_arg__scnprintf_int
|
||||
size_t syscall_arg__scnprintf_long(char *bf, size_t size, struct syscall_arg *arg)
|
||||
{
|
||||
return scnprintf(bf, size, "%ld", arg->val);
|
||||
}
|
||||
|
||||
static const char *bpf_cmd[] = {
|
||||
"MAP_CREATE", "MAP_LOOKUP_ELEM", "MAP_UPDATE_ELEM", "MAP_DELETE_ELEM",
|
||||
|
|
@ -407,12 +408,27 @@ static DEFINE_STRARRAY(whences);
|
|||
|
||||
static const char *fcntl_cmds[] = {
|
||||
"DUPFD", "GETFD", "SETFD", "GETFL", "SETFL", "GETLK", "SETLK",
|
||||
"SETLKW", "SETOWN", "GETOWN", "SETSIG", "GETSIG", "F_GETLK64",
|
||||
"F_SETLK64", "F_SETLKW64", "F_SETOWN_EX", "F_GETOWN_EX",
|
||||
"F_GETOWNER_UIDS",
|
||||
"SETLKW", "SETOWN", "GETOWN", "SETSIG", "GETSIG", "GETLK64",
|
||||
"SETLK64", "SETLKW64", "SETOWN_EX", "GETOWN_EX",
|
||||
"GETOWNER_UIDS",
|
||||
};
|
||||
static DEFINE_STRARRAY(fcntl_cmds);
|
||||
|
||||
static const char *fcntl_linux_specific_cmds[] = {
|
||||
"SETLEASE", "GETLEASE", "NOTIFY", [5] = "CANCELLK", "DUPFD_CLOEXEC",
|
||||
"SETPIPE_SZ", "GETPIPE_SZ", "ADD_SEALS", "GET_SEALS",
|
||||
"GET_RW_HINT", "SET_RW_HINT", "GET_FILE_RW_HINT", "SET_FILE_RW_HINT",
|
||||
};
|
||||
|
||||
static DEFINE_STRARRAY_OFFSET(fcntl_linux_specific_cmds, F_LINUX_SPECIFIC_BASE);
|
||||
|
||||
static struct strarray *fcntl_cmds_arrays[] = {
|
||||
&strarray__fcntl_cmds,
|
||||
&strarray__fcntl_linux_specific_cmds,
|
||||
};
|
||||
|
||||
static DEFINE_STRARRAYS(fcntl_cmds_arrays);
|
||||
|
||||
static const char *rlimit_resources[] = {
|
||||
"CPU", "FSIZE", "DATA", "STACK", "CORE", "RSS", "NPROC", "NOFILE",
|
||||
"MEMLOCK", "AS", "LOCKS", "SIGPENDING", "MSGQUEUE", "NICE", "RTPRIO",
|
||||
|
|
@ -495,33 +511,6 @@ static size_t syscall_arg__scnprintf_pipe_flags(char *bf, size_t size,
|
|||
|
||||
#define SCA_PIPE_FLAGS syscall_arg__scnprintf_pipe_flags
|
||||
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
/*
|
||||
* FIXME: Make this available to all arches.
|
||||
*/
|
||||
#define TCGETS 0x5401
|
||||
|
||||
static const char *tioctls[] = {
|
||||
"TCGETS", "TCSETS", "TCSETSW", "TCSETSF", "TCGETA", "TCSETA", "TCSETAW",
|
||||
"TCSETAF", "TCSBRK", "TCXONC", "TCFLSH", "TIOCEXCL", "TIOCNXCL",
|
||||
"TIOCSCTTY", "TIOCGPGRP", "TIOCSPGRP", "TIOCOUTQ", "TIOCSTI",
|
||||
"TIOCGWINSZ", "TIOCSWINSZ", "TIOCMGET", "TIOCMBIS", "TIOCMBIC",
|
||||
"TIOCMSET", "TIOCGSOFTCAR", "TIOCSSOFTCAR", "FIONREAD", "TIOCLINUX",
|
||||
"TIOCCONS", "TIOCGSERIAL", "TIOCSSERIAL", "TIOCPKT", "FIONBIO",
|
||||
"TIOCNOTTY", "TIOCSETD", "TIOCGETD", "TCSBRKP", [0x27] = "TIOCSBRK",
|
||||
"TIOCCBRK", "TIOCGSID", "TCGETS2", "TCSETS2", "TCSETSW2", "TCSETSF2",
|
||||
"TIOCGRS485", "TIOCSRS485", "TIOCGPTN", "TIOCSPTLCK",
|
||||
"TIOCGDEV||TCGETX", "TCSETX", "TCSETXF", "TCSETXW", "TIOCSIG",
|
||||
"TIOCVHANGUP", "TIOCGPKT", "TIOCGPTLCK", "TIOCGEXCL",
|
||||
[0x50] = "FIONCLEX", "FIOCLEX", "FIOASYNC", "TIOCSERCONFIG",
|
||||
"TIOCSERGWILD", "TIOCSERSWILD", "TIOCGLCKTRMIOS", "TIOCSLCKTRMIOS",
|
||||
"TIOCSERGSTRUCT", "TIOCSERGETLSR", "TIOCSERGETMULTI", "TIOCSERSETMULTI",
|
||||
"TIOCMIWAIT", "TIOCGICOUNT", [0x60] = "FIOQSIZE",
|
||||
};
|
||||
|
||||
static DEFINE_STRARRAY_OFFSET(tioctls, 0x5401);
|
||||
#endif /* defined(__i386__) || defined(__x86_64__) */
|
||||
|
||||
#ifndef GRND_NONBLOCK
|
||||
#define GRND_NONBLOCK 0x0001
|
||||
#endif
|
||||
|
|
@ -552,9 +541,9 @@ static size_t syscall_arg__scnprintf_getrandom_flags(char *bf, size_t size,
|
|||
|
||||
#define SCA_GETRANDOM_FLAGS syscall_arg__scnprintf_getrandom_flags
|
||||
|
||||
#define STRARRAY(arg, name, array) \
|
||||
.arg_scnprintf = { [arg] = SCA_STRARRAY, }, \
|
||||
.arg_parm = { [arg] = &strarray__##array, }
|
||||
#define STRARRAY(name, array) \
|
||||
{ .scnprintf = SCA_STRARRAY, \
|
||||
.parm = &strarray__##array, }
|
||||
|
||||
#include "trace/beauty/eventfd.c"
|
||||
#include "trace/beauty/flock.c"
|
||||
|
|
@ -571,242 +560,219 @@ static size_t syscall_arg__scnprintf_getrandom_flags(char *bf, size_t size,
|
|||
#include "trace/beauty/socket_type.c"
|
||||
#include "trace/beauty/waitid_options.c"
|
||||
|
||||
struct syscall_arg_fmt {
|
||||
size_t (*scnprintf)(char *bf, size_t size, struct syscall_arg *arg);
|
||||
void *parm;
|
||||
const char *name;
|
||||
bool show_zero;
|
||||
};
|
||||
|
||||
static struct syscall_fmt {
|
||||
const char *name;
|
||||
const char *alias;
|
||||
size_t (*arg_scnprintf[6])(char *bf, size_t size, struct syscall_arg *arg);
|
||||
void *arg_parm[6];
|
||||
bool errmsg;
|
||||
struct syscall_arg_fmt arg[6];
|
||||
u8 nr_args;
|
||||
bool errpid;
|
||||
bool timeout;
|
||||
bool hexret;
|
||||
} syscall_fmts[] = {
|
||||
{ .name = "access", .errmsg = true,
|
||||
.arg_scnprintf = { [1] = SCA_ACCMODE, /* mode */ }, },
|
||||
{ .name = "arch_prctl", .errmsg = true, .alias = "prctl", },
|
||||
{ .name = "bpf", .errmsg = true, STRARRAY(0, cmd, bpf_cmd), },
|
||||
{ .name = "access",
|
||||
.arg = { [1] = { .scnprintf = SCA_ACCMODE, /* mode */ }, }, },
|
||||
{ .name = "arch_prctl", .alias = "prctl", },
|
||||
{ .name = "bpf",
|
||||
.arg = { [0] = STRARRAY(cmd, bpf_cmd), }, },
|
||||
{ .name = "brk", .hexret = true,
|
||||
.arg_scnprintf = { [0] = SCA_HEX, /* brk */ }, },
|
||||
{ .name = "chdir", .errmsg = true, },
|
||||
{ .name = "chmod", .errmsg = true, },
|
||||
{ .name = "chroot", .errmsg = true, },
|
||||
{ .name = "clock_gettime", .errmsg = true, STRARRAY(0, clk_id, clockid), },
|
||||
{ .name = "clone", .errpid = true, },
|
||||
{ .name = "close", .errmsg = true,
|
||||
.arg_scnprintf = { [0] = SCA_CLOSE_FD, /* fd */ }, },
|
||||
{ .name = "connect", .errmsg = true, },
|
||||
{ .name = "creat", .errmsg = true, },
|
||||
{ .name = "dup", .errmsg = true, },
|
||||
{ .name = "dup2", .errmsg = true, },
|
||||
{ .name = "dup3", .errmsg = true, },
|
||||
{ .name = "epoll_ctl", .errmsg = true, STRARRAY(1, op, epoll_ctl_ops), },
|
||||
{ .name = "eventfd2", .errmsg = true,
|
||||
.arg_scnprintf = { [1] = SCA_EFD_FLAGS, /* flags */ }, },
|
||||
{ .name = "faccessat", .errmsg = true, },
|
||||
{ .name = "fadvise64", .errmsg = true, },
|
||||
{ .name = "fallocate", .errmsg = true, },
|
||||
{ .name = "fchdir", .errmsg = true, },
|
||||
{ .name = "fchmod", .errmsg = true, },
|
||||
{ .name = "fchmodat", .errmsg = true,
|
||||
.arg_scnprintf = { [0] = SCA_FDAT, /* fd */ }, },
|
||||
{ .name = "fchown", .errmsg = true, },
|
||||
{ .name = "fchownat", .errmsg = true,
|
||||
.arg_scnprintf = { [0] = SCA_FDAT, /* fd */ }, },
|
||||
{ .name = "fcntl", .errmsg = true,
|
||||
.arg_scnprintf = { [1] = SCA_STRARRAY, /* cmd */ },
|
||||
.arg_parm = { [1] = &strarray__fcntl_cmds, /* cmd */ }, },
|
||||
{ .name = "fdatasync", .errmsg = true, },
|
||||
{ .name = "flock", .errmsg = true,
|
||||
.arg_scnprintf = { [1] = SCA_FLOCK, /* cmd */ }, },
|
||||
{ .name = "fsetxattr", .errmsg = true, },
|
||||
{ .name = "fstat", .errmsg = true, .alias = "newfstat", },
|
||||
{ .name = "fstatat", .errmsg = true, .alias = "newfstatat", },
|
||||
{ .name = "fstatfs", .errmsg = true, },
|
||||
{ .name = "fsync", .errmsg = true, },
|
||||
{ .name = "ftruncate", .errmsg = true, },
|
||||
{ .name = "futex", .errmsg = true,
|
||||
.arg_scnprintf = { [1] = SCA_FUTEX_OP, /* op */ }, },
|
||||
{ .name = "futimesat", .errmsg = true,
|
||||
.arg_scnprintf = { [0] = SCA_FDAT, /* fd */ }, },
|
||||
{ .name = "getdents", .errmsg = true, },
|
||||
{ .name = "getdents64", .errmsg = true, },
|
||||
{ .name = "getitimer", .errmsg = true, STRARRAY(0, which, itimers), },
|
||||
.arg = { [0] = { .scnprintf = SCA_HEX, /* brk */ }, }, },
|
||||
{ .name = "clock_gettime",
|
||||
.arg = { [0] = STRARRAY(clk_id, clockid), }, },
|
||||
{ .name = "clone", .errpid = true, .nr_args = 5,
|
||||
.arg = { [0] = { .name = "flags", .scnprintf = SCA_CLONE_FLAGS, },
|
||||
[1] = { .name = "child_stack", .scnprintf = SCA_HEX, },
|
||||
[2] = { .name = "parent_tidptr", .scnprintf = SCA_HEX, },
|
||||
[3] = { .name = "child_tidptr", .scnprintf = SCA_HEX, },
|
||||
[4] = { .name = "tls", .scnprintf = SCA_HEX, }, }, },
|
||||
{ .name = "close",
|
||||
.arg = { [0] = { .scnprintf = SCA_CLOSE_FD, /* fd */ }, }, },
|
||||
{ .name = "epoll_ctl",
|
||||
.arg = { [1] = STRARRAY(op, epoll_ctl_ops), }, },
|
||||
{ .name = "eventfd2",
|
||||
.arg = { [1] = { .scnprintf = SCA_EFD_FLAGS, /* flags */ }, }, },
|
||||
{ .name = "fchmodat",
|
||||
.arg = { [0] = { .scnprintf = SCA_FDAT, /* fd */ }, }, },
|
||||
{ .name = "fchownat",
|
||||
.arg = { [0] = { .scnprintf = SCA_FDAT, /* fd */ }, }, },
|
||||
{ .name = "fcntl",
|
||||
.arg = { [1] = { .scnprintf = SCA_FCNTL_CMD, /* cmd */
|
||||
.parm = &strarrays__fcntl_cmds_arrays,
|
||||
.show_zero = true, },
|
||||
[2] = { .scnprintf = SCA_FCNTL_ARG, /* arg */ }, }, },
|
||||
{ .name = "flock",
|
||||
.arg = { [1] = { .scnprintf = SCA_FLOCK, /* cmd */ }, }, },
|
||||
{ .name = "fstat", .alias = "newfstat", },
|
||||
{ .name = "fstatat", .alias = "newfstatat", },
|
||||
{ .name = "futex",
|
||||
.arg = { [1] = { .scnprintf = SCA_FUTEX_OP, /* op */ }, }, },
|
||||
{ .name = "futimesat",
|
||||
.arg = { [0] = { .scnprintf = SCA_FDAT, /* fd */ }, }, },
|
||||
{ .name = "getitimer",
|
||||
.arg = { [0] = STRARRAY(which, itimers), }, },
|
||||
{ .name = "getpid", .errpid = true, },
|
||||
{ .name = "getpgid", .errpid = true, },
|
||||
{ .name = "getppid", .errpid = true, },
|
||||
{ .name = "getrandom", .errmsg = true,
|
||||
.arg_scnprintf = { [2] = SCA_GETRANDOM_FLAGS, /* flags */ }, },
|
||||
{ .name = "getrlimit", .errmsg = true, STRARRAY(0, resource, rlimit_resources), },
|
||||
{ .name = "getxattr", .errmsg = true, },
|
||||
{ .name = "inotify_add_watch", .errmsg = true, },
|
||||
{ .name = "ioctl", .errmsg = true,
|
||||
.arg_scnprintf = {
|
||||
{ .name = "getrandom",
|
||||
.arg = { [2] = { .scnprintf = SCA_GETRANDOM_FLAGS, /* flags */ }, }, },
|
||||
{ .name = "getrlimit",
|
||||
.arg = { [0] = STRARRAY(resource, rlimit_resources), }, },
|
||||
{ .name = "ioctl",
|
||||
.arg = {
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
/*
|
||||
* FIXME: Make this available to all arches.
|
||||
*/
|
||||
[1] = SCA_STRHEXARRAY, /* cmd */
|
||||
[2] = SCA_HEX, /* arg */ },
|
||||
.arg_parm = { [1] = &strarray__tioctls, /* cmd */ }, },
|
||||
[1] = { .scnprintf = SCA_IOCTL_CMD, /* cmd */ },
|
||||
[2] = { .scnprintf = SCA_HEX, /* arg */ }, }, },
|
||||
#else
|
||||
[2] = SCA_HEX, /* arg */ }, },
|
||||
[2] = { .scnprintf = SCA_HEX, /* arg */ }, }, },
|
||||
#endif
|
||||
{ .name = "keyctl", .errmsg = true, STRARRAY(0, option, keyctl_options), },
|
||||
{ .name = "kill", .errmsg = true,
|
||||
.arg_scnprintf = { [1] = SCA_SIGNUM, /* sig */ }, },
|
||||
{ .name = "lchown", .errmsg = true, },
|
||||
{ .name = "lgetxattr", .errmsg = true, },
|
||||
{ .name = "linkat", .errmsg = true,
|
||||
.arg_scnprintf = { [0] = SCA_FDAT, /* fd */ }, },
|
||||
{ .name = "listxattr", .errmsg = true, },
|
||||
{ .name = "llistxattr", .errmsg = true, },
|
||||
{ .name = "lremovexattr", .errmsg = true, },
|
||||
{ .name = "lseek", .errmsg = true,
|
||||
.arg_scnprintf = { [2] = SCA_STRARRAY, /* whence */ },
|
||||
.arg_parm = { [2] = &strarray__whences, /* whence */ }, },
|
||||
{ .name = "lsetxattr", .errmsg = true, },
|
||||
{ .name = "lstat", .errmsg = true, .alias = "newlstat", },
|
||||
{ .name = "lsxattr", .errmsg = true, },
|
||||
{ .name = "madvise", .errmsg = true,
|
||||
.arg_scnprintf = { [0] = SCA_HEX, /* start */
|
||||
[2] = SCA_MADV_BHV, /* behavior */ }, },
|
||||
{ .name = "mkdir", .errmsg = true, },
|
||||
{ .name = "mkdirat", .errmsg = true,
|
||||
.arg_scnprintf = { [0] = SCA_FDAT, /* fd */ }, },
|
||||
{ .name = "mknod", .errmsg = true, },
|
||||
{ .name = "mknodat", .errmsg = true,
|
||||
.arg_scnprintf = { [0] = SCA_FDAT, /* fd */ }, },
|
||||
{ .name = "mlock", .errmsg = true,
|
||||
.arg_scnprintf = { [0] = SCA_HEX, /* addr */ }, },
|
||||
{ .name = "mlockall", .errmsg = true,
|
||||
.arg_scnprintf = { [0] = SCA_HEX, /* addr */ }, },
|
||||
{ .name = "keyctl",
|
||||
.arg = { [0] = STRARRAY(option, keyctl_options), }, },
|
||||
{ .name = "kill",
|
||||
.arg = { [1] = { .scnprintf = SCA_SIGNUM, /* sig */ }, }, },
|
||||
{ .name = "linkat",
|
||||
.arg = { [0] = { .scnprintf = SCA_FDAT, /* fd */ }, }, },
|
||||
{ .name = "lseek",
|
||||
.arg = { [2] = STRARRAY(whence, whences), }, },
|
||||
{ .name = "lstat", .alias = "newlstat", },
|
||||
{ .name = "madvise",
|
||||
.arg = { [0] = { .scnprintf = SCA_HEX, /* start */ },
|
||||
[2] = { .scnprintf = SCA_MADV_BHV, /* behavior */ }, }, },
|
||||
{ .name = "mkdirat",
|
||||
.arg = { [0] = { .scnprintf = SCA_FDAT, /* fd */ }, }, },
|
||||
{ .name = "mknodat",
|
||||
.arg = { [0] = { .scnprintf = SCA_FDAT, /* fd */ }, }, },
|
||||
{ .name = "mlock",
|
||||
.arg = { [0] = { .scnprintf = SCA_HEX, /* addr */ }, }, },
|
||||
{ .name = "mlockall",
|
||||
.arg = { [0] = { .scnprintf = SCA_HEX, /* addr */ }, }, },
|
||||
{ .name = "mmap", .hexret = true,
|
||||
/* The standard mmap maps to old_mmap on s390x */
|
||||
#if defined(__s390x__)
|
||||
.alias = "old_mmap",
|
||||
#endif
|
||||
.arg_scnprintf = { [0] = SCA_HEX, /* addr */
|
||||
[2] = SCA_MMAP_PROT, /* prot */
|
||||
[3] = SCA_MMAP_FLAGS, /* flags */ }, },
|
||||
{ .name = "mprotect", .errmsg = true,
|
||||
.arg_scnprintf = { [0] = SCA_HEX, /* start */
|
||||
[2] = SCA_MMAP_PROT, /* prot */ }, },
|
||||
{ .name = "mq_unlink", .errmsg = true,
|
||||
.arg_scnprintf = { [0] = SCA_FILENAME, /* u_name */ }, },
|
||||
.arg = { [0] = { .scnprintf = SCA_HEX, /* addr */ },
|
||||
[2] = { .scnprintf = SCA_MMAP_PROT, /* prot */ },
|
||||
[3] = { .scnprintf = SCA_MMAP_FLAGS, /* flags */ }, }, },
|
||||
{ .name = "mprotect",
|
||||
.arg = { [0] = { .scnprintf = SCA_HEX, /* start */ },
|
||||
[2] = { .scnprintf = SCA_MMAP_PROT, /* prot */ }, }, },
|
||||
{ .name = "mq_unlink",
|
||||
.arg = { [0] = { .scnprintf = SCA_FILENAME, /* u_name */ }, }, },
|
||||
{ .name = "mremap", .hexret = true,
|
||||
.arg_scnprintf = { [0] = SCA_HEX, /* addr */
|
||||
[3] = SCA_MREMAP_FLAGS, /* flags */
|
||||
[4] = SCA_HEX, /* new_addr */ }, },
|
||||
{ .name = "munlock", .errmsg = true,
|
||||
.arg_scnprintf = { [0] = SCA_HEX, /* addr */ }, },
|
||||
{ .name = "munmap", .errmsg = true,
|
||||
.arg_scnprintf = { [0] = SCA_HEX, /* addr */ }, },
|
||||
{ .name = "name_to_handle_at", .errmsg = true,
|
||||
.arg_scnprintf = { [0] = SCA_FDAT, /* dfd */ }, },
|
||||
{ .name = "newfstatat", .errmsg = true,
|
||||
.arg_scnprintf = { [0] = SCA_FDAT, /* dfd */ }, },
|
||||
{ .name = "open", .errmsg = true,
|
||||
.arg_scnprintf = { [1] = SCA_OPEN_FLAGS, /* flags */ }, },
|
||||
{ .name = "open_by_handle_at", .errmsg = true,
|
||||
.arg_scnprintf = { [0] = SCA_FDAT, /* dfd */
|
||||
[2] = SCA_OPEN_FLAGS, /* flags */ }, },
|
||||
{ .name = "openat", .errmsg = true,
|
||||
.arg_scnprintf = { [0] = SCA_FDAT, /* dfd */
|
||||
[2] = SCA_OPEN_FLAGS, /* flags */ }, },
|
||||
{ .name = "perf_event_open", .errmsg = true,
|
||||
.arg_scnprintf = { [2] = SCA_INT, /* cpu */
|
||||
[3] = SCA_FD, /* group_fd */
|
||||
[4] = SCA_PERF_FLAGS, /* flags */ }, },
|
||||
{ .name = "pipe2", .errmsg = true,
|
||||
.arg_scnprintf = { [1] = SCA_PIPE_FLAGS, /* flags */ }, },
|
||||
{ .name = "poll", .errmsg = true, .timeout = true, },
|
||||
{ .name = "ppoll", .errmsg = true, .timeout = true, },
|
||||
{ .name = "pread", .errmsg = true, .alias = "pread64", },
|
||||
{ .name = "preadv", .errmsg = true, .alias = "pread", },
|
||||
{ .name = "prlimit64", .errmsg = true, STRARRAY(1, resource, rlimit_resources), },
|
||||
{ .name = "pwrite", .errmsg = true, .alias = "pwrite64", },
|
||||
{ .name = "pwritev", .errmsg = true, },
|
||||
{ .name = "read", .errmsg = true, },
|
||||
{ .name = "readlink", .errmsg = true, },
|
||||
{ .name = "readlinkat", .errmsg = true,
|
||||
.arg_scnprintf = { [0] = SCA_FDAT, /* dfd */ }, },
|
||||
{ .name = "readv", .errmsg = true, },
|
||||
{ .name = "recvfrom", .errmsg = true,
|
||||
.arg_scnprintf = { [3] = SCA_MSG_FLAGS, /* flags */ }, },
|
||||
{ .name = "recvmmsg", .errmsg = true,
|
||||
.arg_scnprintf = { [3] = SCA_MSG_FLAGS, /* flags */ }, },
|
||||
{ .name = "recvmsg", .errmsg = true,
|
||||
.arg_scnprintf = { [2] = SCA_MSG_FLAGS, /* flags */ }, },
|
||||
{ .name = "removexattr", .errmsg = true, },
|
||||
{ .name = "renameat", .errmsg = true,
|
||||
.arg_scnprintf = { [0] = SCA_FDAT, /* dfd */ }, },
|
||||
{ .name = "rmdir", .errmsg = true, },
|
||||
{ .name = "rt_sigaction", .errmsg = true,
|
||||
.arg_scnprintf = { [0] = SCA_SIGNUM, /* sig */ }, },
|
||||
{ .name = "rt_sigprocmask", .errmsg = true, STRARRAY(0, how, sighow), },
|
||||
{ .name = "rt_sigqueueinfo", .errmsg = true,
|
||||
.arg_scnprintf = { [1] = SCA_SIGNUM, /* sig */ }, },
|
||||
{ .name = "rt_tgsigqueueinfo", .errmsg = true,
|
||||
.arg_scnprintf = { [2] = SCA_SIGNUM, /* sig */ }, },
|
||||
{ .name = "sched_getattr", .errmsg = true, },
|
||||
{ .name = "sched_setattr", .errmsg = true, },
|
||||
{ .name = "sched_setscheduler", .errmsg = true,
|
||||
.arg_scnprintf = { [1] = SCA_SCHED_POLICY, /* policy */ }, },
|
||||
{ .name = "seccomp", .errmsg = true,
|
||||
.arg_scnprintf = { [0] = SCA_SECCOMP_OP, /* op */
|
||||
[1] = SCA_SECCOMP_FLAGS, /* flags */ }, },
|
||||
{ .name = "select", .errmsg = true, .timeout = true, },
|
||||
{ .name = "sendmmsg", .errmsg = true,
|
||||
.arg_scnprintf = { [3] = SCA_MSG_FLAGS, /* flags */ }, },
|
||||
{ .name = "sendmsg", .errmsg = true,
|
||||
.arg_scnprintf = { [2] = SCA_MSG_FLAGS, /* flags */ }, },
|
||||
{ .name = "sendto", .errmsg = true,
|
||||
.arg_scnprintf = { [3] = SCA_MSG_FLAGS, /* flags */ }, },
|
||||
.arg = { [0] = { .scnprintf = SCA_HEX, /* addr */ },
|
||||
[3] = { .scnprintf = SCA_MREMAP_FLAGS, /* flags */ },
|
||||
[4] = { .scnprintf = SCA_HEX, /* new_addr */ }, }, },
|
||||
{ .name = "munlock",
|
||||
.arg = { [0] = { .scnprintf = SCA_HEX, /* addr */ }, }, },
|
||||
{ .name = "munmap",
|
||||
.arg = { [0] = { .scnprintf = SCA_HEX, /* addr */ }, }, },
|
||||
{ .name = "name_to_handle_at",
|
||||
.arg = { [0] = { .scnprintf = SCA_FDAT, /* dfd */ }, }, },
|
||||
{ .name = "newfstatat",
|
||||
.arg = { [0] = { .scnprintf = SCA_FDAT, /* dfd */ }, }, },
|
||||
{ .name = "open",
|
||||
.arg = { [1] = { .scnprintf = SCA_OPEN_FLAGS, /* flags */ }, }, },
|
||||
{ .name = "open_by_handle_at",
|
||||
.arg = { [0] = { .scnprintf = SCA_FDAT, /* dfd */ },
|
||||
[2] = { .scnprintf = SCA_OPEN_FLAGS, /* flags */ }, }, },
|
||||
{ .name = "openat",
|
||||
.arg = { [0] = { .scnprintf = SCA_FDAT, /* dfd */ },
|
||||
[2] = { .scnprintf = SCA_OPEN_FLAGS, /* flags */ }, }, },
|
||||
{ .name = "perf_event_open",
|
||||
.arg = { [2] = { .scnprintf = SCA_INT, /* cpu */ },
|
||||
[3] = { .scnprintf = SCA_FD, /* group_fd */ },
|
||||
[4] = { .scnprintf = SCA_PERF_FLAGS, /* flags */ }, }, },
|
||||
{ .name = "pipe2",
|
||||
.arg = { [1] = { .scnprintf = SCA_PIPE_FLAGS, /* flags */ }, }, },
|
||||
{ .name = "pkey_alloc",
|
||||
.arg = { [1] = { .scnprintf = SCA_PKEY_ALLOC_ACCESS_RIGHTS, /* access_rights */ }, }, },
|
||||
{ .name = "pkey_free",
|
||||
.arg = { [0] = { .scnprintf = SCA_INT, /* key */ }, }, },
|
||||
{ .name = "pkey_mprotect",
|
||||
.arg = { [0] = { .scnprintf = SCA_HEX, /* start */ },
|
||||
[2] = { .scnprintf = SCA_MMAP_PROT, /* prot */ },
|
||||
[3] = { .scnprintf = SCA_INT, /* pkey */ }, }, },
|
||||
{ .name = "poll", .timeout = true, },
|
||||
{ .name = "ppoll", .timeout = true, },
|
||||
{ .name = "pread", .alias = "pread64", },
|
||||
{ .name = "preadv", .alias = "pread", },
|
||||
{ .name = "prlimit64",
|
||||
.arg = { [1] = STRARRAY(resource, rlimit_resources), }, },
|
||||
{ .name = "pwrite", .alias = "pwrite64", },
|
||||
{ .name = "readlinkat",
|
||||
.arg = { [0] = { .scnprintf = SCA_FDAT, /* dfd */ }, }, },
|
||||
{ .name = "recvfrom",
|
||||
.arg = { [3] = { .scnprintf = SCA_MSG_FLAGS, /* flags */ }, }, },
|
||||
{ .name = "recvmmsg",
|
||||
.arg = { [3] = { .scnprintf = SCA_MSG_FLAGS, /* flags */ }, }, },
|
||||
{ .name = "recvmsg",
|
||||
.arg = { [2] = { .scnprintf = SCA_MSG_FLAGS, /* flags */ }, }, },
|
||||
{ .name = "renameat",
|
||||
.arg = { [0] = { .scnprintf = SCA_FDAT, /* dfd */ }, }, },
|
||||
{ .name = "rt_sigaction",
|
||||
.arg = { [0] = { .scnprintf = SCA_SIGNUM, /* sig */ }, }, },
|
||||
{ .name = "rt_sigprocmask",
|
||||
.arg = { [0] = STRARRAY(how, sighow), }, },
|
||||
{ .name = "rt_sigqueueinfo",
|
||||
.arg = { [1] = { .scnprintf = SCA_SIGNUM, /* sig */ }, }, },
|
||||
{ .name = "rt_tgsigqueueinfo",
|
||||
.arg = { [2] = { .scnprintf = SCA_SIGNUM, /* sig */ }, }, },
|
||||
{ .name = "sched_setscheduler",
|
||||
.arg = { [1] = { .scnprintf = SCA_SCHED_POLICY, /* policy */ }, }, },
|
||||
{ .name = "seccomp",
|
||||
.arg = { [0] = { .scnprintf = SCA_SECCOMP_OP, /* op */ },
|
||||
[1] = { .scnprintf = SCA_SECCOMP_FLAGS, /* flags */ }, }, },
|
||||
{ .name = "select", .timeout = true, },
|
||||
{ .name = "sendmmsg",
|
||||
.arg = { [3] = { .scnprintf = SCA_MSG_FLAGS, /* flags */ }, }, },
|
||||
{ .name = "sendmsg",
|
||||
.arg = { [2] = { .scnprintf = SCA_MSG_FLAGS, /* flags */ }, }, },
|
||||
{ .name = "sendto",
|
||||
.arg = { [3] = { .scnprintf = SCA_MSG_FLAGS, /* flags */ }, }, },
|
||||
{ .name = "set_tid_address", .errpid = true, },
|
||||
{ .name = "setitimer", .errmsg = true, STRARRAY(0, which, itimers), },
|
||||
{ .name = "setpgid", .errmsg = true, },
|
||||
{ .name = "setrlimit", .errmsg = true, STRARRAY(0, resource, rlimit_resources), },
|
||||
{ .name = "setxattr", .errmsg = true, },
|
||||
{ .name = "shutdown", .errmsg = true, },
|
||||
{ .name = "socket", .errmsg = true,
|
||||
.arg_scnprintf = { [0] = SCA_STRARRAY, /* family */
|
||||
[1] = SCA_SK_TYPE, /* type */ },
|
||||
.arg_parm = { [0] = &strarray__socket_families, /* family */ }, },
|
||||
{ .name = "socketpair", .errmsg = true,
|
||||
.arg_scnprintf = { [0] = SCA_STRARRAY, /* family */
|
||||
[1] = SCA_SK_TYPE, /* type */ },
|
||||
.arg_parm = { [0] = &strarray__socket_families, /* family */ }, },
|
||||
{ .name = "stat", .errmsg = true, .alias = "newstat", },
|
||||
{ .name = "statfs", .errmsg = true, },
|
||||
{ .name = "statx", .errmsg = true,
|
||||
.arg_scnprintf = { [0] = SCA_FDAT, /* flags */
|
||||
[2] = SCA_STATX_FLAGS, /* flags */
|
||||
[3] = SCA_STATX_MASK, /* mask */ }, },
|
||||
{ .name = "swapoff", .errmsg = true,
|
||||
.arg_scnprintf = { [0] = SCA_FILENAME, /* specialfile */ }, },
|
||||
{ .name = "swapon", .errmsg = true,
|
||||
.arg_scnprintf = { [0] = SCA_FILENAME, /* specialfile */ }, },
|
||||
{ .name = "symlinkat", .errmsg = true,
|
||||
.arg_scnprintf = { [0] = SCA_FDAT, /* dfd */ }, },
|
||||
{ .name = "tgkill", .errmsg = true,
|
||||
.arg_scnprintf = { [2] = SCA_SIGNUM, /* sig */ }, },
|
||||
{ .name = "tkill", .errmsg = true,
|
||||
.arg_scnprintf = { [1] = SCA_SIGNUM, /* sig */ }, },
|
||||
{ .name = "truncate", .errmsg = true, },
|
||||
{ .name = "uname", .errmsg = true, .alias = "newuname", },
|
||||
{ .name = "unlinkat", .errmsg = true,
|
||||
.arg_scnprintf = { [0] = SCA_FDAT, /* dfd */ }, },
|
||||
{ .name = "utime", .errmsg = true, },
|
||||
{ .name = "utimensat", .errmsg = true,
|
||||
.arg_scnprintf = { [0] = SCA_FDAT, /* dirfd */ }, },
|
||||
{ .name = "utimes", .errmsg = true, },
|
||||
{ .name = "vmsplice", .errmsg = true, },
|
||||
{ .name = "setitimer",
|
||||
.arg = { [0] = STRARRAY(which, itimers), }, },
|
||||
{ .name = "setrlimit",
|
||||
.arg = { [0] = STRARRAY(resource, rlimit_resources), }, },
|
||||
{ .name = "socket",
|
||||
.arg = { [0] = STRARRAY(family, socket_families),
|
||||
[1] = { .scnprintf = SCA_SK_TYPE, /* type */ }, }, },
|
||||
{ .name = "socketpair",
|
||||
.arg = { [0] = STRARRAY(family, socket_families),
|
||||
[1] = { .scnprintf = SCA_SK_TYPE, /* type */ }, }, },
|
||||
{ .name = "stat", .alias = "newstat", },
|
||||
{ .name = "statx",
|
||||
.arg = { [0] = { .scnprintf = SCA_FDAT, /* fdat */ },
|
||||
[2] = { .scnprintf = SCA_STATX_FLAGS, /* flags */ } ,
|
||||
[3] = { .scnprintf = SCA_STATX_MASK, /* mask */ }, }, },
|
||||
{ .name = "swapoff",
|
||||
.arg = { [0] = { .scnprintf = SCA_FILENAME, /* specialfile */ }, }, },
|
||||
{ .name = "swapon",
|
||||
.arg = { [0] = { .scnprintf = SCA_FILENAME, /* specialfile */ }, }, },
|
||||
{ .name = "symlinkat",
|
||||
.arg = { [0] = { .scnprintf = SCA_FDAT, /* dfd */ }, }, },
|
||||
{ .name = "tgkill",
|
||||
.arg = { [2] = { .scnprintf = SCA_SIGNUM, /* sig */ }, }, },
|
||||
{ .name = "tkill",
|
||||
.arg = { [1] = { .scnprintf = SCA_SIGNUM, /* sig */ }, }, },
|
||||
{ .name = "uname", .alias = "newuname", },
|
||||
{ .name = "unlinkat",
|
||||
.arg = { [0] = { .scnprintf = SCA_FDAT, /* dfd */ }, }, },
|
||||
{ .name = "utimensat",
|
||||
.arg = { [0] = { .scnprintf = SCA_FDAT, /* dirfd */ }, }, },
|
||||
{ .name = "wait4", .errpid = true,
|
||||
.arg_scnprintf = { [2] = SCA_WAITID_OPTIONS, /* options */ }, },
|
||||
.arg = { [2] = { .scnprintf = SCA_WAITID_OPTIONS, /* options */ }, }, },
|
||||
{ .name = "waitid", .errpid = true,
|
||||
.arg_scnprintf = { [3] = SCA_WAITID_OPTIONS, /* options */ }, },
|
||||
{ .name = "write", .errmsg = true, },
|
||||
{ .name = "writev", .errmsg = true, },
|
||||
.arg = { [3] = { .scnprintf = SCA_WAITID_OPTIONS, /* options */ }, }, },
|
||||
};
|
||||
|
||||
static int syscall_fmt__cmp(const void *name, const void *fmtp)
|
||||
|
|
@ -828,8 +794,7 @@ struct syscall {
|
|||
const char *name;
|
||||
bool is_exit;
|
||||
struct syscall_fmt *fmt;
|
||||
size_t (**arg_scnprintf)(char *bf, size_t size, struct syscall_arg *arg);
|
||||
void **arg_parm;
|
||||
struct syscall_arg_fmt *arg_fmt;
|
||||
};
|
||||
|
||||
/*
|
||||
|
|
@ -859,6 +824,8 @@ static size_t fprintf_duration(unsigned long t, bool calculated, FILE *fp)
|
|||
* filename.ptr: The filename char pointer that will be vfs_getname'd
|
||||
* filename.entry_str_pos: Where to insert the string translated from
|
||||
* filename.ptr by the vfs_getname tracepoint/kprobe.
|
||||
* ret_scnprintf: syscall args may set this to a different syscall return
|
||||
* formatter, for instance, fcntl may return fds, file flags, etc.
|
||||
*/
|
||||
struct thread_trace {
|
||||
u64 entry_time;
|
||||
|
|
@ -867,6 +834,7 @@ struct thread_trace {
|
|||
unsigned long pfmaj, pfmin;
|
||||
char *entry_str;
|
||||
double runtime_ms;
|
||||
size_t (*ret_scnprintf)(char *bf, size_t size, struct syscall_arg *arg);
|
||||
struct {
|
||||
unsigned long ptr;
|
||||
short int entry_str_pos;
|
||||
|
|
@ -917,6 +885,15 @@ fail:
|
|||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
void syscall_arg__set_ret_scnprintf(struct syscall_arg *arg,
|
||||
size_t (*ret_scnprintf)(char *bf, size_t size, struct syscall_arg *arg))
|
||||
{
|
||||
struct thread_trace *ttrace = thread__priv(arg->thread);
|
||||
|
||||
ttrace->ret_scnprintf = ret_scnprintf;
|
||||
}
|
||||
|
||||
#define TRACE_PFMAJ (1 << 0)
|
||||
#define TRACE_PFMIN (1 << 1)
|
||||
|
||||
|
|
@ -996,8 +973,7 @@ static const char *thread__fd_path(struct thread *thread, int fd,
|
|||
return ttrace->paths.table[fd];
|
||||
}
|
||||
|
||||
static size_t syscall_arg__scnprintf_fd(char *bf, size_t size,
|
||||
struct syscall_arg *arg)
|
||||
size_t syscall_arg__scnprintf_fd(char *bf, size_t size, struct syscall_arg *arg)
|
||||
{
|
||||
int fd = arg->val;
|
||||
size_t printed = scnprintf(bf, size, "%d", fd);
|
||||
|
|
@ -1162,32 +1138,46 @@ static int trace__symbols_init(struct trace *trace, struct perf_evlist *evlist)
|
|||
return err;
|
||||
}
|
||||
|
||||
static int syscall__alloc_arg_fmts(struct syscall *sc, int nr_args)
|
||||
{
|
||||
int idx;
|
||||
|
||||
if (nr_args == 6 && sc->fmt && sc->fmt->nr_args != 0)
|
||||
nr_args = sc->fmt->nr_args;
|
||||
|
||||
sc->arg_fmt = calloc(nr_args, sizeof(*sc->arg_fmt));
|
||||
if (sc->arg_fmt == NULL)
|
||||
return -1;
|
||||
|
||||
for (idx = 0; idx < nr_args; ++idx) {
|
||||
if (sc->fmt)
|
||||
sc->arg_fmt[idx] = sc->fmt->arg[idx];
|
||||
}
|
||||
|
||||
sc->nr_args = nr_args;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int syscall__set_arg_fmts(struct syscall *sc)
|
||||
{
|
||||
struct format_field *field;
|
||||
int idx = 0, len;
|
||||
|
||||
sc->arg_scnprintf = calloc(sc->nr_args, sizeof(void *));
|
||||
if (sc->arg_scnprintf == NULL)
|
||||
return -1;
|
||||
for (field = sc->args; field; field = field->next, ++idx) {
|
||||
if (sc->fmt && sc->fmt->arg[idx].scnprintf)
|
||||
continue;
|
||||
|
||||
if (sc->fmt)
|
||||
sc->arg_parm = sc->fmt->arg_parm;
|
||||
|
||||
for (field = sc->args; field; field = field->next) {
|
||||
if (sc->fmt && sc->fmt->arg_scnprintf[idx])
|
||||
sc->arg_scnprintf[idx] = sc->fmt->arg_scnprintf[idx];
|
||||
else if (strcmp(field->type, "const char *") == 0 &&
|
||||
if (strcmp(field->type, "const char *") == 0 &&
|
||||
(strcmp(field->name, "filename") == 0 ||
|
||||
strcmp(field->name, "path") == 0 ||
|
||||
strcmp(field->name, "pathname") == 0))
|
||||
sc->arg_scnprintf[idx] = SCA_FILENAME;
|
||||
sc->arg_fmt[idx].scnprintf = SCA_FILENAME;
|
||||
else if (field->flags & FIELD_IS_POINTER)
|
||||
sc->arg_scnprintf[idx] = syscall_arg__scnprintf_hex;
|
||||
sc->arg_fmt[idx].scnprintf = syscall_arg__scnprintf_hex;
|
||||
else if (strcmp(field->type, "pid_t") == 0)
|
||||
sc->arg_scnprintf[idx] = SCA_PID;
|
||||
sc->arg_fmt[idx].scnprintf = SCA_PID;
|
||||
else if (strcmp(field->type, "umode_t") == 0)
|
||||
sc->arg_scnprintf[idx] = SCA_MODE_T;
|
||||
sc->arg_fmt[idx].scnprintf = SCA_MODE_T;
|
||||
else if ((strcmp(field->type, "int") == 0 ||
|
||||
strcmp(field->type, "unsigned int") == 0 ||
|
||||
strcmp(field->type, "long") == 0) &&
|
||||
|
|
@ -1200,9 +1190,8 @@ static int syscall__set_arg_fmts(struct syscall *sc)
|
|||
* 23 unsigned int
|
||||
* 7 unsigned long
|
||||
*/
|
||||
sc->arg_scnprintf[idx] = SCA_FD;
|
||||
sc->arg_fmt[idx].scnprintf = SCA_FD;
|
||||
}
|
||||
++idx;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
@ -1247,11 +1236,13 @@ static int trace__read_syscall_info(struct trace *trace, int id)
|
|||
sc->tp_format = trace_event__tp_format("syscalls", tp_name);
|
||||
}
|
||||
|
||||
if (syscall__alloc_arg_fmts(sc, IS_ERR(sc->tp_format) ? 6 : sc->tp_format->format.nr_fields))
|
||||
return -1;
|
||||
|
||||
if (IS_ERR(sc->tp_format))
|
||||
return -1;
|
||||
|
||||
sc->args = sc->tp_format->format.fields;
|
||||
sc->nr_args = sc->tp_format->format.nr_fields;
|
||||
/*
|
||||
* We need to check and discard the first variable '__syscall_nr'
|
||||
* or 'nr' that mean the syscall number. It is needless here.
|
||||
|
|
@ -1321,33 +1312,68 @@ out:
|
|||
* variable to read it. Most notably this avoids extended load instructions
|
||||
* on unaligned addresses
|
||||
*/
|
||||
unsigned long syscall_arg__val(struct syscall_arg *arg, u8 idx)
|
||||
{
|
||||
unsigned long val;
|
||||
unsigned char *p = arg->args + sizeof(unsigned long) * idx;
|
||||
|
||||
memcpy(&val, p, sizeof(val));
|
||||
return val;
|
||||
}
|
||||
|
||||
static size_t syscall__scnprintf_name(struct syscall *sc, char *bf, size_t size,
|
||||
struct syscall_arg *arg)
|
||||
{
|
||||
if (sc->arg_fmt && sc->arg_fmt[arg->idx].name)
|
||||
return scnprintf(bf, size, "%s: ", sc->arg_fmt[arg->idx].name);
|
||||
|
||||
return scnprintf(bf, size, "arg%d: ", arg->idx);
|
||||
}
|
||||
|
||||
static size_t syscall__scnprintf_val(struct syscall *sc, char *bf, size_t size,
|
||||
struct syscall_arg *arg, unsigned long val)
|
||||
{
|
||||
if (sc->arg_fmt && sc->arg_fmt[arg->idx].scnprintf) {
|
||||
arg->val = val;
|
||||
if (sc->arg_fmt[arg->idx].parm)
|
||||
arg->parm = sc->arg_fmt[arg->idx].parm;
|
||||
return sc->arg_fmt[arg->idx].scnprintf(bf, size, arg);
|
||||
}
|
||||
return scnprintf(bf, size, "%ld", val);
|
||||
}
|
||||
|
||||
static size_t syscall__scnprintf_args(struct syscall *sc, char *bf, size_t size,
|
||||
unsigned char *args, struct trace *trace,
|
||||
struct thread *thread)
|
||||
{
|
||||
size_t printed = 0;
|
||||
unsigned char *p;
|
||||
unsigned long val;
|
||||
u8 bit = 1;
|
||||
struct syscall_arg arg = {
|
||||
.args = args,
|
||||
.idx = 0,
|
||||
.mask = 0,
|
||||
.trace = trace,
|
||||
.thread = thread,
|
||||
};
|
||||
struct thread_trace *ttrace = thread__priv(thread);
|
||||
|
||||
/*
|
||||
* Things like fcntl will set this in its 'cmd' formatter to pick the
|
||||
* right formatter for the return value (an fd? file flags?), which is
|
||||
* not needed for syscalls that always return a given type, say an fd.
|
||||
*/
|
||||
ttrace->ret_scnprintf = NULL;
|
||||
|
||||
if (sc->args != NULL) {
|
||||
struct format_field *field;
|
||||
u8 bit = 1;
|
||||
struct syscall_arg arg = {
|
||||
.idx = 0,
|
||||
.mask = 0,
|
||||
.trace = trace,
|
||||
.thread = thread,
|
||||
};
|
||||
|
||||
for (field = sc->args; field;
|
||||
field = field->next, ++arg.idx, bit <<= 1) {
|
||||
if (arg.mask & bit)
|
||||
continue;
|
||||
|
||||
/* special care for unaligned accesses */
|
||||
p = args + sizeof(unsigned long) * arg.idx;
|
||||
memcpy(&val, p, sizeof(val));
|
||||
val = syscall_arg__val(&arg, arg.idx);
|
||||
|
||||
/*
|
||||
* Suppress this argument if its value is zero and
|
||||
|
|
@ -1355,23 +1381,16 @@ static size_t syscall__scnprintf_args(struct syscall *sc, char *bf, size_t size,
|
|||
* strarray for it.
|
||||
*/
|
||||
if (val == 0 &&
|
||||
!(sc->arg_scnprintf &&
|
||||
sc->arg_scnprintf[arg.idx] == SCA_STRARRAY &&
|
||||
sc->arg_parm[arg.idx]))
|
||||
!(sc->arg_fmt &&
|
||||
(sc->arg_fmt[arg.idx].show_zero ||
|
||||
sc->arg_fmt[arg.idx].scnprintf == SCA_STRARRAY ||
|
||||
sc->arg_fmt[arg.idx].scnprintf == SCA_STRARRAYS) &&
|
||||
sc->arg_fmt[arg.idx].parm))
|
||||
continue;
|
||||
|
||||
printed += scnprintf(bf + printed, size - printed,
|
||||
"%s%s: ", printed ? ", " : "", field->name);
|
||||
if (sc->arg_scnprintf && sc->arg_scnprintf[arg.idx]) {
|
||||
arg.val = val;
|
||||
if (sc->arg_parm)
|
||||
arg.parm = sc->arg_parm[arg.idx];
|
||||
printed += sc->arg_scnprintf[arg.idx](bf + printed,
|
||||
size - printed, &arg);
|
||||
} else {
|
||||
printed += scnprintf(bf + printed, size - printed,
|
||||
"%ld", val);
|
||||
}
|
||||
printed += syscall__scnprintf_val(sc, bf + printed, size - printed, &arg, val);
|
||||
}
|
||||
} else if (IS_ERR(sc->tp_format)) {
|
||||
/*
|
||||
|
|
@ -1379,16 +1398,17 @@ static size_t syscall__scnprintf_args(struct syscall *sc, char *bf, size_t size,
|
|||
* may end up not having any args, like with gettid(), so only
|
||||
* print the raw args when we didn't manage to read it.
|
||||
*/
|
||||
int i = 0;
|
||||
|
||||
while (i < 6) {
|
||||
/* special care for unaligned accesses */
|
||||
p = args + sizeof(unsigned long) * i;
|
||||
memcpy(&val, p, sizeof(val));
|
||||
printed += scnprintf(bf + printed, size - printed,
|
||||
"%sarg%d: %ld",
|
||||
printed ? ", " : "", i, val);
|
||||
++i;
|
||||
while (arg.idx < sc->nr_args) {
|
||||
if (arg.mask & bit)
|
||||
goto next_arg;
|
||||
val = syscall_arg__val(&arg, arg.idx);
|
||||
if (printed)
|
||||
printed += scnprintf(bf + printed, size - printed, ", ");
|
||||
printed += syscall__scnprintf_name(sc, bf + printed, size - printed, &arg);
|
||||
printed += syscall__scnprintf_val(sc, bf + printed, size - printed, &arg, val);
|
||||
next_arg:
|
||||
++arg.idx;
|
||||
bit <<= 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1635,17 +1655,31 @@ static int trace__sys_exit(struct trace *trace, struct perf_evsel *evsel,
|
|||
}
|
||||
|
||||
if (sc->fmt == NULL) {
|
||||
if (ret < 0)
|
||||
goto errno_print;
|
||||
signed_print:
|
||||
fprintf(trace->output, ") = %ld", ret);
|
||||
} else if (ret < 0 && (sc->fmt->errmsg || sc->fmt->errpid)) {
|
||||
} else if (ret < 0) {
|
||||
errno_print: {
|
||||
char bf[STRERR_BUFSIZE];
|
||||
const char *emsg = str_error_r(-ret, bf, sizeof(bf)),
|
||||
*e = audit_errno_to_name(-ret);
|
||||
|
||||
fprintf(trace->output, ") = -1 %s %s", e, emsg);
|
||||
}
|
||||
} else if (ret == 0 && sc->fmt->timeout)
|
||||
fprintf(trace->output, ") = 0 Timeout");
|
||||
else if (sc->fmt->hexret)
|
||||
else if (ttrace->ret_scnprintf) {
|
||||
char bf[1024];
|
||||
struct syscall_arg arg = {
|
||||
.val = ret,
|
||||
.thread = thread,
|
||||
.trace = trace,
|
||||
};
|
||||
ttrace->ret_scnprintf(bf, sizeof(bf), &arg);
|
||||
ttrace->ret_scnprintf = NULL;
|
||||
fprintf(trace->output, ") = %s", bf);
|
||||
} else if (sc->fmt->hexret)
|
||||
fprintf(trace->output, ") = %#lx", ret);
|
||||
else if (sc->fmt->errpid) {
|
||||
struct thread *child = machine__find_thread(trace->host, ret, ret);
|
||||
|
|
@ -2171,6 +2205,30 @@ out_enomem:
|
|||
goto out;
|
||||
}
|
||||
|
||||
static int trace__set_filter_loop_pids(struct trace *trace)
|
||||
{
|
||||
unsigned int nr = 1;
|
||||
pid_t pids[32] = {
|
||||
getpid(),
|
||||
};
|
||||
struct thread *thread = machine__find_thread(trace->host, pids[0], pids[0]);
|
||||
|
||||
while (thread && nr < ARRAY_SIZE(pids)) {
|
||||
struct thread *parent = machine__find_thread(trace->host, thread->ppid, thread->ppid);
|
||||
|
||||
if (parent == NULL)
|
||||
break;
|
||||
|
||||
if (!strcmp(thread__comm_str(parent), "sshd")) {
|
||||
pids[nr++] = parent->tid;
|
||||
break;
|
||||
}
|
||||
thread = parent;
|
||||
}
|
||||
|
||||
return perf_evlist__set_filter_pids(trace->evlist, nr, pids);
|
||||
}
|
||||
|
||||
static int trace__run(struct trace *trace, int argc, const char **argv)
|
||||
{
|
||||
struct perf_evlist *evlist = trace->evlist;
|
||||
|
|
@ -2294,7 +2352,7 @@ static int trace__run(struct trace *trace, int argc, const char **argv)
|
|||
if (trace->filter_pids.nr > 0)
|
||||
err = perf_evlist__set_filter_pids(evlist, trace->filter_pids.nr, trace->filter_pids.entries);
|
||||
else if (thread_map__pid(evlist->threads, 0) == -1)
|
||||
err = perf_evlist__set_filter_pid(evlist, getpid());
|
||||
err = trace__set_filter_loop_pids(trace);
|
||||
|
||||
if (err < 0)
|
||||
goto out_error_mem;
|
||||
|
|
@ -2756,7 +2814,7 @@ static int trace__parse_events_option(const struct option *opt, const char *str,
|
|||
struct trace *trace = (struct trace *)opt->value;
|
||||
const char *s = str;
|
||||
char *sep = NULL, *lists[2] = { NULL, NULL, };
|
||||
int len = strlen(str), err = -1, list;
|
||||
int len = strlen(str) + 1, err = -1, list;
|
||||
char *strace_groups_dir = system_path(STRACE_GROUPS_DIR);
|
||||
char group_name[PATH_MAX];
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,15 @@
|
|||
#!/bin/sh
|
||||
|
||||
HEADERS='
|
||||
include/uapi/drm/drm.h
|
||||
include/uapi/drm/i915_drm.h
|
||||
include/uapi/linux/fcntl.h
|
||||
include/uapi/linux/kvm.h
|
||||
include/uapi/linux/perf_event.h
|
||||
include/uapi/linux/sched.h
|
||||
include/uapi/linux/stat.h
|
||||
include/uapi/linux/vhost.h
|
||||
include/uapi/sound/asound.h
|
||||
include/linux/hash.h
|
||||
include/uapi/linux/hw_breakpoint.h
|
||||
arch/x86/include/asm/disabled-features.h
|
||||
|
|
@ -16,6 +22,7 @@ arch/x86/include/uapi/asm/perf_regs.h
|
|||
arch/x86/include/uapi/asm/kvm.h
|
||||
arch/x86/include/uapi/asm/kvm_perf.h
|
||||
arch/x86/include/uapi/asm/svm.h
|
||||
arch/x86/include/uapi/asm/unistd.h
|
||||
arch/x86/include/uapi/asm/vmx.h
|
||||
arch/powerpc/include/uapi/asm/kvm.h
|
||||
arch/s390/include/uapi/asm/kvm.h
|
||||
|
|
@ -29,12 +36,13 @@ include/asm-generic/bitops/__fls.h
|
|||
include/asm-generic/bitops/fls.h
|
||||
include/asm-generic/bitops/fls64.h
|
||||
include/linux/coresight-pmu.h
|
||||
include/uapi/asm-generic/ioctls.h
|
||||
include/uapi/asm-generic/mman-common.h
|
||||
'
|
||||
|
||||
check () {
|
||||
file=$1
|
||||
opts=
|
||||
opts="--ignore-blank-lines --ignore-space-change"
|
||||
|
||||
shift
|
||||
while [ -n "$*" ]; do
|
||||
|
|
@ -45,7 +53,7 @@ check () {
|
|||
cmd="diff $opts ../$file ../../$file > /dev/null"
|
||||
|
||||
test -f ../../$file &&
|
||||
eval $cmd || echo "Warning: $file differs from kernel" >&2
|
||||
eval $cmd || echo "Warning: Kernel ABI header at 'tools/$file' differs from latest version at '$file'" >&2
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -55,7 +63,7 @@ for i in $HEADERS; do
|
|||
done
|
||||
|
||||
# diff with extra ignore lines
|
||||
check arch/x86/lib/memcpy_64.S -B -I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>"
|
||||
check arch/x86/lib/memset_64.S -B -I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>"
|
||||
check include/uapi/asm-generic/mman.h -B -I "^#include <\(uapi/\)*asm-generic/mman-common.h>"
|
||||
check include/uapi/linux/mman.h -B -I "^#include <\(uapi/\)*asm/mman.h>"
|
||||
check arch/x86/lib/memcpy_64.S -I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>"
|
||||
check arch/x86/lib/memset_64.S -I "^EXPORT_SYMBOL" -I "^#include <asm/export.h>"
|
||||
check include/uapi/asm-generic/mman.h -I "^#include <\(uapi/\)*asm-generic/mman-common.h>"
|
||||
check include/uapi/linux/mman.h -I "^#include <\(uapi/\)*asm/mman.h>"
|
||||
|
|
|
|||
|
|
@ -9,16 +9,6 @@
|
|||
#include <linux/perf_event.h>
|
||||
#include <asm/barrier.h>
|
||||
|
||||
#if defined(__i386__)
|
||||
#define cpu_relax() asm volatile("rep; nop" ::: "memory");
|
||||
#define CPUINFO_PROC {"model name"}
|
||||
#endif
|
||||
|
||||
#if defined(__x86_64__)
|
||||
#define cpu_relax() asm volatile("rep; nop" ::: "memory");
|
||||
#define CPUINFO_PROC {"model name"}
|
||||
#endif
|
||||
|
||||
#ifdef __powerpc__
|
||||
#define CPUINFO_PROC {"cpu"}
|
||||
#endif
|
||||
|
|
@ -43,19 +33,10 @@
|
|||
#define CPUINFO_PROC {"cpu model"}
|
||||
#endif
|
||||
|
||||
#ifdef __ia64__
|
||||
#define cpu_relax() asm volatile ("hint @pause" ::: "memory")
|
||||
#define CPUINFO_PROC {"model name"}
|
||||
#endif
|
||||
|
||||
#ifdef __arm__
|
||||
#define CPUINFO_PROC {"model name", "Processor"}
|
||||
#endif
|
||||
|
||||
#ifdef __aarch64__
|
||||
#define cpu_relax() asm volatile("yield" ::: "memory")
|
||||
#endif
|
||||
|
||||
#ifdef __mips__
|
||||
#define CPUINFO_PROC {"cpu model"}
|
||||
#endif
|
||||
|
|
@ -72,13 +53,8 @@
|
|||
#define CPUINFO_PROC {"core ID"}
|
||||
#endif
|
||||
|
||||
#ifdef __tile__
|
||||
#define cpu_relax() asm volatile ("mfspr zero, PASS" ::: "memory")
|
||||
#define CPUINFO_PROC {"model name"}
|
||||
#endif
|
||||
|
||||
#ifndef cpu_relax
|
||||
#define cpu_relax() barrier()
|
||||
#ifndef CPUINFO_PROC
|
||||
#define CPUINFO_PROC { "model name", }
|
||||
#endif
|
||||
|
||||
static inline int
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ struct pager_config {
|
|||
static int pager_command_config(const char *var, const char *value, void *data)
|
||||
{
|
||||
struct pager_config *c = data;
|
||||
if (!prefixcmp(var, "pager.") && !strcmp(var + 6, c->cmd))
|
||||
if (strstarts(var, "pager.") && !strcmp(var + 6, c->cmd))
|
||||
c->val = perf_config_bool(var, value);
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -108,9 +108,9 @@ static int check_pager_config(const char *cmd)
|
|||
static int browser_command_config(const char *var, const char *value, void *data)
|
||||
{
|
||||
struct pager_config *c = data;
|
||||
if (!prefixcmp(var, "tui.") && !strcmp(var + 4, c->cmd))
|
||||
if (strstarts(var, "tui.") && !strcmp(var + 4, c->cmd))
|
||||
c->val = perf_config_bool(var, value);
|
||||
if (!prefixcmp(var, "gtk.") && !strcmp(var + 4, c->cmd))
|
||||
if (strstarts(var, "gtk.") && !strcmp(var + 4, c->cmd))
|
||||
c->val = perf_config_bool(var, value) ? 2 : 0;
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -192,7 +192,7 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)
|
|||
/*
|
||||
* Check remaining flags.
|
||||
*/
|
||||
if (!prefixcmp(cmd, CMD_EXEC_PATH)) {
|
||||
if (strstarts(cmd, CMD_EXEC_PATH)) {
|
||||
cmd += strlen(CMD_EXEC_PATH);
|
||||
if (*cmd == '=')
|
||||
set_argv_exec_path(cmd + 1);
|
||||
|
|
@ -229,7 +229,7 @@ static int handle_options(const char ***argv, int *argc, int *envchanged)
|
|||
*envchanged = 1;
|
||||
(*argv)++;
|
||||
(*argc)--;
|
||||
} else if (!prefixcmp(cmd, CMD_DEBUGFS_DIR)) {
|
||||
} else if (strstarts(cmd, CMD_DEBUGFS_DIR)) {
|
||||
tracing_path_set(cmd + strlen(CMD_DEBUGFS_DIR));
|
||||
fprintf(stderr, "dir: %s\n", tracing_path);
|
||||
if (envchanged)
|
||||
|
|
@ -470,14 +470,14 @@ int main(int argc, const char **argv)
|
|||
* So we just directly call the internal command handler, and
|
||||
* die if that one cannot handle it.
|
||||
*/
|
||||
if (!prefixcmp(cmd, "perf-")) {
|
||||
if (strstarts(cmd, "perf-")) {
|
||||
cmd += 5;
|
||||
argv[0] = cmd;
|
||||
handle_internal_command(argc, argv);
|
||||
fprintf(stderr, "cannot handle %s internally", cmd);
|
||||
goto out;
|
||||
}
|
||||
if (!prefixcmp(cmd, "trace")) {
|
||||
if (strstarts(cmd, "trace")) {
|
||||
#ifdef HAVE_LIBAUDIT_SUPPORT
|
||||
setup_path();
|
||||
argv[0] = "trace";
|
||||
|
|
@ -495,7 +495,7 @@ int main(int argc, const char **argv)
|
|||
commit_pager_choice();
|
||||
|
||||
if (argc > 0) {
|
||||
if (!prefixcmp(argv[0], "--"))
|
||||
if (strstarts(argv[0], "--"))
|
||||
argv[0] += 2;
|
||||
} else {
|
||||
/* The user didn't specify a command; give them help */
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
#include <linux/perf_event.h>
|
||||
|
||||
extern bool test_attr__enabled;
|
||||
void test_attr__ready(void);
|
||||
void test_attr__init(void);
|
||||
void test_attr__open(struct perf_event_attr *attr, pid_t pid, int cpu,
|
||||
int fd, int group_fd, unsigned long flags);
|
||||
|
|
|
|||
|
|
@ -85,10 +85,6 @@ users to specify events by their name:
|
|||
|
||||
where 'pm_1plus_ppc_cmpl' is a Power8 PMU event.
|
||||
|
||||
In case of errors when processing files in the tools/perf/pmu-events/arch
|
||||
directory, 'jevents' tries to create an empty mapping file to allow the perf
|
||||
build to succeed even if the PMU event aliases cannot be used.
|
||||
|
||||
However some errors in processing may cause the perf build to fail.
|
||||
|
||||
Mapfile format
|
||||
|
|
|
|||
|
|
@ -13,9 +13,13 @@
|
|||
#
|
||||
|
||||
# Power8 entries
|
||||
004b0000,1,power8.json,core
|
||||
004b0201,1,power8.json,core
|
||||
004c0000,1,power8.json,core
|
||||
004d0000,1,power8.json,core
|
||||
004d0100,1,power8.json,core
|
||||
004d0200,1,power8.json,core
|
||||
004b0000,1,power8,core
|
||||
004b0201,1,power8,core
|
||||
004c0000,1,power8,core
|
||||
004d0000,1,power8,core
|
||||
004d0100,1,power8,core
|
||||
004d0200,1,power8,core
|
||||
004c0100,1,power8,core
|
||||
004e0100,1,power9,core
|
||||
004e0200,1,power9,core
|
||||
004e1200,1,power9,core
|
||||
|
|
|
|||
|
137
tools/perf/pmu-events/arch/powerpc/power9/cache.json
Normal file
137
tools/perf/pmu-events/arch/powerpc/power9/cache.json
Normal file
|
|
@ -0,0 +1,137 @@
|
|||
[
|
||||
{,
|
||||
"EventCode": "0x300F4",
|
||||
"EventName": "PM_THRD_CONC_RUN_INST",
|
||||
"BriefDescription": "PPC Instructions Finished by this thread when all threads in the core had the run-latch set"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1E056",
|
||||
"EventName": "PM_CMPLU_STALL_FLUSH_ANY_THREAD",
|
||||
"BriefDescription": "Cycles in which the NTC instruction is not allowed to complete because any of the 4 threads in the same core suffered a flush, which blocks completion"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D016",
|
||||
"EventName": "PM_CMPLU_STALL_FXLONG",
|
||||
"BriefDescription": "Completion stall due to a long latency scalar fixed point instruction (division, square root)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2D016",
|
||||
"EventName": "PM_CMPLU_STALL_FXU",
|
||||
"BriefDescription": "Finish stall due to a scalar fixed point or CR instruction in the execution pipeline. These instructions get routed to the ALU, ALU2, and DIV pipes"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1D15C",
|
||||
"EventName": "PM_MRK_DTLB_MISS_1G",
|
||||
"BriefDescription": "Marked Data TLB reload (after a miss) page size 2M. Implies radix translation was used"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D12A",
|
||||
"EventName": "PM_MRK_DATA_FROM_RL4_CYC",
|
||||
"BriefDescription": "Duration in cycles to reload from another chip's L4 on the same Node or Group ( Remote) due to a marked load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1003C",
|
||||
"EventName": "PM_CMPLU_STALL_DMISS_L2L3",
|
||||
"BriefDescription": "Completion stall by Dcache miss which resolved in L2/L3"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4C014",
|
||||
"EventName": "PM_CMPLU_STALL_LMQ_FULL",
|
||||
"BriefDescription": "Finish stall because the NTF instruction was a load that missed in the L1 and the LMQ was unable to accept this load miss request because it was full"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x14048",
|
||||
"EventName": "PM_INST_FROM_ON_CHIP_CACHE",
|
||||
"BriefDescription": "The processor's Instruction cache was reloaded either shared or modified data from another core's L2/L3 on the same chip due to an instruction fetch (not prefetch)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D014",
|
||||
"EventName": "PM_CMPLU_STALL_LOAD_FINISH",
|
||||
"BriefDescription": "Finish stall because the NTF instruction was a load instruction with all its dependencies satisfied just going through the LSU pipe to finish"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2404A",
|
||||
"EventName": "PM_INST_FROM_RL4",
|
||||
"BriefDescription": "The processor's Instruction cache was reloaded from another chip's L4 on the same Node or Group ( Remote) due to an instruction fetch (not prefetch)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1404A",
|
||||
"EventName": "PM_INST_FROM_RL2L3_SHR",
|
||||
"BriefDescription": "The processor's Instruction cache was reloaded with Shared (S) data from another chip's L2 or L3 on the same Node or Group (Remote), as this chip due to an instruction fetch (not prefetch)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x401EA",
|
||||
"EventName": "PM_THRESH_EXC_128",
|
||||
"BriefDescription": "Threshold counter exceeded a value of 128"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x400F6",
|
||||
"EventName": "PM_BR_MPRED_CMPL",
|
||||
"BriefDescription": "Number of Branch Mispredicts"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2F140",
|
||||
"EventName": "PM_MRK_DPTEG_FROM_L2_MEPF",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB from local core's L2 hit without dispatch conflicts on Mepf state. due to a marked data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x101E6",
|
||||
"EventName": "PM_THRESH_EXC_4096",
|
||||
"BriefDescription": "Threshold counter exceed a count of 4096"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3D156",
|
||||
"EventName": "PM_MRK_DTLB_MISS_64K",
|
||||
"BriefDescription": "Marked Data TLB Miss page size 64K"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4C15E",
|
||||
"EventName": "PM_MRK_DTLB_MISS_16M",
|
||||
"BriefDescription": "Marked Data TLB Miss page size 16M"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2D15E",
|
||||
"EventName": "PM_MRK_DTLB_MISS_16G",
|
||||
"BriefDescription": "Marked Data TLB Miss page size 16G"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3F14A",
|
||||
"EventName": "PM_MRK_DPTEG_FROM_RMEM",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB from another chip's memory on the same Node or Group ( Remote) due to a marked data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4C016",
|
||||
"EventName": "PM_CMPLU_STALL_DMISS_L2L3_CONFLICT",
|
||||
"BriefDescription": "Completion stall due to cache miss that resolves in the L2 or L3 with a conflict"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2C01A",
|
||||
"EventName": "PM_CMPLU_STALL_LHS",
|
||||
"BriefDescription": "Finish stall because the NTF instruction was a load that hit on an older store and it was waiting for store data"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x401E4",
|
||||
"EventName": "PM_MRK_DTLB_MISS",
|
||||
"BriefDescription": "Marked dtlb miss"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x24046",
|
||||
"EventName": "PM_INST_FROM_RL2L3_MOD",
|
||||
"BriefDescription": "The processor's Instruction cache was reloaded with Modified (M) data from another chip's L2 or L3 on the same Node or Group (Remote), as this chip due to an instruction fetch (not prefetch)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1002A",
|
||||
"EventName": "PM_CMPLU_STALL_LARX",
|
||||
"BriefDescription": "Finish stall because the NTF instruction was a larx waiting to be satisfied"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3006C",
|
||||
"EventName": "PM_RUN_CYC_SMT2_MODE",
|
||||
"BriefDescription": "Cycles in which this thread's run latch is set and the core is in SMT2 mode"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1C058",
|
||||
"EventName": "PM_DTLB_MISS_16G",
|
||||
"BriefDescription": "Data TLB Miss page size 16G"
|
||||
}
|
||||
]
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
[
|
||||
{,
|
||||
"EventCode": "0x1415A",
|
||||
"EventName": "PM_MRK_DATA_FROM_L2_DISP_CONFLICT_LDHITST_CYC",
|
||||
"BriefDescription": "Duration in cycles to reload from local core's L2 with load hit store conflict due to a marked load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x10058",
|
||||
"EventName": "PM_MEM_LOC_THRESH_IFU",
|
||||
"BriefDescription": "Local Memory above threshold for IFU speculation control"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2D028",
|
||||
"EventName": "PM_RADIX_PWC_L2_PDE_FROM_L2",
|
||||
"BriefDescription": "A Page Directory Entry was reloaded to a level 2 page walk cache from the core's L2 data cache"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x30012",
|
||||
"EventName": "PM_FLUSH_COMPLETION",
|
||||
"BriefDescription": "The instruction that was next to complete did not complete because it suffered a flush"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2D154",
|
||||
"EventName": "PM_MRK_DERAT_MISS_64K",
|
||||
"BriefDescription": "Marked Data ERAT Miss (Data TLB Access) page size 64K"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4016E",
|
||||
"EventName": "PM_THRESH_NOT_MET",
|
||||
"BriefDescription": "Threshold counter did not meet threshold"
|
||||
}
|
||||
]
|
||||
377
tools/perf/pmu-events/arch/powerpc/power9/frontend.json
Normal file
377
tools/perf/pmu-events/arch/powerpc/power9/frontend.json
Normal file
|
|
@ -0,0 +1,377 @@
|
|||
[
|
||||
{,
|
||||
"EventCode": "0x3E15C",
|
||||
"EventName": "PM_MRK_L2_TM_ST_ABORT_SISTER",
|
||||
"BriefDescription": "TM marked store abort for this thread"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x25044",
|
||||
"EventName": "PM_IPTEG_FROM_L31_MOD",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB with Modified (M) data from another core's L3 on the same chip due to a instruction side request"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x101E8",
|
||||
"EventName": "PM_THRESH_EXC_256",
|
||||
"BriefDescription": "Threshold counter exceed a count of 256"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4504E",
|
||||
"EventName": "PM_IPTEG_FROM_L3MISS",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB from a location other than the local core's L3 due to a instruction side request"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1006A",
|
||||
"EventName": "PM_NTC_ISSUE_HELD_DARQ_FULL",
|
||||
"BriefDescription": "The NTC instruction is being held at dispatch because there are no slots in the DARQ for it"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4E016",
|
||||
"EventName": "PM_CMPLU_STALL_LSAQ_ARB",
|
||||
"BriefDescription": "Finish stall because the NTF instruction was a load or store that was held in LSAQ because an older instruction from SRQ or LRQ won arbitration to the LSU pipe when this instruction tried to launch"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1001A",
|
||||
"EventName": "PM_LSU_SRQ_FULL_CYC",
|
||||
"BriefDescription": "Cycles in which the Store Queue is full on all 4 slices. This is event is not per thread. All the threads will see the same count for this core resource"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1E15E",
|
||||
"EventName": "PM_MRK_L2_TM_REQ_ABORT",
|
||||
"BriefDescription": "TM abort"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x34052",
|
||||
"EventName": "PM_INST_SYS_PUMP_MPRED",
|
||||
"BriefDescription": "Final Pump Scope (system) mispredicted. Either the original scope was too small (Chip/Group) or the original scope was System and it should have been smaller. Counts for an instruction fetch"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x20114",
|
||||
"EventName": "PM_MRK_L2_RC_DISP",
|
||||
"BriefDescription": "Marked Instruction RC dispatched in L2"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4C044",
|
||||
"EventName": "PM_DATA_FROM_L31_ECO_MOD",
|
||||
"BriefDescription": "The processor's data cache was reloaded with Modified (M) data from another core's ECO L3 on the same chip due to a demand load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1C044",
|
||||
"EventName": "PM_DATA_FROM_L3_NO_CONFLICT",
|
||||
"BriefDescription": "The processor's data cache was reloaded from local core's L3 without conflict due to a demand load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x44050",
|
||||
"EventName": "PM_INST_SYS_PUMP_MPRED_RTY",
|
||||
"BriefDescription": "Final Pump Scope (system) ended up larger than Initial Pump Scope (Chip/Group) for an instruction fetch"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x30154",
|
||||
"EventName": "PM_MRK_FAB_RSP_DCLAIM",
|
||||
"BriefDescription": "Marked store had to do a dclaim"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x30014",
|
||||
"EventName": "PM_CMPLU_STALL_STORE_FIN_ARB",
|
||||
"BriefDescription": "Finish stall because the NTF instruction was a store waiting for a slot in the store finish pipe. This means the instruction is ready to finish but there are instructions ahead of it, using the finish pipe"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3E054",
|
||||
"EventName": "PM_LD_MISS_L1",
|
||||
"BriefDescription": "Load Missed L1, counted at execution time (can be greater than loads finished). LMQ merges are not included in this count. i.e. if a load instruction misses on an address that is already allocated on the LMQ, this event will not increment for that load). Note that this count is per slice, so if a load spans multiple slices this event will increment multiple times for a single load."
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x400F0",
|
||||
"EventName": "PM_LD_MISS_L1",
|
||||
"BriefDescription": "Load Missed L1, counted at execution time (can be greater than loads finished). LMQ merges are not included in this count. i.e. if a load instruction misses on an address that is already allocated on the LMQ, this event will not increment for that load). Note that this count is per slice, so if a load spans multiple slices this event will increment multiple times for a single load."
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2E01A",
|
||||
"EventName": "PM_CMPLU_STALL_LSU_FLUSH_NEXT",
|
||||
"BriefDescription": "Completion stall of one cycle because the LSU requested to flush the next iop in the sequence. It takes 1 cycle for the ISU to process this request before the LSU instruction is allowed to complete"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2D01C",
|
||||
"EventName": "PM_CMPLU_STALL_STCX",
|
||||
"BriefDescription": "Finish stall because the NTF instruction was a stcx waiting for response from L2"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2C010",
|
||||
"EventName": "PM_CMPLU_STALL_LSU",
|
||||
"BriefDescription": "Completion stall by LSU instruction"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2C042",
|
||||
"EventName": "PM_DATA_FROM_L3_MEPF",
|
||||
"BriefDescription": "The processor's data cache was reloaded from local core's L3 without dispatch conflicts hit on Mepf state due to a demand load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4E012",
|
||||
"EventName": "PM_CMPLU_STALL_MTFPSCR",
|
||||
"BriefDescription": "Completion stall because the ISU is updating the register and notifying the Effective Address Table (EAT)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x100F2",
|
||||
"EventName": "PM_1PLUS_PPC_CMPL",
|
||||
"BriefDescription": "1 or more ppc insts finished"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3001C",
|
||||
"EventName": "PM_LSU_REJECT_LMQ_FULL",
|
||||
"BriefDescription": "LSU Reject due to LMQ full (up to 4 per cycles)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x15046",
|
||||
"EventName": "PM_IPTEG_FROM_L31_SHR",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB with Shared (S) data from another core's L3 on the same chip due to a instruction side request"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1015E",
|
||||
"EventName": "PM_MRK_FAB_RSP_RD_T_INTV",
|
||||
"BriefDescription": "Sampled Read got a T intervention"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x101EC",
|
||||
"EventName": "PM_THRESH_MET",
|
||||
"BriefDescription": "threshold exceeded"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x10020",
|
||||
"EventName": "PM_PMC4_REWIND",
|
||||
"BriefDescription": "PMC4 Rewind Event"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x301EA",
|
||||
"EventName": "PM_THRESH_EXC_1024",
|
||||
"BriefDescription": "Threshold counter exceeded a value of 1024"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x34056",
|
||||
"EventName": "PM_CMPLU_STALL_LSU_MFSPR",
|
||||
"BriefDescription": "Finish stall because the NTF instruction was a mfspr instruction targeting an LSU SPR and it was waiting for the register data to be returned"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x44056",
|
||||
"EventName": "PM_VECTOR_ST_CMPL",
|
||||
"BriefDescription": "Number of vector store instructions completed"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2C124",
|
||||
"EventName": "PM_MRK_DATA_FROM_L2_DISP_CONFLICT_OTHER",
|
||||
"BriefDescription": "The processor's data cache was reloaded from local core's L2 with dispatch conflict due to a marked load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4C12A",
|
||||
"EventName": "PM_MRK_DATA_FROM_RL2L3_SHR_CYC",
|
||||
"BriefDescription": "Duration in cycles to reload with Shared (S) data from another chip's L2 or L3 on the same Node or Group (Remote), as this chip due to a marked load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3C056",
|
||||
"EventName": "PM_DTLB_MISS_64K",
|
||||
"BriefDescription": "Data TLB Miss page size 64K"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x30060",
|
||||
"EventName": "PM_TM_TRANS_RUN_INST",
|
||||
"BriefDescription": "Run instructions completed in transactional state (gated by the run latch)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2C014",
|
||||
"EventName": "PM_CMPLU_STALL_STORE_FINISH",
|
||||
"BriefDescription": "Finish stall because the NTF instruction was a store with all its dependencies met, just waiting to go through the LSU pipe to finish"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3515A",
|
||||
"EventName": "PM_MRK_DATA_FROM_ON_CHIP_CACHE_CYC",
|
||||
"BriefDescription": "Duration in cycles to reload either shared or modified data from another core's L2/L3 on the same chip due to a marked load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x34050",
|
||||
"EventName": "PM_INST_SYS_PUMP_CPRED",
|
||||
"BriefDescription": "Initial and Final Pump Scope was system pump (prediction=correct) for an instruction fetch"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3015E",
|
||||
"EventName": "PM_MRK_FAB_RSP_CLAIM_RTY",
|
||||
"BriefDescription": "Sampled store did a rwitm and got a rty"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x0",
|
||||
"EventName": "PM_SUSPENDED",
|
||||
"BriefDescription": "Counter OFF"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x10010",
|
||||
"EventName": "PM_PMC4_OVERFLOW",
|
||||
"BriefDescription": "Overflow from counter 4"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3E04A",
|
||||
"EventName": "PM_DPTEG_FROM_RMEM",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB from another chip's memory on the same Node or Group ( Remote) due to a data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2F152",
|
||||
"EventName": "PM_MRK_FAB_RSP_DCLAIM_CYC",
|
||||
"BriefDescription": "cycles L2 RC took for a dclaim"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x10004",
|
||||
"EventName": "PM_CMPLU_STALL_LRQ_OTHER",
|
||||
"BriefDescription": "Finish stall due to LRQ miscellaneous reasons, lost arbitration to LMQ slot, bank collisions, set prediction cleanup, set prediction multihit and others"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4F150",
|
||||
"EventName": "PM_MRK_FAB_RSP_RWITM_CYC",
|
||||
"BriefDescription": "cycles L2 RC took for a rwitm"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4E042",
|
||||
"EventName": "PM_DPTEG_FROM_L3",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB from local core's L3 due to a data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1F054",
|
||||
"EventName": "PM_TLB_HIT",
|
||||
"BriefDescription": "Number of times the TLB had the data required by the instruction. Applies to both HPT and RPT"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2C01E",
|
||||
"EventName": "PM_CMPLU_STALL_SYNC_PMU_INT",
|
||||
"BriefDescription": "Cycles in which the NTC instruction is waiting for a synchronous PMU interrupt"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x24050",
|
||||
"EventName": "PM_IOPS_CMPL",
|
||||
"BriefDescription": "Internal Operations completed"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1515C",
|
||||
"EventName": "PM_SYNC_MRK_BR_MPRED",
|
||||
"BriefDescription": "Marked Branch mispredict that can cause a synchronous interrupt"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x300FA",
|
||||
"EventName": "PM_INST_FROM_L3MISS",
|
||||
"BriefDescription": "Marked instruction was reloaded from a location beyond the local chiplet"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x15044",
|
||||
"EventName": "PM_IPTEG_FROM_L3_NO_CONFLICT",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB from local core's L3 without conflict due to a instruction side request"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x15152",
|
||||
"EventName": "PM_SYNC_MRK_BR_LINK",
|
||||
"BriefDescription": "Marked Branch and link branch that can cause a synchronous interrupt"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1E050",
|
||||
"EventName": "PM_CMPLU_STALL_TEND",
|
||||
"BriefDescription": "Finish stall because the NTF instruction was a tend instruction awaiting response from L2"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1013E",
|
||||
"EventName": "PM_MRK_LD_MISS_EXPOSED_CYC",
|
||||
"BriefDescription": "Marked Load exposed Miss (use edge detect to count #)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x25042",
|
||||
"EventName": "PM_IPTEG_FROM_L3_MEPF",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB from local core's L3 without dispatch conflicts hit on Mepf state. due to a instruction side request"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x14054",
|
||||
"EventName": "PM_INST_PUMP_CPRED",
|
||||
"BriefDescription": "Pump prediction correct. Counts across all types of pumps for an instruction fetch"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4015E",
|
||||
"EventName": "PM_MRK_FAB_RSP_RD_RTY",
|
||||
"BriefDescription": "Sampled L2 reads retry count"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x45048",
|
||||
"EventName": "PM_IPTEG_FROM_DL2L3_MOD",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB with Modified (M) data from another chip's L2 or L3 on a different Node or Group (Distant), as this chip due to a instruction side request"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x44052",
|
||||
"EventName": "PM_INST_PUMP_MPRED",
|
||||
"BriefDescription": "Pump misprediction. Counts across all types of pumps for an instruction fetch"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x30026",
|
||||
"EventName": "PM_CMPLU_STALL_STORE_DATA",
|
||||
"BriefDescription": "Finish stall because the next to finish instruction was a store waiting on data"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x301E6",
|
||||
"EventName": "PM_MRK_DERAT_MISS",
|
||||
"BriefDescription": "Erat Miss (TLB Access) All page sizes"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x24154",
|
||||
"EventName": "PM_THRESH_ACC",
|
||||
"BriefDescription": "This event increments every time the threshold event counter ticks. Thresholding must be enabled (via MMCRA) and the thresholding start event must occur for this counter to increment. It will stop incrementing when the thresholding stop event occurs or when thresholding is disabled, until the next time a configured thresholding start event occurs."
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2015E",
|
||||
"EventName": "PM_MRK_FAB_RSP_RWITM_RTY",
|
||||
"BriefDescription": "Sampled store did a rwitm and got a rty"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x200FA",
|
||||
"EventName": "PM_BR_TAKEN_CMPL",
|
||||
"BriefDescription": "New event for Branch Taken"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x35044",
|
||||
"EventName": "PM_IPTEG_FROM_L31_ECO_SHR",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB with Shared (S) data from another core's ECO L3 on the same chip due to a instruction side request"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4C010",
|
||||
"EventName": "PM_CMPLU_STALL_STORE_PIPE_ARB",
|
||||
"BriefDescription": "Finish stall because the NTF instruction was a store waiting for the next relaunch opportunity after an internal reject. This means the instruction is ready to relaunch and tried once but lost arbitration"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4C01C",
|
||||
"EventName": "PM_CMPLU_STALL_ST_FWD",
|
||||
"BriefDescription": "Completion stall due to store forward"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3515C",
|
||||
"EventName": "PM_MRK_DATA_FROM_RL4",
|
||||
"BriefDescription": "The processor's data cache was reloaded from another chip's L4 on the same Node or Group ( Remote) due to a marked load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2D14C",
|
||||
"EventName": "PM_MRK_DATA_FROM_L31_ECO_SHR",
|
||||
"BriefDescription": "The processor's data cache was reloaded with Shared (S) data from another core's ECO L3 on the same chip due to a marked load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x40116",
|
||||
"EventName": "PM_MRK_LARX_FIN",
|
||||
"BriefDescription": "Larx finished"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4C056",
|
||||
"EventName": "PM_DTLB_MISS_16M",
|
||||
"BriefDescription": "Data TLB Miss page size 16M"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1003A",
|
||||
"EventName": "PM_CMPLU_STALL_LSU_FIN",
|
||||
"BriefDescription": "Finish stall because the NTF instruction was an LSU op (other than a load or a store) with all its dependencies met and just going through the LSU pipe to finish"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3012A",
|
||||
"EventName": "PM_MRK_L2_RC_DONE",
|
||||
"BriefDescription": "Marked RC done"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x45044",
|
||||
"EventName": "PM_IPTEG_FROM_L31_ECO_MOD",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB with Modified (M) data from another core's ECO L3 on the same chip due to a instruction side request"
|
||||
}
|
||||
]
|
||||
647
tools/perf/pmu-events/arch/powerpc/power9/marked.json
Normal file
647
tools/perf/pmu-events/arch/powerpc/power9/marked.json
Normal file
|
|
@ -0,0 +1,647 @@
|
|||
[
|
||||
{,
|
||||
"EventCode": "0x3C052",
|
||||
"EventName": "PM_DATA_SYS_PUMP_MPRED",
|
||||
"BriefDescription": "Final Pump Scope (system) mispredicted. Either the original scope was too small (Chip/Group) or the original scope was System and it should have been smaller. Counts for a demand load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3013E",
|
||||
"EventName": "PM_MRK_STALL_CMPLU_CYC",
|
||||
"BriefDescription": "Number of cycles the marked instruction is experiencing a stall while it is next to complete (NTC)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4F056",
|
||||
"EventName": "PM_RADIX_PWC_L1_PDE_FROM_L3MISS",
|
||||
"BriefDescription": "A Page Directory Entry was reloaded to a level 1 page walk cache from beyond the core's L3 data cache. The source could be local/remote/distant memory or another core's cache"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x24158",
|
||||
"EventName": "PM_MRK_INST",
|
||||
"BriefDescription": "An instruction was marked. Includes both Random Instruction Sampling (RIS) at decode time and Random Event Sampling (RES) at the time the configured event happens"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1E046",
|
||||
"EventName": "PM_DPTEG_FROM_L31_SHR",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB with Shared (S) data from another core's L3 on the same chip due to a data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3C04A",
|
||||
"EventName": "PM_DATA_FROM_RMEM",
|
||||
"BriefDescription": "The processor's data cache was reloaded from another chip's memory on the same Node or Group ( Remote) due to a demand load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2C01C",
|
||||
"EventName": "PM_CMPLU_STALL_DMISS_REMOTE",
|
||||
"BriefDescription": "Completion stall by Dcache miss which resolved from remote chip (cache or memory)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x44040",
|
||||
"EventName": "PM_INST_FROM_L2_DISP_CONFLICT_OTHER",
|
||||
"BriefDescription": "The processor's Instruction cache was reloaded from local core's L2 with dispatch conflict due to an instruction fetch (not prefetch)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2E050",
|
||||
"EventName": "PM_DARQ0_7_9_ENTRIES",
|
||||
"BriefDescription": "Cycles in which 7,8, or 9 DARQ entries (out of 12) are in use"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2D02E",
|
||||
"EventName": "PM_RADIX_PWC_L3_PTE_FROM_L2",
|
||||
"BriefDescription": "A Page Table Entry was reloaded to a level 3 page walk cache from the core's L2 data cache. This implies that a level 4 PWC access was not necessary for this translation"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3F05E",
|
||||
"EventName": "PM_RADIX_PWC_L3_PTE_FROM_L3",
|
||||
"BriefDescription": "A Page Table Entry was reloaded to a level 3 page walk cache from the core's L3 data cache. This implies that a level 4 PWC access was not necessary for this translation"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2E01E",
|
||||
"EventName": "PM_CMPLU_STALL_NTC_FLUSH",
|
||||
"BriefDescription": "Completion stall due to ntc flush"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1F14C",
|
||||
"EventName": "PM_MRK_DPTEG_FROM_LL4",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB from the local chip's L4 cache due to a marked data side request.. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x20130",
|
||||
"EventName": "PM_MRK_INST_DECODED",
|
||||
"BriefDescription": "An instruction was marked at decode time. Random Instruction Sampling (RIS) only"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3F144",
|
||||
"EventName": "PM_MRK_DPTEG_FROM_L31_ECO_SHR",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB with Shared (S) data from another core's ECO L3 on the same chip due to a marked data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D058",
|
||||
"EventName": "PM_VECTOR_FLOP_CMPL",
|
||||
"BriefDescription": "Vector FP instruction completed"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x14040",
|
||||
"EventName": "PM_INST_FROM_L2_NO_CONFLICT",
|
||||
"BriefDescription": "The processor's Instruction cache was reloaded from local core's L2 without conflict due to an instruction fetch (not prefetch)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4404E",
|
||||
"EventName": "PM_INST_FROM_L3MISS_MOD",
|
||||
"BriefDescription": "The processor's Instruction cache was reloaded from a location other than the local core's L3 due to a instruction fetch"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3003A",
|
||||
"EventName": "PM_CMPLU_STALL_EXCEPTION",
|
||||
"BriefDescription": "Cycles in which the NTC instruction is not allowed to complete because it was interrupted by ANY exception, which has to be serviced before the instruction can complete"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4F144",
|
||||
"EventName": "PM_MRK_DPTEG_FROM_L31_ECO_MOD",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB with Modified (M) data from another core's ECO L3 on the same chip due to a marked data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3E044",
|
||||
"EventName": "PM_DPTEG_FROM_L31_ECO_SHR",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB with Shared (S) data from another core's ECO L3 on the same chip due to a data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x300F6",
|
||||
"EventName": "PM_L1_DCACHE_RELOAD_VALID",
|
||||
"BriefDescription": "DL1 reloaded due to Demand Load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1415E",
|
||||
"EventName": "PM_MRK_DATA_FROM_L3MISS_CYC",
|
||||
"BriefDescription": "Duration in cycles to reload from a location other than the local core's L3 due to a marked load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1E052",
|
||||
"EventName": "PM_CMPLU_STALL_SLB",
|
||||
"BriefDescription": "Finish stall because the NTF instruction was awaiting L2 response for an SLB"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4404C",
|
||||
"EventName": "PM_INST_FROM_DMEM",
|
||||
"BriefDescription": "The processor's Instruction cache was reloaded from another chip's memory on the same Node or Group (Distant) due to an instruction fetch (not prefetch)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3000E",
|
||||
"EventName": "PM_FXU_1PLUS_BUSY",
|
||||
"BriefDescription": "At least one of the 4 FXU units is busy"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2C048",
|
||||
"EventName": "PM_DATA_FROM_LMEM",
|
||||
"BriefDescription": "The processor's data cache was reloaded from the local chip's Memory due to a demand load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3000A",
|
||||
"EventName": "PM_CMPLU_STALL_PM",
|
||||
"BriefDescription": "Finish stall because the NTF instruction was issued to the Permute execution pipe and waiting to finish. Includes permute and decimal fixed point instructions (128 bit BCD arithmetic) + a few 128 bit fixpoint add/subtract instructions with carry. Not qualified by vector or multicycle"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1504E",
|
||||
"EventName": "PM_IPTEG_FROM_L2MISS",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB from a location other than the local core's L2 due to a instruction side request"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1C052",
|
||||
"EventName": "PM_DATA_GRP_PUMP_MPRED_RTY",
|
||||
"BriefDescription": "Final Pump Scope (Group) ended up larger than Initial Pump Scope (Chip) for a demand load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x30008",
|
||||
"EventName": "PM_DISP_STARVED",
|
||||
"BriefDescription": "Dispatched Starved"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x14042",
|
||||
"EventName": "PM_INST_FROM_L2",
|
||||
"BriefDescription": "The processor's Instruction cache was reloaded from local core's L2 due to an instruction fetch (not prefetch)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4000C",
|
||||
"EventName": "PM_FREQ_UP",
|
||||
"BriefDescription": "Power Management: Above Threshold A"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3C050",
|
||||
"EventName": "PM_DATA_SYS_PUMP_CPRED",
|
||||
"BriefDescription": "Initial and Final Pump Scope was system pump (prediction=correct) for a demand load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x25040",
|
||||
"EventName": "PM_IPTEG_FROM_L2_MEPF",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB from local core's L2 hit without dispatch conflicts on Mepf state. due to a instruction side request"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x10132",
|
||||
"EventName": "PM_MRK_INST_ISSUED",
|
||||
"BriefDescription": "Marked instruction issued"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1C046",
|
||||
"EventName": "PM_DATA_FROM_L31_SHR",
|
||||
"BriefDescription": "The processor's data cache was reloaded with Shared (S) data from another core's L3 on the same chip due to a demand load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2C044",
|
||||
"EventName": "PM_DATA_FROM_L31_MOD",
|
||||
"BriefDescription": "The processor's data cache was reloaded with Modified (M) data from another core's L3 on the same chip due to a demand load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2C04A",
|
||||
"EventName": "PM_DATA_FROM_RL4",
|
||||
"BriefDescription": "The processor's data cache was reloaded from another chip's L4 on the same Node or Group ( Remote) due to a demand load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x24044",
|
||||
"EventName": "PM_INST_FROM_L31_MOD",
|
||||
"BriefDescription": "The processor's Instruction cache was reloaded with Modified (M) data from another core's L3 on the same chip due to an instruction fetch (not prefetch)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4C050",
|
||||
"EventName": "PM_DATA_SYS_PUMP_MPRED_RTY",
|
||||
"BriefDescription": "Final Pump Scope (system) ended up larger than Initial Pump Scope (Chip/Group) for a demand load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2C052",
|
||||
"EventName": "PM_DATA_GRP_PUMP_MPRED",
|
||||
"BriefDescription": "Final Pump Scope (Group) ended up either larger or smaller than Initial Pump Scope for a demand load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2F148",
|
||||
"EventName": "PM_MRK_DPTEG_FROM_LMEM",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB from the local chip's Memory due to a marked data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D01A",
|
||||
"EventName": "PM_CMPLU_STALL_EIEIO",
|
||||
"BriefDescription": "Finish stall because the NTF instruction is an EIEIO waiting for response from L2"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4F14E",
|
||||
"EventName": "PM_MRK_DPTEG_FROM_L3MISS",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB from a location other than the local core's L3 due to a marked data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4F05A",
|
||||
"EventName": "PM_RADIX_PWC_L4_PTE_FROM_L3",
|
||||
"BriefDescription": "A Page Table Entry was reloaded to a level 4 page walk cache from the core's L3 data cache. This is the deepest level of PWC possible for a translation"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1F05A",
|
||||
"EventName": "PM_RADIX_PWC_L4_PTE_FROM_L2",
|
||||
"BriefDescription": "A Page Table Entry was reloaded to a level 4 page walk cache from the core's L2 data cache. This is the deepest level of PWC possible for a translation"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x30068",
|
||||
"EventName": "PM_L1_ICACHE_RELOADED_PREF",
|
||||
"BriefDescription": "Counts all Icache prefetch reloads ( includes demand turned into prefetch)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4C04A",
|
||||
"EventName": "PM_DATA_FROM_OFF_CHIP_CACHE",
|
||||
"BriefDescription": "The processor's data cache was reloaded either shared or modified data from another core's L2/L3 on a different chip (remote or distant) due to a demand load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x400FE",
|
||||
"EventName": "PM_DATA_FROM_MEMORY",
|
||||
"BriefDescription": "The processor's data cache was reloaded from a memory location including L4 from local remote or distant due to a demand load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3F058",
|
||||
"EventName": "PM_RADIX_PWC_L1_PDE_FROM_L3",
|
||||
"BriefDescription": "A Page Directory Entry was reloaded to a level 1 page walk cache from the core's L3 data cache"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D142",
|
||||
"EventName": "PM_MRK_DATA_FROM_L3",
|
||||
"BriefDescription": "The processor's data cache was reloaded from local core's L3 due to a marked load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x30050",
|
||||
"EventName": "PM_SYS_PUMP_CPRED",
|
||||
"BriefDescription": "Initial and Final Pump Scope was system pump for all data types excluding data prefetch (demand load,inst prefetch,inst fetch,xlate)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x30028",
|
||||
"EventName": "PM_CMPLU_STALL_SPEC_FINISH",
|
||||
"BriefDescription": "Finish stall while waiting for the non-speculative finish of either a stcx waiting for its result or a load waiting for non-critical sectors of data and ECC"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x400F4",
|
||||
"EventName": "PM_RUN_PURR",
|
||||
"BriefDescription": "Run_PURR"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3404C",
|
||||
"EventName": "PM_INST_FROM_DL4",
|
||||
"BriefDescription": "The processor's Instruction cache was reloaded from another chip's L4 on a different Node or Group (Distant) due to an instruction fetch (not prefetch)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3D05A",
|
||||
"EventName": "PM_NTC_ISSUE_HELD_OTHER",
|
||||
"BriefDescription": "The NTC instruction is being held at dispatch during regular pipeline cycles, or because the VSU is busy with multi-cycle instructions, or because of a write-back collision with VSU"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2E048",
|
||||
"EventName": "PM_DPTEG_FROM_LMEM",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB from the local chip's Memory due to a data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2D02A",
|
||||
"EventName": "PM_RADIX_PWC_L3_PDE_FROM_L2",
|
||||
"BriefDescription": "A Page Directory Entry was reloaded to a level 3 page walk cache from the core's L2 data cache"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1F05C",
|
||||
"EventName": "PM_RADIX_PWC_L3_PDE_FROM_L3",
|
||||
"BriefDescription": "A Page Directory Entry was reloaded to a level 3 page walk cache from the core's L3 data cache"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D04A",
|
||||
"EventName": "PM_DARQ0_0_3_ENTRIES",
|
||||
"BriefDescription": "Cycles in which 3 or less DARQ entries (out of 12) are in use"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1404C",
|
||||
"EventName": "PM_INST_FROM_LL4",
|
||||
"BriefDescription": "The processor's Instruction cache was reloaded from the local chip's L4 cache due to an instruction fetch (not prefetch)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x200FD",
|
||||
"EventName": "PM_L1_ICACHE_MISS",
|
||||
"BriefDescription": "Demand iCache Miss"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x34040",
|
||||
"EventName": "PM_INST_FROM_L2_DISP_CONFLICT_LDHITST",
|
||||
"BriefDescription": "The processor's Instruction cache was reloaded from local core's L2 with load hit store conflict due to an instruction fetch (not prefetch)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x20138",
|
||||
"EventName": "PM_MRK_ST_NEST",
|
||||
"BriefDescription": "Marked store sent to nest"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x44048",
|
||||
"EventName": "PM_INST_FROM_DL2L3_MOD",
|
||||
"BriefDescription": "The processor's Instruction cache was reloaded with Modified (M) data from another chip's L2 or L3 on a different Node or Group (Distant), as this chip due to an instruction fetch (not prefetch)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x35046",
|
||||
"EventName": "PM_IPTEG_FROM_L21_SHR",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB with Shared (S) data from another core's L2 on the same chip due to a instruction side request"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4C04E",
|
||||
"EventName": "PM_DATA_FROM_L3MISS_MOD",
|
||||
"BriefDescription": "The processor's data cache was reloaded from a location other than the local core's L3 due to a demand load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x401E0",
|
||||
"EventName": "PM_MRK_INST_CMPL",
|
||||
"BriefDescription": "marked instruction completed"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2C128",
|
||||
"EventName": "PM_MRK_DATA_FROM_DL2L3_SHR_CYC",
|
||||
"BriefDescription": "Duration in cycles to reload with Shared (S) data from another chip's L2 or L3 on a different Node or Group (Distant), as this chip due to a marked load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x34044",
|
||||
"EventName": "PM_INST_FROM_L31_ECO_SHR",
|
||||
"BriefDescription": "The processor's Instruction cache was reloaded with Shared (S) data from another core's ECO L3 on the same chip due to an instruction fetch (not prefetch)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4E018",
|
||||
"EventName": "PM_CMPLU_STALL_NTC_DISP_FIN",
|
||||
"BriefDescription": "Finish stall because the NTF instruction was one that must finish at dispatch."
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2E05E",
|
||||
"EventName": "PM_LMQ_EMPTY_CYC",
|
||||
"BriefDescription": "Cycles in which the LMQ has no pending load misses for this thread"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4C122",
|
||||
"EventName": "PM_DARQ1_0_3_ENTRIES",
|
||||
"BriefDescription": "Cycles in which 3 or fewer DARQ1 entries (out of 12) are in use"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4F058",
|
||||
"EventName": "PM_RADIX_PWC_L2_PTE_FROM_L3",
|
||||
"BriefDescription": "A Page Table Entry was reloaded to a level 2 page walk cache from the core's L3 data cache. This implies that level 3 and level 4 PWC accesses were not necessary for this translation"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x14046",
|
||||
"EventName": "PM_INST_FROM_L31_SHR",
|
||||
"BriefDescription": "The processor's Instruction cache was reloaded with Shared (S) data from another core's L3 on the same chip due to an instruction fetch (not prefetch)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3012C",
|
||||
"EventName": "PM_MRK_ST_FWD",
|
||||
"BriefDescription": "Marked st forwards"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x101E0",
|
||||
"EventName": "PM_MRK_INST_DISP",
|
||||
"BriefDescription": "The thread has dispatched a randomly sampled marked instruction"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1D058",
|
||||
"EventName": "PM_DARQ0_10_12_ENTRIES",
|
||||
"BriefDescription": "Cycles in which 10 or more DARQ entries (out of 12) are in use"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x300FE",
|
||||
"EventName": "PM_DATA_FROM_L3MISS",
|
||||
"BriefDescription": "Demand LD - L3 Miss (not L2 hit and not L3 hit)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x30006",
|
||||
"EventName": "PM_CMPLU_STALL_OTHER_CMPL",
|
||||
"BriefDescription": "Instructions the core completed while this tread was stalled"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1005C",
|
||||
"EventName": "PM_CMPLU_STALL_DP",
|
||||
"BriefDescription": "Finish stall because the NTF instruction was a scalar instruction issued to the Double Precision execution pipe and waiting to finish. Includes binary floating point instructions in 32 and 64 bit binary floating point format. Not qualified multicycle. Qualified by NOT vector"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1E042",
|
||||
"EventName": "PM_DPTEG_FROM_L2",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB from local core's L2 due to a data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1016E",
|
||||
"EventName": "PM_MRK_BR_CMPL",
|
||||
"BriefDescription": "Branch Instruction completed"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2013A",
|
||||
"EventName": "PM_MRK_BRU_FIN",
|
||||
"BriefDescription": "bru marked instr finish"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4F05E",
|
||||
"EventName": "PM_RADIX_PWC_L3_PTE_FROM_L3MISS",
|
||||
"BriefDescription": "A Page Table Entry was reloaded to a level 3 page walk cache from beyond the core's L3 data cache. This implies that a level 4 PWC access was not necessary for this translation. The source could be local/remote/distant memory or another core's cache"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x400FC",
|
||||
"EventName": "PM_ITLB_MISS",
|
||||
"BriefDescription": "ITLB Reloaded. Counts 1 per ITLB miss for HPT but multiple for radix depending on number of levels traveresed"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2D024",
|
||||
"EventName": "PM_RADIX_PWC_L2_HIT",
|
||||
"BriefDescription": "A radix translation attempt missed in the TLB but hit on both the first and second levels of page walk cache."
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3F056",
|
||||
"EventName": "PM_RADIX_PWC_L3_HIT",
|
||||
"BriefDescription": "A radix translation attempt missed in the TLB but hit on the first, second, and third levels of page walk cache."
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4E014",
|
||||
"EventName": "PM_TM_TX_PASS_RUN_INST",
|
||||
"BriefDescription": "Run instructions spent in successful transactions"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1E044",
|
||||
"EventName": "PM_DPTEG_FROM_L3_NO_CONFLICT",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB from local core's L3 without conflict due to a data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D05A",
|
||||
"EventName": "PM_NON_MATH_FLOP_CMPL",
|
||||
"BriefDescription": "Non FLOP operation completed"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x101E2",
|
||||
"EventName": "PM_MRK_BR_TAKEN_CMPL",
|
||||
"BriefDescription": "Marked Branch Taken completed"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3E158",
|
||||
"EventName": "PM_MRK_STCX_FAIL",
|
||||
"BriefDescription": "marked stcx failed"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1C048",
|
||||
"EventName": "PM_DATA_FROM_ON_CHIP_CACHE",
|
||||
"BriefDescription": "The processor's data cache was reloaded either shared or modified data from another core's L2/L3 on the same chip due to a demand load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1C054",
|
||||
"EventName": "PM_DATA_PUMP_CPRED",
|
||||
"BriefDescription": "Pump prediction correct. Counts across all types of pumps for a demand load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4405E",
|
||||
"EventName": "PM_DARQ_STORE_REJECT",
|
||||
"BriefDescription": "The DARQ attempted to transmit a store into an LSAQ or SRQ entry but It was rejected. Divide by PM_DARQ_STORE_XMIT to get reject ratio"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1C042",
|
||||
"EventName": "PM_DATA_FROM_L2",
|
||||
"BriefDescription": "The processor's data cache was reloaded from local core's L2 due to a demand load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1D14C",
|
||||
"EventName": "PM_MRK_DATA_FROM_LL4",
|
||||
"BriefDescription": "The processor's data cache was reloaded from the local chip's L4 cache due to a marked load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1006C",
|
||||
"EventName": "PM_RUN_CYC_ST_MODE",
|
||||
"BriefDescription": "Cycles run latch is set and core is in ST mode"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3C044",
|
||||
"EventName": "PM_DATA_FROM_L31_ECO_SHR",
|
||||
"BriefDescription": "The processor's data cache was reloaded with Shared (S) data from another core's ECO L3 on the same chip due to a demand load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4C052",
|
||||
"EventName": "PM_DATA_PUMP_MPRED",
|
||||
"BriefDescription": "Pump misprediction. Counts across all types of pumps for a demand load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x20050",
|
||||
"EventName": "PM_GRP_PUMP_CPRED",
|
||||
"BriefDescription": "Initial and Final Pump Scope and data sourced across this scope was group pump for all data types excluding data prefetch (demand load,inst prefetch,inst fetch,xlate)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1F150",
|
||||
"EventName": "PM_MRK_ST_L2DISP_TO_CMPL_CYC",
|
||||
"BriefDescription": "cycles from L2 rc disp to l2 rc completion"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4505A",
|
||||
"EventName": "PM_SP_FLOP_CMPL",
|
||||
"BriefDescription": "SP instruction completed"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4000A",
|
||||
"EventName": "PM_ISQ_36_44_ENTRIES",
|
||||
"BriefDescription": "Cycles in which 36 or more Issue Queue entries are in use. This is a shared event, not per thread. There are 44 issue queue entries across 4 slices in the whole core"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2C12E",
|
||||
"EventName": "PM_MRK_DATA_FROM_LL4_CYC",
|
||||
"BriefDescription": "Duration in cycles to reload from the local chip's L4 cache due to a marked load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2C058",
|
||||
"EventName": "PM_MEM_PREF",
|
||||
"BriefDescription": "Memory prefetch for this thread. Includes L4"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x40012",
|
||||
"EventName": "PM_L1_ICACHE_RELOADED_ALL",
|
||||
"BriefDescription": "Counts all Icache reloads includes demand, prefetch, prefetch turned into demand and demand turned into prefetch"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4003C",
|
||||
"EventName": "PM_DISP_HELD_SYNC_HOLD",
|
||||
"BriefDescription": "Cycles in which dispatch is held because of a synchronizing instruction in the pipeline"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3003C",
|
||||
"EventName": "PM_CMPLU_STALL_NESTED_TEND",
|
||||
"BriefDescription": "Completion stall because the ISU is updating the TEXASR to keep track of the nested tend and decrement the TEXASR nested level. This is a short delay"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3D05C",
|
||||
"EventName": "PM_DISP_HELD_HB_FULL",
|
||||
"BriefDescription": "Dispatch held due to History Buffer full. Could be GPR/VSR/VMR/FPR/CR/XVF; CR; XVF (XER/VSCR/FPSCR)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x30052",
|
||||
"EventName": "PM_SYS_PUMP_MPRED",
|
||||
"BriefDescription": "Final Pump Scope (system) mispredicted. Either the original scope was too small (Chip/Group) or the original scope was System and it should have been smaller. Counts for all data types excluding data prefetch (demand load,inst prefetch,inst fetch,xlate)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2E044",
|
||||
"EventName": "PM_DPTEG_FROM_L31_MOD",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB with Modified (M) data from another core's L3 on the same chip due to a data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x34048",
|
||||
"EventName": "PM_INST_FROM_DL2L3_SHR",
|
||||
"BriefDescription": "The processor's Instruction cache was reloaded with Shared (S) data from another chip's L2 or L3 on a different Node or Group (Distant), as this chip due to an instruction fetch (not prefetch)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x45042",
|
||||
"EventName": "PM_IPTEG_FROM_L3",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB from local core's L3 due to a instruction side request"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x15042",
|
||||
"EventName": "PM_IPTEG_FROM_L2",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB from local core's L2 due to a instruction side request"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1C05E",
|
||||
"EventName": "PM_MEM_LOC_THRESH_LSU_MED",
|
||||
"BriefDescription": "Local memory above threshold for data prefetch"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x40134",
|
||||
"EventName": "PM_MRK_INST_TIMEO",
|
||||
"BriefDescription": "marked Instruction finish timeout (instruction lost)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1002C",
|
||||
"EventName": "PM_L1_DCACHE_RELOADED_ALL",
|
||||
"BriefDescription": "L1 data cache reloaded for demand. If MMCR1[16] is 1, prefetches will be included as well"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x30130",
|
||||
"EventName": "PM_MRK_INST_FIN",
|
||||
"BriefDescription": "marked instruction finished"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1F14A",
|
||||
"EventName": "PM_MRK_DPTEG_FROM_RL2L3_SHR",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB with Shared (S) data from another chip's L2 or L3 on the same Node or Group (Remote), as this chip due to a marked data side request.. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3504E",
|
||||
"EventName": "PM_DARQ0_4_6_ENTRIES",
|
||||
"BriefDescription": "Cycles in which 4, 5, or 6 DARQ entries (out of 12) are in use"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x30064",
|
||||
"EventName": "PM_DARQ_STORE_XMIT",
|
||||
"BriefDescription": "The DARQ attempted to transmit a store into an LSAQ or SRQ entry. Includes rejects. Not qualified by thread, so it includes counts for the whole core"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x45046",
|
||||
"EventName": "PM_IPTEG_FROM_L21_MOD",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB with Modified (M) data from another core's L2 on the same chip due to a instruction side request"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2C016",
|
||||
"EventName": "PM_CMPLU_STALL_PASTE",
|
||||
"BriefDescription": "Finish stall because the NTF instruction was a paste waiting for response from L2"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x24156",
|
||||
"EventName": "PM_MRK_STCX_FIN",
|
||||
"BriefDescription": "Number of marked stcx instructions finished. This includes instructions in the speculative path of a branch that may be flushed"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x15150",
|
||||
"EventName": "PM_SYNC_MRK_PROBE_NOP",
|
||||
"BriefDescription": "Marked probeNops which can cause synchronous interrupts"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x301E4",
|
||||
"EventName": "PM_MRK_BR_MPRED_CMPL",
|
||||
"BriefDescription": "Marked Branch Mispredicted"
|
||||
}
|
||||
]
|
||||
132
tools/perf/pmu-events/arch/powerpc/power9/memory.json
Normal file
132
tools/perf/pmu-events/arch/powerpc/power9/memory.json
Normal file
|
|
@ -0,0 +1,132 @@
|
|||
[
|
||||
{,
|
||||
"EventCode": "0x3006E",
|
||||
"EventName": "PM_NEST_REF_CLK",
|
||||
"BriefDescription": "Multiply by 4 to obtain the number of PB cycles"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x20010",
|
||||
"EventName": "PM_PMC1_OVERFLOW",
|
||||
"BriefDescription": "Overflow from counter 1"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2005A",
|
||||
"EventName": "PM_DARQ1_7_9_ENTRIES",
|
||||
"BriefDescription": "Cycles in which 7 to 9 DARQ1 entries (out of 12) are in use"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3C048",
|
||||
"EventName": "PM_DATA_FROM_DL2L3_SHR",
|
||||
"BriefDescription": "The processor's data cache was reloaded with Shared (S) data from another chip's L2 or L3 on a different Node or Group (Distant), as this chip due to a demand load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x10008",
|
||||
"EventName": "PM_RUN_SPURR",
|
||||
"BriefDescription": "Run SPURR"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x200F6",
|
||||
"EventName": "PM_LSU_DERAT_MISS",
|
||||
"BriefDescription": "DERAT Reloaded due to a DERAT miss"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4C048",
|
||||
"EventName": "PM_DATA_FROM_DL2L3_MOD",
|
||||
"BriefDescription": "The processor's data cache was reloaded with Modified (M) data from another chip's L2 or L3 on a different Node or Group (Distant), as this chip due to a demand load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1D15E",
|
||||
"EventName": "PM_MRK_RUN_CYC",
|
||||
"BriefDescription": "Run cycles in which a marked instruction is in the pipeline"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4003E",
|
||||
"EventName": "PM_LD_CMPL",
|
||||
"BriefDescription": "count of Loads completed"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2D156",
|
||||
"EventName": "PM_MRK_DTLB_MISS_4K",
|
||||
"BriefDescription": "Marked Data TLB Miss page size 4k"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4C042",
|
||||
"EventName": "PM_DATA_FROM_L3",
|
||||
"BriefDescription": "The processor's data cache was reloaded from local core's L3 due to a demand load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D02C",
|
||||
"EventName": "PM_PMC1_REWIND",
|
||||
"BriefDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x15158",
|
||||
"EventName": "PM_SYNC_MRK_L2HIT",
|
||||
"BriefDescription": "Marked L2 Hits that can throw a synchronous interrupt"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3404A",
|
||||
"EventName": "PM_INST_FROM_RMEM",
|
||||
"BriefDescription": "The processor's Instruction cache was reloaded from another chip's memory on the same Node or Group ( Remote) due to an instruction fetch (not prefetch)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x301E2",
|
||||
"EventName": "PM_MRK_ST_CMPL",
|
||||
"BriefDescription": "Marked store completed and sent to nest"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1C050",
|
||||
"EventName": "PM_DATA_CHIP_PUMP_CPRED",
|
||||
"BriefDescription": "Initial and Final Pump Scope was chip pump (prediction=correct) for a demand load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4C040",
|
||||
"EventName": "PM_DATA_FROM_L2_DISP_CONFLICT_OTHER",
|
||||
"BriefDescription": "The processor's data cache was reloaded from local core's L2 with dispatch conflict due to a demand load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2E05C",
|
||||
"EventName": "PM_LSU_REJECT_ERAT_MISS",
|
||||
"BriefDescription": "LSU Reject due to ERAT (up to 4 per cycles)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1000A",
|
||||
"EventName": "PM_PMC3_REWIND",
|
||||
"BriefDescription": "PMC3 rewind event. A rewind happens when a speculative event (such as latency or CPI stack) is selected on PMC3 and the stall reason or reload source did not match the one programmed in PMC3. When this occurs, the count in PMC3 will not change."
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3C058",
|
||||
"EventName": "PM_LARX_FIN",
|
||||
"BriefDescription": "Larx finished"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1C040",
|
||||
"EventName": "PM_DATA_FROM_L2_NO_CONFLICT",
|
||||
"BriefDescription": "The processor's data cache was reloaded from local core's L2 without conflict due to a demand load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2C040",
|
||||
"EventName": "PM_DATA_FROM_L2_MEPF",
|
||||
"BriefDescription": "The processor's data cache was reloaded from local core's L2 hit without dispatch conflicts on Mepf state due to a demand load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2E05A",
|
||||
"EventName": "PM_LRQ_REJECT",
|
||||
"BriefDescription": "Internal LSU reject from LRQ. Rejects cause the load to go back to LRQ, but it stays contained within the LSU once it gets issued. This event counts the number of times the LRQ attempts to relaunch an instruction after a reject. Any load can suffer multiple rejects"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2C05C",
|
||||
"EventName": "PM_INST_GRP_PUMP_CPRED",
|
||||
"BriefDescription": "Initial and Final Pump Scope was group pump (prediction=correct) for an instruction fetch (demand only)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D056",
|
||||
"EventName": "PM_NON_FMA_FLOP_CMPL",
|
||||
"BriefDescription": "Non FMA instruction completed"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3E050",
|
||||
"EventName": "PM_DARQ1_4_6_ENTRIES",
|
||||
"BriefDescription": "Cycles in which 4, 5, or 6 DARQ1 entries (out of 12) are in use"
|
||||
}
|
||||
]
|
||||
2512
tools/perf/pmu-events/arch/powerpc/power9/other.json
Normal file
2512
tools/perf/pmu-events/arch/powerpc/power9/other.json
Normal file
File diff suppressed because it is too large
Load diff
557
tools/perf/pmu-events/arch/powerpc/power9/pipeline.json
Normal file
557
tools/perf/pmu-events/arch/powerpc/power9/pipeline.json
Normal file
|
|
@ -0,0 +1,557 @@
|
|||
[
|
||||
{,
|
||||
"EventCode": "0x4D04C",
|
||||
"EventName": "PM_DFU_BUSY",
|
||||
"BriefDescription": "Cycles in which all 4 Decimal Floating Point units are busy. The DFU is running at capacity"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x100F6",
|
||||
"EventName": "PM_IERAT_RELOAD",
|
||||
"BriefDescription": "Number of I-ERAT reloads"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x201E2",
|
||||
"EventName": "PM_MRK_LD_MISS_L1",
|
||||
"BriefDescription": "Marked DL1 Demand Miss counted at exec time. Note that this count is per slice, so if a load spans multiple slices this event will increment multiple times for a single load."
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x40010",
|
||||
"EventName": "PM_PMC3_OVERFLOW",
|
||||
"BriefDescription": "Overflow from counter 3"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1005A",
|
||||
"EventName": "PM_CMPLU_STALL_DFLONG",
|
||||
"BriefDescription": "Finish stall because the NTF instruction was a multi-cycle instruction issued to the Decimal Floating Point execution pipe and waiting to finish. Includes decimal floating point instructions + 128 bit binary floating point instructions. Qualified by multicycle"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D140",
|
||||
"EventName": "PM_MRK_DATA_FROM_ON_CHIP_CACHE",
|
||||
"BriefDescription": "The processor's data cache was reloaded either shared or modified data from another core's L2/L3 on the same chip due to a marked load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3F14C",
|
||||
"EventName": "PM_MRK_DPTEG_FROM_DL4",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB from another chip's L4 on a different Node or Group (Distant) due to a marked data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1E040",
|
||||
"EventName": "PM_DPTEG_FROM_L2_NO_CONFLICT",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB from local core's L2 without conflict due to a data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x24052",
|
||||
"EventName": "PM_FXU_IDLE",
|
||||
"BriefDescription": "Cycles in which FXU0, FXU1, FXU2, and FXU3 are all idle"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1E054",
|
||||
"EventName": "PM_CMPLU_STALL",
|
||||
"BriefDescription": "Nothing completed and ICT not empty"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2",
|
||||
"EventName": "PM_INST_CMPL",
|
||||
"BriefDescription": "Number of PowerPC Instructions that completed."
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3D058",
|
||||
"EventName": "PM_VSU_DP_FSQRT_FDIV",
|
||||
"BriefDescription": "vector versions of fdiv,fsqrt"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x10006",
|
||||
"EventName": "PM_DISP_HELD",
|
||||
"BriefDescription": "Dispatch Held"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3D154",
|
||||
"EventName": "PM_MRK_DERAT_MISS_16M",
|
||||
"BriefDescription": "Marked Data ERAT Miss (Data TLB Access) page size 16M"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x200F8",
|
||||
"EventName": "PM_EXT_INT",
|
||||
"BriefDescription": "external interrupt"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x20008",
|
||||
"EventName": "PM_ICT_EMPTY_CYC",
|
||||
"BriefDescription": "Cycles in which the ICT is completely empty. No itags are assigned to any thread"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4F146",
|
||||
"EventName": "PM_MRK_DPTEG_FROM_L21_MOD",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB with Modified (M) data from another core's L2 on the same chip due to a marked data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x10056",
|
||||
"EventName": "PM_MEM_READ",
|
||||
"BriefDescription": "Reads from Memory from this thread (includes data/inst/xlate/l1prefetch/inst prefetch). Includes L4"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3C04C",
|
||||
"EventName": "PM_DATA_FROM_DL4",
|
||||
"BriefDescription": "The processor's data cache was reloaded from another chip's L4 on a different Node or Group (Distant) due to a demand load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4E046",
|
||||
"EventName": "PM_DPTEG_FROM_L21_MOD",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB with Modified (M) data from another core's L2 on the same chip due to a data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2E016",
|
||||
"EventName": "PM_NTC_ISSUE_HELD_ARB",
|
||||
"BriefDescription": "The NTC instruction is being held at dispatch because it lost arbitration onto the issue pipe to another instruction (from the same thread or a different thread)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x15156",
|
||||
"EventName": "PM_SYNC_MRK_FX_DIVIDE",
|
||||
"BriefDescription": "Marked fixed point divide that can cause a synchronous interrupt"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1C056",
|
||||
"EventName": "PM_DERAT_MISS_4K",
|
||||
"BriefDescription": "Data ERAT Miss (Data TLB Access) page size 4K"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2F142",
|
||||
"EventName": "PM_MRK_DPTEG_FROM_L3_MEPF",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB from local core's L3 without dispatch conflicts hit on Mepf state. due to a marked data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x10024",
|
||||
"EventName": "PM_PMC5_OVERFLOW",
|
||||
"BriefDescription": "Overflow from counter 5"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2C018",
|
||||
"EventName": "PM_CMPLU_STALL_DMISS_L21_L31",
|
||||
"BriefDescription": "Completion stall by Dcache miss which resolved on chip ( excluding local L2/L3)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4006A",
|
||||
"EventName": "PM_IERAT_RELOAD_16M",
|
||||
"BriefDescription": "IERAT Reloaded (Miss) for a 16M page"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4E010",
|
||||
"EventName": "PM_ICT_NOSLOT_IC_L3MISS",
|
||||
"BriefDescription": "Ict empty for this thread due to icache misses that were sourced from beyond the local L3. The source could be local/remote/distant memory or another core's cache"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D01C",
|
||||
"EventName": "PM_ICT_NOSLOT_DISP_HELD_SYNC",
|
||||
"BriefDescription": "Dispatch held due to a synchronizing instruction at dispatch"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2D01A",
|
||||
"EventName": "PM_ICT_NOSLOT_IC_MISS",
|
||||
"BriefDescription": "Ict empty for this thread due to Icache Miss"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3D152",
|
||||
"EventName": "PM_MRK_DERAT_MISS_1G",
|
||||
"BriefDescription": "Marked Data ERAT Miss (Data TLB Access) page size 1G. Implies radix translation"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4F14A",
|
||||
"EventName": "PM_MRK_DPTEG_FROM_OFF_CHIP_CACHE",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB either shared or modified data from another core's L2/L3 on a different chip (remote or distant) due to a marked data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x30058",
|
||||
"EventName": "PM_TLBIE_FIN",
|
||||
"BriefDescription": "tlbie finished"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x100F8",
|
||||
"EventName": "PM_ICT_NOSLOT_CYC",
|
||||
"BriefDescription": "Number of cycles the ICT has no itags assigned to this thread"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3E042",
|
||||
"EventName": "PM_DPTEG_FROM_L3_DISP_CONFLICT",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB from local core's L3 with dispatch conflict due to a data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1F140",
|
||||
"EventName": "PM_MRK_DPTEG_FROM_L2_NO_CONFLICT",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB from local core's L2 without conflict due to a marked data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2C05A",
|
||||
"EventName": "PM_DERAT_MISS_1G",
|
||||
"BriefDescription": "Data ERAT Miss (Data TLB Access) page size 1G. Implies radix translation"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1F058",
|
||||
"EventName": "PM_RADIX_PWC_L2_PTE_FROM_L2",
|
||||
"BriefDescription": "A Page Table Entry was reloaded to a level 2 page walk cache from the core's L2 data cache. This implies that level 3 and level 4 PWC accesses were not necessary for this translation"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1D14A",
|
||||
"EventName": "PM_MRK_DATA_FROM_RL2L3_MOD",
|
||||
"BriefDescription": "The processor's data cache was reloaded with Modified (M) data from another chip's L2 or L3 on the same Node or Group (Remote), as this chip due to a marked load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x10050",
|
||||
"EventName": "PM_CHIP_PUMP_CPRED",
|
||||
"BriefDescription": "Initial and Final Pump Scope was chip pump (prediction=correct) for all data types excluding data prefetch (demand load,inst prefetch,inst fetch,xlate)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x45058",
|
||||
"EventName": "PM_IC_MISS_CMPL",
|
||||
"BriefDescription": "Non-speculative icache miss, counted at completion"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2D150",
|
||||
"EventName": "PM_MRK_DERAT_MISS_4K",
|
||||
"BriefDescription": "Marked Data ERAT Miss (Data TLB Access) page size 4K"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x34058",
|
||||
"EventName": "PM_ICT_NOSLOT_BR_MPRED_ICMISS",
|
||||
"BriefDescription": "Ict empty for this thread due to Icache Miss and branch mispred"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x10022",
|
||||
"EventName": "PM_PMC2_SAVED",
|
||||
"BriefDescription": "PMC2 Rewind Value saved"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2000A",
|
||||
"EventName": "PM_HV_CYC",
|
||||
"BriefDescription": "Cycles in which msr_hv is high. Note that this event does not take msr_pr into consideration"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1F144",
|
||||
"EventName": "PM_MRK_DPTEG_FROM_L3_NO_CONFLICT",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB from local core's L3 without conflict due to a marked data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x300FC",
|
||||
"EventName": "PM_DTLB_MISS",
|
||||
"BriefDescription": "Data PTEG reload"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2D152",
|
||||
"EventName": "PM_MRK_DERAT_MISS_2M",
|
||||
"BriefDescription": "Marked Data ERAT Miss (Data TLB Access) page size 2M. Implies radix translation"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2C046",
|
||||
"EventName": "PM_DATA_FROM_RL2L3_MOD",
|
||||
"BriefDescription": "The processor's data cache was reloaded with Modified (M) data from another chip's L2 or L3 on the same Node or Group (Remote), as this chip due to a demand load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x20052",
|
||||
"EventName": "PM_GRP_PUMP_MPRED",
|
||||
"BriefDescription": "Final Pump Scope (Group) ended up either larger or smaller than Initial Pump Scope for all data types excluding data prefetch (demand load,inst prefetch,inst fetch,xlate)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3F05A",
|
||||
"EventName": "PM_RADIX_PWC_L2_PDE_FROM_L3",
|
||||
"BriefDescription": "A Page Directory Entry was reloaded to a level 2 page walk cache from the core's L3 data cache"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1E04A",
|
||||
"EventName": "PM_DPTEG_FROM_RL2L3_SHR",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB with Shared (S) data from another chip's L2 or L3 on the same Node or Group (Remote), as this chip due to a data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x10064",
|
||||
"EventName": "PM_ICT_NOSLOT_DISP_HELD_TBEGIN",
|
||||
"BriefDescription": "the NTC instruction is being held at dispatch because it is a tbegin instruction and there is an older tbegin in the pipeline that must complete before the younger tbegin can dispatch"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2E046",
|
||||
"EventName": "PM_DPTEG_FROM_RL2L3_MOD",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB with Modified (M) data from another chip's L2 or L3 on the same Node or Group (Remote), as this chip due to a data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4F14C",
|
||||
"EventName": "PM_MRK_DPTEG_FROM_DMEM",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB from another chip's memory on the same Node or Group (Distant) due to a marked data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2E042",
|
||||
"EventName": "PM_DPTEG_FROM_L3_MEPF",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB from local core's L3 without dispatch conflicts hit on Mepf state. due to a data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2D012",
|
||||
"EventName": "PM_CMPLU_STALL_DFU",
|
||||
"BriefDescription": "Finish stall because the NTF instruction was issued to the Decimal Floating Point execution pipe and waiting to finish. Includes decimal floating point instructions + 128 bit binary floating point instructions. Not qualified by multicycle"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4C04C",
|
||||
"EventName": "PM_DATA_FROM_DMEM",
|
||||
"BriefDescription": "The processor's data cache was reloaded from another chip's memory on the same Node or Group (Distant) due to a demand load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x30022",
|
||||
"EventName": "PM_PMC4_SAVED",
|
||||
"BriefDescription": "PMC4 Rewind Value saved (matched condition)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x200F4",
|
||||
"EventName": "PM_RUN_CYC",
|
||||
"BriefDescription": "Run_cycles"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x400F2",
|
||||
"EventName": "PM_1PLUS_PPC_DISP",
|
||||
"BriefDescription": "Cycles at least one Instr Dispatched"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3D148",
|
||||
"EventName": "PM_MRK_DATA_FROM_L21_MOD_CYC",
|
||||
"BriefDescription": "Duration in cycles to reload with Modified (M) data from another core's L2 on the same chip due to a marked load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2F146",
|
||||
"EventName": "PM_MRK_DPTEG_FROM_RL2L3_MOD",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB with Modified (M) data from another chip's L2 or L3 on the same Node or Group (Remote), as this chip due to a marked data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4E01A",
|
||||
"EventName": "PM_ICT_NOSLOT_DISP_HELD",
|
||||
"BriefDescription": "Cycles in which the NTC instruction is held at dispatch for any reason"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x401EC",
|
||||
"EventName": "PM_THRESH_EXC_2048",
|
||||
"BriefDescription": "Threshold counter exceeded a value of 2048"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x35150",
|
||||
"EventName": "PM_MRK_DATA_FROM_RL2L3_SHR",
|
||||
"BriefDescription": "The processor's data cache was reloaded with Shared (S) data from another chip's L2 or L3 on the same Node or Group (Remote), as this chip due to a marked load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3E052",
|
||||
"EventName": "PM_ICT_NOSLOT_IC_L3",
|
||||
"BriefDescription": "Ict empty for this thread due to icache misses that were sourced from the local L3"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2405A",
|
||||
"EventName": "PM_NTC_FIN",
|
||||
"BriefDescription": "Cycles in which the oldest instruction in the pipeline (NTC) finishes. This event is used to account for cycles in which work is being completed in the CPI stack"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x40052",
|
||||
"EventName": "PM_PUMP_MPRED",
|
||||
"BriefDescription": "Pump misprediction. Counts across all types of pumps for all data types excluding data prefetch (demand load,inst prefetch,inst fetch,xlate)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x30056",
|
||||
"EventName": "PM_TM_ABORTS",
|
||||
"BriefDescription": "Number of TM transactions aborted"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2404C",
|
||||
"EventName": "PM_INST_FROM_MEMORY",
|
||||
"BriefDescription": "The processor's Instruction cache was reloaded from a memory location including L4 from local remote or distant due to an instruction fetch (not prefetch)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1C05A",
|
||||
"EventName": "PM_DERAT_MISS_2M",
|
||||
"BriefDescription": "Data ERAT Miss (Data TLB Access) page size 2M. Implies radix translation"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x30024",
|
||||
"EventName": "PM_PMC6_OVERFLOW",
|
||||
"BriefDescription": "Overflow from counter 6"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x10068",
|
||||
"EventName": "PM_BRU_FIN",
|
||||
"BriefDescription": "Branch Instruction Finished"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x30020",
|
||||
"EventName": "PM_PMC2_REWIND",
|
||||
"BriefDescription": "PMC2 Rewind Event (did not match condition)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x40064",
|
||||
"EventName": "PM_DUMMY2_REMOVE_ME",
|
||||
"BriefDescription": "Space holder for LS_PC_RELOAD_RA"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3F148",
|
||||
"EventName": "PM_MRK_DPTEG_FROM_DL2L3_SHR",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB with Shared (S) data from another chip's L2 or L3 on a different Node or Group (Distant), as this chip due to a marked data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D01E",
|
||||
"EventName": "PM_ICT_NOSLOT_BR_MPRED",
|
||||
"BriefDescription": "Ict empty for this thread due to branch mispred"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3405E",
|
||||
"EventName": "PM_IFETCH_THROTTLE",
|
||||
"BriefDescription": "Cycles in which Instruction fetch throttle was active."
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1F148",
|
||||
"EventName": "PM_MRK_DPTEG_FROM_ON_CHIP_CACHE",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB either shared or modified data from another core's L2/L3 on the same chip due to a marked data side request.. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3E046",
|
||||
"EventName": "PM_DPTEG_FROM_L21_SHR",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB with Shared (S) data from another core's L2 on the same chip due to a data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2F144",
|
||||
"EventName": "PM_MRK_DPTEG_FROM_L31_MOD",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB with Modified (M) data from another core's L3 on the same chip due to a marked data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4C15C",
|
||||
"EventName": "PM_MRK_DERAT_MISS_16G",
|
||||
"BriefDescription": "Marked Data ERAT Miss (Data TLB Access) page size 16G"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x14052",
|
||||
"EventName": "PM_INST_GRP_PUMP_MPRED_RTY",
|
||||
"BriefDescription": "Final Pump Scope (Group) ended up larger than Initial Pump Scope (Chip) for an instruction fetch"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x10016",
|
||||
"EventName": "PM_DSLB_MISS",
|
||||
"BriefDescription": "Data SLB Miss - Total of all segment sizes"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0xD0A8",
|
||||
"EventName": "PM_DSLB_MISS",
|
||||
"BriefDescription": "Data SLB Miss - Total of all segment sizes"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4C058",
|
||||
"EventName": "PM_MEM_CO",
|
||||
"BriefDescription": "Memory castouts from this thread"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x40004",
|
||||
"EventName": "PM_FXU_FIN",
|
||||
"BriefDescription": "The fixed point unit Unit finished an instruction. Instructions that finish may not necessary complete."
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2C054",
|
||||
"EventName": "PM_DERAT_MISS_64K",
|
||||
"BriefDescription": "Data ERAT Miss (Data TLB Access) page size 64K"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x10018",
|
||||
"EventName": "PM_IC_DEMAND_CYC",
|
||||
"BriefDescription": "Icache miss demand cycles"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3C054",
|
||||
"EventName": "PM_DERAT_MISS_16M",
|
||||
"BriefDescription": "Data ERAT Miss (Data TLB Access) page size 16M"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2D14E",
|
||||
"EventName": "PM_MRK_DATA_FROM_L21_SHR",
|
||||
"BriefDescription": "The processor's data cache was reloaded with Shared (S) data from another core's L2 on the same chip due to a marked load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3405C",
|
||||
"EventName": "PM_CMPLU_STALL_DPLONG",
|
||||
"BriefDescription": "Finish stall because the NTF instruction was a scalar multi-cycle instruction issued to the Double Precision execution pipe and waiting to finish. Includes binary floating point instructions in 32 and 64 bit binary floating point format. Qualified by NOT vector AND multicycle"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D052",
|
||||
"EventName": "PM_2FLOP_CMPL",
|
||||
"BriefDescription": "DP vector version of fmul, fsub, fcmp, fsel, fabs, fnabs, fres ,fsqrte, fneg "
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1F142",
|
||||
"EventName": "PM_MRK_DPTEG_FROM_L2",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB from local core's L2 due to a marked data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x40062",
|
||||
"EventName": "PM_DUMMY1_REMOVE_ME",
|
||||
"BriefDescription": "Space holder for L2_PC_PM_MK_LDST_SCOPE_PRED_STATUS"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4C012",
|
||||
"EventName": "PM_CMPLU_STALL_ERAT_MISS",
|
||||
"BriefDescription": "Finish stall because the NTF instruction was a load or store that suffered a translation miss"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D050",
|
||||
"EventName": "PM_VSU_NON_FLOP_CMPL",
|
||||
"BriefDescription": "Non FLOP operation completed"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2E012",
|
||||
"EventName": "PM_TM_TX_PASS_RUN_CYC",
|
||||
"BriefDescription": "cycles spent in successful transactions"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D04E",
|
||||
"EventName": "PM_VSU_FSQRT_FDIV",
|
||||
"BriefDescription": "four flops operation (fdiv,fsqrt) Scalar Instructions only"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4C120",
|
||||
"EventName": "PM_MRK_DATA_FROM_L2_MEPF",
|
||||
"BriefDescription": "The processor's data cache was reloaded from local core's L2 hit without dispatch conflicts on Mepf state. due to a marked load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x10062",
|
||||
"EventName": "PM_LD_L3MISS_PEND_CYC",
|
||||
"BriefDescription": "Cycles L3 miss was pending for this thread"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2F14C",
|
||||
"EventName": "PM_MRK_DPTEG_FROM_MEMORY",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB from a memory location including L4 from local remote or distant due to a marked data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x14050",
|
||||
"EventName": "PM_INST_CHIP_PUMP_CPRED",
|
||||
"BriefDescription": "Initial and Final Pump Scope was chip pump (prediction=correct) for an instruction fetch"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2000E",
|
||||
"EventName": "PM_FXU_BUSY",
|
||||
"BriefDescription": "Cycles in which all 4 FXUs are busy. The FXU is running at capacity"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x20066",
|
||||
"EventName": "PM_TLB_MISS",
|
||||
"BriefDescription": "TLB Miss (I + D)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x10054",
|
||||
"EventName": "PM_PUMP_CPRED",
|
||||
"BriefDescription": "Pump prediction correct. Counts across all types of pumps for all data types excluding data prefetch (demand load,inst prefetch,inst fetch,xlate)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D124",
|
||||
"EventName": "PM_MRK_DATA_FROM_L31_SHR",
|
||||
"BriefDescription": "The processor's data cache was reloaded with Shared (S) data from another core's L3 on the same chip due to a marked load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x400F8",
|
||||
"EventName": "PM_FLUSH",
|
||||
"BriefDescription": "Flush (any type)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x30004",
|
||||
"EventName": "PM_CMPLU_STALL_EMQ_FULL",
|
||||
"BriefDescription": "Finish stall because the next to finish instruction suffered an ERAT miss and the EMQ was full"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1D154",
|
||||
"EventName": "PM_MRK_DATA_FROM_L21_SHR_CYC",
|
||||
"BriefDescription": "Duration in cycles to reload with Shared (S) data from another core's L2 on the same chip due to a marked load"
|
||||
}
|
||||
]
|
||||
127
tools/perf/pmu-events/arch/powerpc/power9/pmc.json
Normal file
127
tools/perf/pmu-events/arch/powerpc/power9/pmc.json
Normal file
|
|
@ -0,0 +1,127 @@
|
|||
[
|
||||
{,
|
||||
"EventCode": "0x20036",
|
||||
"EventName": "PM_BR_2PATH",
|
||||
"BriefDescription": "Branches that are not strongly biased"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x40036",
|
||||
"EventName": "PM_BR_2PATH",
|
||||
"BriefDescription": "Branches that are not strongly biased"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x40056",
|
||||
"EventName": "PM_MEM_LOC_THRESH_LSU_HIGH",
|
||||
"BriefDescription": "Local memory above threshold for LSU medium"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2C056",
|
||||
"EventName": "PM_DTLB_MISS_4K",
|
||||
"BriefDescription": "Data TLB Miss page size 4k"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x40118",
|
||||
"EventName": "PM_MRK_DCACHE_RELOAD_INTV",
|
||||
"BriefDescription": "Combined Intervention event"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4F148",
|
||||
"EventName": "PM_MRK_DPTEG_FROM_DL2L3_MOD",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB with Modified (M) data from another chip's L2 or L3 on a different Node or Group (Distant), as this chip due to a marked data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x301E8",
|
||||
"EventName": "PM_THRESH_EXC_64",
|
||||
"BriefDescription": "Threshold counter exceeded a value of 64"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4E04E",
|
||||
"EventName": "PM_DPTEG_FROM_L3MISS",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB from a location other than the local core's L3 due to a data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x40050",
|
||||
"EventName": "PM_SYS_PUMP_MPRED_RTY",
|
||||
"BriefDescription": "Final Pump Scope (system) ended up larger than Initial Pump Scope (Chip/Group) for all data types excluding data prefetch (demand load,inst prefetch,inst fetch,xlate)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1F14E",
|
||||
"EventName": "PM_MRK_DPTEG_FROM_L2MISS",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB from a location other than the local core's L2 due to a marked data side request.. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D018",
|
||||
"EventName": "PM_CMPLU_STALL_BRU",
|
||||
"BriefDescription": "Completion stall due to a Branch Unit"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x45052",
|
||||
"EventName": "PM_4FLOP_CMPL",
|
||||
"BriefDescription": "4 FLOP instruction completed"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3D142",
|
||||
"EventName": "PM_MRK_DATA_FROM_LMEM",
|
||||
"BriefDescription": "The processor's data cache was reloaded from the local chip's Memory due to a marked load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4C01E",
|
||||
"EventName": "PM_CMPLU_STALL_CRYPTO",
|
||||
"BriefDescription": "Finish stall because the NTF instruction was routed to the crypto execution pipe and was waiting to finish"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3000C",
|
||||
"EventName": "PM_FREQ_DOWN",
|
||||
"BriefDescription": "Power Management: Below Threshold B"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D128",
|
||||
"EventName": "PM_MRK_DATA_FROM_LMEM_CYC",
|
||||
"BriefDescription": "Duration in cycles to reload from the local chip's Memory due to a marked load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D054",
|
||||
"EventName": "PM_8FLOP_CMPL",
|
||||
"BriefDescription": "8 FLOP instruction completed"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x10026",
|
||||
"EventName": "PM_TABLEWALK_CYC",
|
||||
"BriefDescription": "Cycles when an instruction tablewalk is active"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2C012",
|
||||
"EventName": "PM_CMPLU_STALL_DCACHE_MISS",
|
||||
"BriefDescription": "Finish stall because the NTF instruction was a load that missed the L1 and was waiting for the data to return from the nest"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2E04C",
|
||||
"EventName": "PM_DPTEG_FROM_MEMORY",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB from a memory location including L4 from local remote or distant due to a data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3F142",
|
||||
"EventName": "PM_MRK_DPTEG_FROM_L3_DISP_CONFLICT",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB from local core's L3 with dispatch conflict due to a marked data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4F142",
|
||||
"EventName": "PM_MRK_DPTEG_FROM_L3",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB from local core's L3 due to a marked data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x10060",
|
||||
"EventName": "PM_TM_TRANS_RUN_CYC",
|
||||
"BriefDescription": "run cycles in transactional state"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1E04C",
|
||||
"EventName": "PM_DPTEG_FROM_LL4",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB from the local chip's L4 cache due to a data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x45050",
|
||||
"EventName": "PM_1FLOP_CMPL",
|
||||
"BriefDescription": "one flop (fadd, fmul, fsub, fcmp, fsel, fabs, fnabs, fres, fsqrte, fneg) operation completed"
|
||||
}
|
||||
]
|
||||
232
tools/perf/pmu-events/arch/powerpc/power9/translation.json
Normal file
232
tools/perf/pmu-events/arch/powerpc/power9/translation.json
Normal file
|
|
@ -0,0 +1,232 @@
|
|||
[
|
||||
{,
|
||||
"EventCode": "0x1E",
|
||||
"EventName": "PM_CYC",
|
||||
"BriefDescription": "Processor cycles"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x30010",
|
||||
"EventName": "PM_PMC2_OVERFLOW",
|
||||
"BriefDescription": "Overflow from counter 2"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3C046",
|
||||
"EventName": "PM_DATA_FROM_L21_SHR",
|
||||
"BriefDescription": "The processor's data cache was reloaded with Shared (S) data from another core's L2 on the same chip due to a demand load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D05C",
|
||||
"EventName": "PM_DP_QP_FLOP_CMPL",
|
||||
"BriefDescription": "Double-Precion or Quad-Precision instruction completed"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4E04C",
|
||||
"EventName": "PM_DPTEG_FROM_DMEM",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB from another chip's memory on the same Node or Group (Distant) due to a data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x20016",
|
||||
"EventName": "PM_ST_FIN",
|
||||
"BriefDescription": "Store finish count. Includes speculative activity"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x44042",
|
||||
"EventName": "PM_INST_FROM_L3",
|
||||
"BriefDescription": "The processor's Instruction cache was reloaded from local core's L3 due to an instruction fetch (not prefetch)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1504A",
|
||||
"EventName": "PM_IPTEG_FROM_RL2L3_SHR",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB with Shared (S) data from another chip's L2 or L3 on the same Node or Group (Remote), as this chip due to a instruction side request"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x40132",
|
||||
"EventName": "PM_MRK_LSU_FIN",
|
||||
"BriefDescription": "lsu marked instr PPC finish"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3C05C",
|
||||
"EventName": "PM_CMPLU_STALL_VFXU",
|
||||
"BriefDescription": "Finish stall due to a vector fixed point instruction in the execution pipeline. These instructions get routed to the ALU, ALU2, and DIV pipes"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x30066",
|
||||
"EventName": "PM_LSU_FIN",
|
||||
"BriefDescription": "LSU Finished a PPC instruction (up to 4 per cycle)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2011C",
|
||||
"EventName": "PM_MRK_NTC_CYC",
|
||||
"BriefDescription": "Cycles during which the marked instruction is next to complete (completion is held up because the marked instruction hasn't completed yet)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3E048",
|
||||
"EventName": "PM_DPTEG_FROM_DL2L3_SHR",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB with Shared (S) data from another chip's L2 or L3 on a different Node or Group (Distant), as this chip due to a data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2E018",
|
||||
"EventName": "PM_CMPLU_STALL_VFXLONG",
|
||||
"BriefDescription": "Completion stall due to a long latency vector fixed point instruction (division, square root)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1C04E",
|
||||
"EventName": "PM_DATA_FROM_L2MISS_MOD",
|
||||
"BriefDescription": "The processor's data cache was reloaded from a location other than the local core's L2 due to a demand load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x15048",
|
||||
"EventName": "PM_IPTEG_FROM_ON_CHIP_CACHE",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB either shared or modified data from another core's L2/L3 on the same chip due to a instruction side request"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x34046",
|
||||
"EventName": "PM_INST_FROM_L21_SHR",
|
||||
"BriefDescription": "The processor's Instruction cache was reloaded with Shared (S) data from another core's L2 on the same chip due to an instruction fetch (not prefetch)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1E058",
|
||||
"EventName": "PM_STCX_FAIL",
|
||||
"BriefDescription": "stcx failed"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x20112",
|
||||
"EventName": "PM_MRK_NTF_FIN",
|
||||
"BriefDescription": "Marked next to finish instruction finished"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x300F0",
|
||||
"EventName": "PM_ST_MISS_L1",
|
||||
"BriefDescription": "Store Missed L1"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4C046",
|
||||
"EventName": "PM_DATA_FROM_L21_MOD",
|
||||
"BriefDescription": "The processor's data cache was reloaded with Modified (M) data from another core's L2 on the same chip due to a demand load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2504A",
|
||||
"EventName": "PM_IPTEG_FROM_RL4",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB from another chip's L4 on the same Node or Group ( Remote) due to a instruction side request"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2003E",
|
||||
"EventName": "PM_LSU_LMQ_SRQ_EMPTY_CYC",
|
||||
"BriefDescription": "Cycles in which the LSU is empty for all threads (lmq and srq are completely empty)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x201E6",
|
||||
"EventName": "PM_THRESH_EXC_32",
|
||||
"BriefDescription": "Threshold counter exceeded a value of 32"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4405C",
|
||||
"EventName": "PM_CMPLU_STALL_VDP",
|
||||
"BriefDescription": "Finish stall because the NTF instruction was a vector instruction issued to the Double Precision execution pipe and waiting to finish. Includes binary floating point instructions in 32 and 64 bit binary floating point format. Not qualified multicycle. Qualified by vector"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D010",
|
||||
"EventName": "PM_PMC1_SAVED",
|
||||
"BriefDescription": "PMC1 Rewind Value saved"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x200FE",
|
||||
"EventName": "PM_DATA_FROM_L2MISS",
|
||||
"BriefDescription": "Demand LD - L2 Miss (not L2 hit)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2D14A",
|
||||
"EventName": "PM_MRK_DATA_FROM_RL2L3_MOD_CYC",
|
||||
"BriefDescription": "Duration in cycles to reload with Modified (M) data from another chip's L2 or L3 on the same Node or Group (Remote), as this chip due to a marked load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x10028",
|
||||
"EventName": "PM_STALL_END_ICT_EMPTY",
|
||||
"BriefDescription": "The number a times the core transitioned from a stall to ICT-empty for this thread"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2504C",
|
||||
"EventName": "PM_IPTEG_FROM_MEMORY",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB from a memory location including L4 from local remote or distant due to a instruction side request"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4504A",
|
||||
"EventName": "PM_IPTEG_FROM_OFF_CHIP_CACHE",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB either shared or modified data from another core's L2/L3 on a different chip (remote or distant) due to a instruction side request"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1404E",
|
||||
"EventName": "PM_INST_FROM_L2MISS",
|
||||
"BriefDescription": "The processor's Instruction cache was reloaded from a location other than the local core's L2 due to an instruction fetch (not prefetch)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x34042",
|
||||
"EventName": "PM_INST_FROM_L3_DISP_CONFLICT",
|
||||
"BriefDescription": "The processor's Instruction cache was reloaded from local core's L3 with dispatch conflict due to an instruction fetch (not prefetch)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4E048",
|
||||
"EventName": "PM_DPTEG_FROM_DL2L3_MOD",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB with Modified (M) data from another chip's L2 or L3 on a different Node or Group (Distant), as this chip due to a data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x200F0",
|
||||
"EventName": "PM_ST_CMPL",
|
||||
"BriefDescription": "Stores completed from S2Q (2nd-level store queue)."
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4E05C",
|
||||
"EventName": "PM_LSU_REJECT_LHS",
|
||||
"BriefDescription": "LSU Reject due to LHS (up to 4 per cycle)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x14044",
|
||||
"EventName": "PM_INST_FROM_L3_NO_CONFLICT",
|
||||
"BriefDescription": "The processor's Instruction cache was reloaded from local core's L3 without conflict due to an instruction fetch (not prefetch)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3E04C",
|
||||
"EventName": "PM_DPTEG_FROM_DL4",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB from another chip's L4 on a different Node or Group (Distant) due to a data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1F15E",
|
||||
"EventName": "PM_MRK_PROBE_NOP_CMPL",
|
||||
"BriefDescription": "Marked probeNops completed"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x20018",
|
||||
"EventName": "PM_ST_FWD",
|
||||
"BriefDescription": "Store forwards that finished"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1D142",
|
||||
"EventName": "PM_MRK_DATA_FROM_L31_ECO_SHR_CYC",
|
||||
"BriefDescription": "Duration in cycles to reload with Shared (S) data from another core's ECO L3 on the same chip due to a marked load"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x24042",
|
||||
"EventName": "PM_INST_FROM_L3_MEPF",
|
||||
"BriefDescription": "The processor's Instruction cache was reloaded from local core's L3 without dispatch conflicts hit on Mepf state. due to an instruction fetch (not prefetch)"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x25046",
|
||||
"EventName": "PM_IPTEG_FROM_RL2L3_MOD",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB with Modified (M) data from another chip's L2 or L3 on the same Node or Group (Remote), as this chip due to a instruction side request"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3504A",
|
||||
"EventName": "PM_IPTEG_FROM_RMEM",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB from another chip's memory on the same Node or Group ( Remote) due to a instruction side request"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3C05A",
|
||||
"EventName": "PM_CMPLU_STALL_VDPLONG",
|
||||
"BriefDescription": "Finish stall because the NTF instruction was a scalar multi-cycle instruction issued to the Double Precision execution pipe and waiting to finish. Includes binary floating point instructions in 32 and 64 bit binary floating point format. Qualified by NOT vector AND multicycle"
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2E01C",
|
||||
"EventName": "PM_CMPLU_STALL_TLBIE",
|
||||
"BriefDescription": "Finish stall because the NTF instruction was a tlbie waiting for response from L2"
|
||||
}
|
||||
]
|
||||
|
|
@ -34,3 +34,4 @@ GenuineIntel-6-2C,v2,westmereep-dp,core
|
|||
GenuineIntel-6-2C,v2,westmereep-dp,core
|
||||
GenuineIntel-6-25,v2,westmereep-sp,core
|
||||
GenuineIntel-6-2F,v2,westmereex,core
|
||||
GenuineIntel-6-55,v1,skylakex,core
|
||||
|
|
|
|||
|
1672
tools/perf/pmu-events/arch/x86/skylakex/cache.json
Normal file
1672
tools/perf/pmu-events/arch/x86/skylakex/cache.json
Normal file
File diff suppressed because it is too large
Load diff
88
tools/perf/pmu-events/arch/x86/skylakex/floating-point.json
Normal file
88
tools/perf/pmu-events/arch/x86/skylakex/floating-point.json
Normal file
|
|
@ -0,0 +1,88 @@
|
|||
[
|
||||
{
|
||||
"EventCode": "0xC7",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Number of SSE/AVX computational scalar double precision floating-point instructions retired. Each count represents 1 computation. Applies to SSE* and AVX* scalar double precision floating-point instructions: ADD SUB MUL DIV MIN MAX SQRT FM(N)ADD/SUB. FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "FP_ARITH_INST_RETIRED.SCALAR_DOUBLE",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC7",
|
||||
"UMask": "0x2",
|
||||
"BriefDescription": "Number of SSE/AVX computational scalar single precision floating-point instructions retired. Each count represents 1 computation. Applies to SSE* and AVX* scalar single precision floating-point instructions: ADD SUB MUL DIV MIN MAX RCP RSQRT SQRT FM(N)ADD/SUB. FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "FP_ARITH_INST_RETIRED.SCALAR_SINGLE",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC7",
|
||||
"UMask": "0x4",
|
||||
"BriefDescription": "Number of SSE/AVX computational 128-bit packed double precision floating-point instructions retired. Each count represents 2 computations. Applies to SSE* and AVX* packed double precision floating-point instructions: ADD SUB MUL DIV MIN MAX SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "FP_ARITH_INST_RETIRED.128B_PACKED_DOUBLE",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC7",
|
||||
"UMask": "0x8",
|
||||
"BriefDescription": "Number of SSE/AVX computational 128-bit packed single precision floating-point instructions retired. Each count represents 4 computations. Applies to SSE* and AVX* packed single precision floating-point instructions: ADD SUB MUL DIV MIN MAX RCP RSQRT SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element. ",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "FP_ARITH_INST_RETIRED.128B_PACKED_SINGLE",
|
||||
"PublicDescription": "Number of SSE/AVX computational 128-bit packed single precision floating-point instructions retired. Each count represents 4 computations. Applies to SSE* and AVX* packed single precision floating-point instructions: ADD SUB MUL DIV MIN MAX RCP RSQRT SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC7",
|
||||
"UMask": "0x10",
|
||||
"BriefDescription": "Number of SSE/AVX computational 256-bit packed double precision floating-point instructions retired. Each count represents 4 computations. Applies to SSE* and AVX* packed double precision floating-point instructions: ADD SUB MUL DIV MIN MAX SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "FP_ARITH_INST_RETIRED.256B_PACKED_DOUBLE",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC7",
|
||||
"UMask": "0x20",
|
||||
"BriefDescription": "Number of SSE/AVX computational 256-bit packed single precision floating-point instructions retired. Each count represents 8 computations. Applies to SSE* and AVX* packed single precision floating-point instructions: ADD SUB MUL DIV MIN MAX RCP RSQRT SQRT DPP FM(N)ADD/SUB. DPP and FM(N)ADD/SUB instructions count twice as they perform multiple calculations per element.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "FP_ARITH_INST_RETIRED.256B_PACKED_SINGLE",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC7",
|
||||
"UMask": "0x40",
|
||||
"BriefDescription": "Number of Packed Double-Precision FP arithmetic instructions (Use operation multiplier of 8)",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "FP_ARITH_INST_RETIRED.512B_PACKED_DOUBLE",
|
||||
"PublicDescription": "Number of Packed Double-Precision FP arithmetic instructions (Use operation multiplier of 8).",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC7",
|
||||
"UMask": "0x80",
|
||||
"BriefDescription": "Number of Packed Single-Precision FP arithmetic instructions (Use operation multiplier of 16)",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "FP_ARITH_INST_RETIRED.512B_PACKED_SINGLE",
|
||||
"PublicDescription": "Number of Packed Single-Precision FP arithmetic instructions (Use operation multiplier of 16).",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xCA",
|
||||
"UMask": "0x1e",
|
||||
"BriefDescription": "Cycles with any input/output SSE or FP assist",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "FP_ASSIST.ANY",
|
||||
"CounterMask": "1",
|
||||
"PublicDescription": "Counts cycles with any input and output SSE or x87 FP assist. If an input and output assist are detected on the same cycle the event increments by 1.",
|
||||
"SampleAfterValue": "100003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
}
|
||||
]
|
||||
482
tools/perf/pmu-events/arch/x86/skylakex/frontend.json
Normal file
482
tools/perf/pmu-events/arch/x86/skylakex/frontend.json
Normal file
|
|
@ -0,0 +1,482 @@
|
|||
[
|
||||
{
|
||||
"EventCode": "0x79",
|
||||
"UMask": "0x4",
|
||||
"BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) from MITE path",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "IDQ.MITE_UOPS",
|
||||
"PublicDescription": "Counts the number of uops delivered to Instruction Decode Queue (IDQ) from the MITE path. Counting includes uops that may 'bypass' the IDQ. This also means that uops are not being delivered from the Decode Stream Buffer (DSB).",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x79",
|
||||
"UMask": "0x4",
|
||||
"BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) from MITE path",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "IDQ.MITE_CYCLES",
|
||||
"CounterMask": "1",
|
||||
"PublicDescription": "Counts cycles during which uops are being delivered to Instruction Decode Queue (IDQ) from the MITE path. Counting includes uops that may 'bypass' the IDQ.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x79",
|
||||
"UMask": "0x8",
|
||||
"BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "IDQ.DSB_UOPS",
|
||||
"PublicDescription": "Counts the number of uops delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path. Counting includes uops that may 'bypass' the IDQ.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x79",
|
||||
"UMask": "0x8",
|
||||
"BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) from Decode Stream Buffer (DSB) path",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "IDQ.DSB_CYCLES",
|
||||
"CounterMask": "1",
|
||||
"PublicDescription": "Counts cycles during which uops are being delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path. Counting includes uops that may 'bypass' the IDQ.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x79",
|
||||
"UMask": "0x10",
|
||||
"BriefDescription": "Cycles when uops initiated by Decode Stream Buffer (DSB) are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "IDQ.MS_DSB_CYCLES",
|
||||
"CounterMask": "1",
|
||||
"PublicDescription": "Counts cycles during which uops initiated by Decode Stream Buffer (DSB) are being delivered to Instruction Decode Queue (IDQ) while the Microcode Sequencer (MS) is busy. Counting includes uops that may 'bypass' the IDQ.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x79",
|
||||
"UMask": "0x18",
|
||||
"BriefDescription": "Cycles Decode Stream Buffer (DSB) is delivering 4 Uops",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "IDQ.ALL_DSB_CYCLES_4_UOPS",
|
||||
"CounterMask": "4",
|
||||
"PublicDescription": "Counts the number of cycles 4 uops were delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path. Count includes uops that may 'bypass' the IDQ.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x79",
|
||||
"UMask": "0x18",
|
||||
"BriefDescription": "Cycles Decode Stream Buffer (DSB) is delivering any Uop",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "IDQ.ALL_DSB_CYCLES_ANY_UOPS",
|
||||
"CounterMask": "1",
|
||||
"PublicDescription": "Counts the number of cycles uops were delivered to Instruction Decode Queue (IDQ) from the Decode Stream Buffer (DSB) path. Count includes uops that may 'bypass' the IDQ.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x79",
|
||||
"UMask": "0x20",
|
||||
"BriefDescription": "Uops initiated by MITE and delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "IDQ.MS_MITE_UOPS",
|
||||
"PublicDescription": "Counts the number of uops initiated by MITE and delivered to Instruction Decode Queue (IDQ) while the Microcode Sequencer (MS) is busy. Counting includes uops that may 'bypass' the IDQ.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x79",
|
||||
"UMask": "0x24",
|
||||
"BriefDescription": "Cycles MITE is delivering 4 Uops",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "IDQ.ALL_MITE_CYCLES_4_UOPS",
|
||||
"CounterMask": "4",
|
||||
"PublicDescription": "Counts the number of cycles 4 uops were delivered to the Instruction Decode Queue (IDQ) from the MITE (legacy decode pipeline) path. Counting includes uops that may 'bypass' the IDQ. During these cycles uops are not being delivered from the Decode Stream Buffer (DSB).",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x79",
|
||||
"UMask": "0x24",
|
||||
"BriefDescription": "Cycles MITE is delivering any Uop",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "IDQ.ALL_MITE_CYCLES_ANY_UOPS",
|
||||
"CounterMask": "1",
|
||||
"PublicDescription": "Counts the number of cycles uops were delivered to the Instruction Decode Queue (IDQ) from the MITE (legacy decode pipeline) path. Counting includes uops that may 'bypass' the IDQ. During these cycles uops are not being delivered from the Decode Stream Buffer (DSB).",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x79",
|
||||
"UMask": "0x30",
|
||||
"BriefDescription": "Cycles when uops are being delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "IDQ.MS_CYCLES",
|
||||
"CounterMask": "1",
|
||||
"PublicDescription": "Counts cycles during which uops are being delivered to Instruction Decode Queue (IDQ) while the Microcode Sequencer (MS) is busy. Counting includes uops that may 'bypass' the IDQ. Uops maybe initiated by Decode Stream Buffer (DSB) or MITE.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EdgeDetect": "1",
|
||||
"EventCode": "0x79",
|
||||
"UMask": "0x30",
|
||||
"BriefDescription": "Number of switches from DSB (Decode Stream Buffer) or MITE (legacy decode pipeline) to the Microcode Sequencer",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "IDQ.MS_SWITCHES",
|
||||
"CounterMask": "1",
|
||||
"PublicDescription": "Number of switches from DSB (Decode Stream Buffer) or MITE (legacy decode pipeline) to the Microcode Sequencer.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x79",
|
||||
"UMask": "0x30",
|
||||
"BriefDescription": "Uops delivered to Instruction Decode Queue (IDQ) while Microcode Sequenser (MS) is busy",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "IDQ.MS_UOPS",
|
||||
"PublicDescription": "Counts the total number of uops delivered by the Microcode Sequencer (MS). Any instruction over 4 uops will be delivered by the MS. Some instructions such as transcendentals may additionally generate uops from the MS.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x80",
|
||||
"UMask": "0x4",
|
||||
"BriefDescription": "Cycles where a code fetch is stalled due to L1 instruction cache miss.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "ICACHE_16B.IFDATA_STALL",
|
||||
"PublicDescription": "Cycles where a code line fetch is stalled due to an L1 instruction cache miss. The legacy decode pipeline works at a 16 Byte granularity.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x83",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Instruction fetch tag lookups that hit in the instruction cache (L1I). Counts at 64-byte cache-line granularity.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "ICACHE_64B.IFTAG_HIT",
|
||||
"SampleAfterValue": "200003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x83",
|
||||
"UMask": "0x2",
|
||||
"BriefDescription": "Instruction fetch tag lookups that miss in the instruction cache (L1I). Counts at 64-byte cache-line granularity.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "ICACHE_64B.IFTAG_MISS",
|
||||
"SampleAfterValue": "200003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x83",
|
||||
"UMask": "0x4",
|
||||
"BriefDescription": "Cycles where a code fetch is stalled due to L1 instruction cache tag miss.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "ICACHE_64B.IFTAG_STALL",
|
||||
"SampleAfterValue": "200003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x9C",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Uops not delivered to Resource Allocation Table (RAT) per thread when backend of the machine is not stalled",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "IDQ_UOPS_NOT_DELIVERED.CORE",
|
||||
"PublicDescription": "Counts the number of uops not delivered to Resource Allocation Table (RAT) per thread adding \u201c4 \u2013 x\u201d when Resource Allocation Table (RAT) is not stalled and Instruction Decode Queue (IDQ) delivers x uops to Resource Allocation Table (RAT) (where x belongs to {0,1,2,3}). Counting does not cover cases when: a. IDQ-Resource Allocation Table (RAT) pipe serves the other thread. b. Resource Allocation Table (RAT) is stalled for the thread (including uop drops and clear BE conditions). c. Instruction Decode Queue (IDQ) delivers four uops.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x9C",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Cycles per thread when 4 or more uops are not delivered to Resource Allocation Table (RAT) when backend of the machine is not stalled",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "IDQ_UOPS_NOT_DELIVERED.CYCLES_0_UOPS_DELIV.CORE",
|
||||
"CounterMask": "4",
|
||||
"PublicDescription": "Counts, on the per-thread basis, cycles when no uops are delivered to Resource Allocation Table (RAT). IDQ_Uops_Not_Delivered.core =4.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x9C",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Cycles per thread when 3 or more uops are not delivered to Resource Allocation Table (RAT) when backend of the machine is not stalled",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "IDQ_UOPS_NOT_DELIVERED.CYCLES_LE_1_UOP_DELIV.CORE",
|
||||
"CounterMask": "3",
|
||||
"PublicDescription": "Counts, on the per-thread basis, cycles when less than 1 uop is delivered to Resource Allocation Table (RAT). IDQ_Uops_Not_Delivered.core >= 3.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x9C",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Cycles with less than 2 uops delivered by the front end.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "IDQ_UOPS_NOT_DELIVERED.CYCLES_LE_2_UOP_DELIV.CORE",
|
||||
"CounterMask": "2",
|
||||
"PublicDescription": "Cycles with less than 2 uops delivered by the front-end.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x9C",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Cycles with less than 3 uops delivered by the front end.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "IDQ_UOPS_NOT_DELIVERED.CYCLES_LE_3_UOP_DELIV.CORE",
|
||||
"CounterMask": "1",
|
||||
"PublicDescription": "Cycles with less than 3 uops delivered by the front-end.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"Invert": "1",
|
||||
"EventCode": "0x9C",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Counts cycles FE delivered 4 uops or Resource Allocation Table (RAT) was stalling FE.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "IDQ_UOPS_NOT_DELIVERED.CYCLES_FE_WAS_OK",
|
||||
"CounterMask": "1",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xAB",
|
||||
"UMask": "0x2",
|
||||
"BriefDescription": "Decode Stream Buffer (DSB)-to-MITE switch true penalty cycles.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "DSB2MITE_SWITCHES.PENALTY_CYCLES",
|
||||
"PublicDescription": "Counts Decode Stream Buffer (DSB)-to-MITE switch true penalty cycles. These cycles do not include uops routed through because of the switch itself, for example, when Instruction Decode Queue (IDQ) pre-allocation is unavailable, or Instruction Decode Queue (IDQ) is full. SBD-to-MITE switch true penalty cycles happen after the merge mux (MM) receives Decode Stream Buffer (DSB) Sync-indication until receiving the first MITE uop. MM is placed before Instruction Decode Queue (IDQ) to merge uops being fed from the MITE and Decode Stream Buffer (DSB) paths. Decode Stream Buffer (DSB) inserts the Sync-indication whenever a Decode Stream Buffer (DSB)-to-MITE switch occurs.Penalty: A Decode Stream Buffer (DSB) hit followed by a Decode Stream Buffer (DSB) miss can cost up to six cycles in which no uops are delivered to the IDQ. Most often, such switches from the Decode Stream Buffer (DSB) to the legacy pipeline cost 0\u20132 cycles.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC6",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Retired Instructions who experienced decode stream buffer (DSB - the decoded instruction-cache) miss.",
|
||||
"PEBS": "1",
|
||||
"MSRValue": "0x11",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "FRONTEND_RETIRED.DSB_MISS",
|
||||
"MSRIndex": "0x3F7",
|
||||
"PublicDescription": "Counts retired Instructions that experienced DSB (Decode stream buffer i.e. the decoded instruction-cache) miss. ",
|
||||
"TakenAlone": "1",
|
||||
"SampleAfterValue": "100007",
|
||||
"CounterHTOff": "0,1,2,3"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC6",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Retired Instructions who experienced Instruction L1 Cache true miss.",
|
||||
"PEBS": "1",
|
||||
"MSRValue": "0x12",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "FRONTEND_RETIRED.L1I_MISS",
|
||||
"MSRIndex": "0x3F7",
|
||||
"TakenAlone": "1",
|
||||
"SampleAfterValue": "100007",
|
||||
"CounterHTOff": "0,1,2,3"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC6",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Retired Instructions who experienced Instruction L2 Cache true miss.",
|
||||
"PEBS": "1",
|
||||
"MSRValue": "0x13",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "FRONTEND_RETIRED.L2_MISS",
|
||||
"MSRIndex": "0x3F7",
|
||||
"TakenAlone": "1",
|
||||
"SampleAfterValue": "100007",
|
||||
"CounterHTOff": "0,1,2,3"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC6",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Retired Instructions who experienced iTLB true miss.",
|
||||
"PEBS": "1",
|
||||
"MSRValue": "0x14",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "FRONTEND_RETIRED.ITLB_MISS",
|
||||
"MSRIndex": "0x3F7",
|
||||
"PublicDescription": "Counts retired Instructions that experienced iTLB (Instruction TLB) true miss.",
|
||||
"TakenAlone": "1",
|
||||
"SampleAfterValue": "100007",
|
||||
"CounterHTOff": "0,1,2,3"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC6",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Retired Instructions who experienced STLB (2nd level TLB) true miss.",
|
||||
"PEBS": "1",
|
||||
"MSRValue": "0x15",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "FRONTEND_RETIRED.STLB_MISS",
|
||||
"MSRIndex": "0x3F7",
|
||||
"PublicDescription": "Counts retired Instructions that experienced STLB (2nd level TLB) true miss. ",
|
||||
"TakenAlone": "1",
|
||||
"SampleAfterValue": "100007",
|
||||
"CounterHTOff": "0,1,2,3"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC6",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Retired instructions that are fetched after an interval where the front-end delivered no uops for a period of 2 cycles which was not interrupted by a back-end stall.",
|
||||
"PEBS": "1",
|
||||
"MSRValue": "0x400206",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "FRONTEND_RETIRED.LATENCY_GE_2",
|
||||
"MSRIndex": "0x3F7",
|
||||
"TakenAlone": "1",
|
||||
"SampleAfterValue": "100007",
|
||||
"CounterHTOff": "0,1,2,3"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC6",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Retired instructions that are fetched after an interval where the front-end had at least 2 bubble-slots for a period of 2 cycles which was not interrupted by a back-end stall.",
|
||||
"PEBS": "1",
|
||||
"MSRValue": "0x200206",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "FRONTEND_RETIRED.LATENCY_GE_2_BUBBLES_GE_2",
|
||||
"MSRIndex": "0x3F7",
|
||||
"TakenAlone": "1",
|
||||
"SampleAfterValue": "100007",
|
||||
"CounterHTOff": "0,1,2,3"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC6",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Retired instructions that are fetched after an interval where the front-end delivered no uops for a period of 4 cycles which was not interrupted by a back-end stall.",
|
||||
"PEBS": "1",
|
||||
"MSRValue": "0x400406",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "FRONTEND_RETIRED.LATENCY_GE_4",
|
||||
"MSRIndex": "0x3F7",
|
||||
"TakenAlone": "1",
|
||||
"SampleAfterValue": "100007",
|
||||
"CounterHTOff": "0,1,2,3"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC6",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Retired instructions that are fetched after an interval where the front-end delivered no uops for a period of 8 cycles which was not interrupted by a back-end stall.",
|
||||
"PEBS": "1",
|
||||
"MSRValue": "0x400806",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "FRONTEND_RETIRED.LATENCY_GE_8",
|
||||
"MSRIndex": "0x3F7",
|
||||
"PublicDescription": "Counts retired instructions that are delivered to the back-end after a front-end stall of at least 8 cycles. During this period the front-end delivered no uops.",
|
||||
"TakenAlone": "1",
|
||||
"SampleAfterValue": "100007",
|
||||
"CounterHTOff": "0,1,2,3"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC6",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Retired instructions that are fetched after an interval where the front-end delivered no uops for a period of 16 cycles which was not interrupted by a back-end stall.",
|
||||
"PEBS": "1",
|
||||
"MSRValue": "0x401006",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "FRONTEND_RETIRED.LATENCY_GE_16",
|
||||
"MSRIndex": "0x3F7",
|
||||
"PublicDescription": "Counts retired instructions that are delivered to the back-end after a front-end stall of at least 16 cycles. During this period the front-end delivered no uops.",
|
||||
"TakenAlone": "1",
|
||||
"SampleAfterValue": "100007",
|
||||
"CounterHTOff": "0,1,2,3"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC6",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Retired instructions that are fetched after an interval where the front-end delivered no uops for a period of 32 cycles which was not interrupted by a back-end stall.",
|
||||
"PEBS": "1",
|
||||
"MSRValue": "0x402006",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "FRONTEND_RETIRED.LATENCY_GE_32",
|
||||
"MSRIndex": "0x3F7",
|
||||
"PublicDescription": "Counts retired instructions that are delivered to the back-end after a front-end stall of at least 32 cycles. During this period the front-end delivered no uops.",
|
||||
"TakenAlone": "1",
|
||||
"SampleAfterValue": "100007",
|
||||
"CounterHTOff": "0,1,2,3"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC6",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Retired instructions that are fetched after an interval where the front-end delivered no uops for a period of 64 cycles which was not interrupted by a back-end stall.",
|
||||
"PEBS": "1",
|
||||
"MSRValue": "0x404006",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "FRONTEND_RETIRED.LATENCY_GE_64",
|
||||
"MSRIndex": "0x3F7",
|
||||
"TakenAlone": "1",
|
||||
"SampleAfterValue": "100007",
|
||||
"CounterHTOff": "0,1,2,3"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC6",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Retired instructions that are fetched after an interval where the front-end delivered no uops for a period of 128 cycles which was not interrupted by a back-end stall.",
|
||||
"PEBS": "1",
|
||||
"MSRValue": "0x408006",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "FRONTEND_RETIRED.LATENCY_GE_128",
|
||||
"MSRIndex": "0x3F7",
|
||||
"TakenAlone": "1",
|
||||
"SampleAfterValue": "100007",
|
||||
"CounterHTOff": "0,1,2,3"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC6",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Retired instructions that are fetched after an interval where the front-end delivered no uops for a period of 256 cycles which was not interrupted by a back-end stall.",
|
||||
"PEBS": "1",
|
||||
"MSRValue": "0x410006",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "FRONTEND_RETIRED.LATENCY_GE_256",
|
||||
"MSRIndex": "0x3F7",
|
||||
"TakenAlone": "1",
|
||||
"SampleAfterValue": "100007",
|
||||
"CounterHTOff": "0,1,2,3"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC6",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Retired instructions that are fetched after an interval where the front-end delivered no uops for a period of 512 cycles which was not interrupted by a back-end stall.",
|
||||
"PEBS": "1",
|
||||
"MSRValue": "0x420006",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "FRONTEND_RETIRED.LATENCY_GE_512",
|
||||
"MSRIndex": "0x3F7",
|
||||
"TakenAlone": "1",
|
||||
"SampleAfterValue": "100007",
|
||||
"CounterHTOff": "0,1,2,3"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC6",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Retired instructions that are fetched after an interval where the front-end had at least 1 bubble-slot for a period of 2 cycles which was not interrupted by a back-end stall.",
|
||||
"PEBS": "1",
|
||||
"MSRValue": "0x100206",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "FRONTEND_RETIRED.LATENCY_GE_2_BUBBLES_GE_1",
|
||||
"MSRIndex": "0x3F7",
|
||||
"PublicDescription": "Counts retired instructions that are delivered to the back-end after the front-end had at least 1 bubble-slot for a period of 2 cycles. A bubble-slot is an empty issue-pipeline slot while there was no RAT stall.",
|
||||
"TakenAlone": "1",
|
||||
"SampleAfterValue": "100007",
|
||||
"CounterHTOff": "0,1,2,3"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC6",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Retired instructions that are fetched after an interval where the front-end had at least 3 bubble-slots for a period of 2 cycles which was not interrupted by a back-end stall.",
|
||||
"PEBS": "1",
|
||||
"MSRValue": "0x300206",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "FRONTEND_RETIRED.LATENCY_GE_2_BUBBLES_GE_3",
|
||||
"MSRIndex": "0x3F7",
|
||||
"TakenAlone": "1",
|
||||
"SampleAfterValue": "100007",
|
||||
"CounterHTOff": "0,1,2,3"
|
||||
}
|
||||
]
|
||||
1396
tools/perf/pmu-events/arch/x86/skylakex/memory.json
Normal file
1396
tools/perf/pmu-events/arch/x86/skylakex/memory.json
Normal file
File diff suppressed because it is too large
Load diff
72
tools/perf/pmu-events/arch/x86/skylakex/other.json
Normal file
72
tools/perf/pmu-events/arch/x86/skylakex/other.json
Normal file
|
|
@ -0,0 +1,72 @@
|
|||
[
|
||||
{
|
||||
"EventCode": "0x28",
|
||||
"UMask": "0x7",
|
||||
"BriefDescription": "Core cycles where the core was running in a manner where Turbo may be clipped to the Non-AVX turbo schedule.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "CORE_POWER.LVL0_TURBO_LICENSE",
|
||||
"PublicDescription": "Core cycles where the core was running with power-delivery for baseline license level 0. This includes non-AVX codes, SSE, AVX 128-bit, and low-current AVX 256-bit codes.",
|
||||
"SampleAfterValue": "200003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x28",
|
||||
"UMask": "0x18",
|
||||
"BriefDescription": "Core cycles where the core was running in a manner where Turbo may be clipped to the AVX2 turbo schedule.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "CORE_POWER.LVL1_TURBO_LICENSE",
|
||||
"PublicDescription": "Core cycles where the core was running with power-delivery for license level 1. This includes high current AVX 256-bit instructions as well as low current AVX 512-bit instructions.",
|
||||
"SampleAfterValue": "200003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x28",
|
||||
"UMask": "0x20",
|
||||
"BriefDescription": "Core cycles where the core was running in a manner where Turbo may be clipped to the AVX512 turbo schedule.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "CORE_POWER.LVL2_TURBO_LICENSE",
|
||||
"PublicDescription": "Core cycles where the core was running with power-delivery for license level 2 (introduced in Skylake Server michroarchtecture). This includes high current AVX 512-bit instructions.",
|
||||
"SampleAfterValue": "200003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x28",
|
||||
"UMask": "0x40",
|
||||
"BriefDescription": "Core cycles the core was throttled due to a pending power level request.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "CORE_POWER.THROTTLE",
|
||||
"PublicDescription": "Core cycles the out-of-order engine was throttled due to a pending power level request.",
|
||||
"SampleAfterValue": "200003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xCB",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Number of hardware interrupts received by the processor.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "HW_INTERRUPTS.RECEIVED",
|
||||
"PublicDescription": "Counts the number of hardware interruptions received by the processor.",
|
||||
"SampleAfterValue": "203",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xFE",
|
||||
"UMask": "0x2",
|
||||
"BriefDescription": "Counts number of cache lines that are allocated and written back to L3 with the intention that they are more likely to be reused shortly",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "IDI_MISC.WB_UPGRADE",
|
||||
"PublicDescription": "Counts number of cache lines that are allocated and written back to L3 with the intention that they are more likely to be reused shortly.",
|
||||
"SampleAfterValue": "100003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xFE",
|
||||
"UMask": "0x4",
|
||||
"BriefDescription": "Counts number of cache lines that are dropped and not written back to L3 as they are deemed to be less likely to be reused shortly",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "IDI_MISC.WB_DOWNGRADE",
|
||||
"PublicDescription": "Counts number of cache lines that are dropped and not written back to L3 as they are deemed to be less likely to be reused shortly.",
|
||||
"SampleAfterValue": "100003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
}
|
||||
]
|
||||
950
tools/perf/pmu-events/arch/x86/skylakex/pipeline.json
Normal file
950
tools/perf/pmu-events/arch/x86/skylakex/pipeline.json
Normal file
|
|
@ -0,0 +1,950 @@
|
|||
[
|
||||
{
|
||||
"EventCode": "0x00",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Instructions retired from execution.",
|
||||
"Counter": "Fixed counter 1",
|
||||
"EventName": "INST_RETIRED.ANY",
|
||||
"PublicDescription": "Counts the number of instructions retired from execution. For instructions that consist of multiple micro-ops, Counts the retirement of the last micro-op of the instruction. Counting continues during hardware interrupts, traps, and inside interrupt handlers. Notes: INST_RETIRED.ANY is counted by a designated fixed counter, leaving the four (eight when Hyperthreading is disabled) programmable counters available for other events. INST_RETIRED.ANY_P is counted by a programmable counter and it is an architectural performance event. Counting: Faulting executions of GETSEC/VM entry/VM Exit/MWait will not count as retired instructions.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "Fixed counter 1"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x00",
|
||||
"UMask": "0x2",
|
||||
"BriefDescription": "Core cycles when the thread is not in halt state",
|
||||
"Counter": "Fixed counter 2",
|
||||
"EventName": "CPU_CLK_UNHALTED.THREAD",
|
||||
"PublicDescription": "Counts the number of core cycles while the thread is not in a halt state. The thread enters the halt state when it is running the HLT instruction. This event is a component in many key event ratios. The core frequency may change from time to time due to transitions associated with Enhanced Intel SpeedStep Technology or TM2. For this reason this event may have a changing ratio with regards to time. When the core frequency is constant, this event can approximate elapsed time while the core was not in the halt state. It is counted on a dedicated fixed counter, leaving the four (eight when Hyperthreading is disabled) programmable counters available for other events.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "Fixed counter 2"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x00",
|
||||
"UMask": "0x2",
|
||||
"BriefDescription": "Core cycles when at least one thread on the physical core is not in halt state.",
|
||||
"Counter": "Fixed counter 2",
|
||||
"EventName": "CPU_CLK_UNHALTED.THREAD_ANY",
|
||||
"AnyThread": "1",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "Fixed counter 2"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x00",
|
||||
"UMask": "0x3",
|
||||
"BriefDescription": "Reference cycles when the core is not in halt state.",
|
||||
"Counter": "Fixed counter 3",
|
||||
"EventName": "CPU_CLK_UNHALTED.REF_TSC",
|
||||
"PublicDescription": "Counts the number of reference cycles when the core is not in a halt state. The core enters the halt state when it is running the HLT instruction or the MWAIT instruction. This event is not affected by core frequency changes (for example, P states, TM2 transitions) but has the same incrementing frequency as the time stamp counter. This event can approximate elapsed time while the core was not in a halt state. This event has a constant ratio with the CPU_CLK_UNHALTED.REF_XCLK event. It is counted on a dedicated fixed counter, leaving the four (eight when Hyperthreading is disabled) programmable counters available for other events. Note: On all current platforms this event stops counting during 'throttling (TM)' states duty off periods the processor is 'halted'. The counter update is done at a lower clock rate then the core clock the overflow status bit for this counter may appear 'sticky'. After the counter has overflowed and software clears the overflow status bit and resets the counter to less than MAX. The reset value to the counter is not clocked immediately so the overflow status bit will flip 'high (1)' and generate another PMI (if enabled) after which the reset value gets clocked into the counter. Therefore, software will get the interrupt, read the overflow status bit '1 for bit 34 while the counter value is less than MAX. Software should ignore this case.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "Fixed counter 3"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x03",
|
||||
"UMask": "0x2",
|
||||
"BriefDescription": "Loads blocked by overlapping with store buffer that cannot be forwarded .",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "LD_BLOCKS.STORE_FORWARD",
|
||||
"PublicDescription": "Counts how many times the load operation got the true Block-on-Store blocking code preventing store forwarding. This includes cases when:a. preceding store conflicts with the load (incomplete overlap),b. store forwarding is impossible due to u-arch limitations,c. preceding lock RMW operations are not forwarded,d. store has the no-forward bit set (uncacheable/page-split/masked stores),e. all-blocking stores are used (mostly, fences and port I/O), and others.The most common case is a load blocked due to its address range overlapping with a preceding smaller uncompleted store. Note: This event does not take into account cases of out-of-SW-control (for example, SbTailHit), unknown physical STA, and cases of blocking loads on store due to being non-WB memory type or a lock. These cases are covered by other events. See the table of not supported store forwards in the Optimization Guide.",
|
||||
"SampleAfterValue": "100003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x03",
|
||||
"UMask": "0x8",
|
||||
"BriefDescription": "The number of times that split load operations are temporarily blocked because all resources for handling the split accesses are in use",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "LD_BLOCKS.NO_SR",
|
||||
"PublicDescription": "The number of times that split load operations are temporarily blocked because all resources for handling the split accesses are in use.",
|
||||
"SampleAfterValue": "100003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x07",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "False dependencies in MOB due to partial compare on address.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "LD_BLOCKS_PARTIAL.ADDRESS_ALIAS",
|
||||
"PublicDescription": "Counts false dependencies in MOB when the partial comparison upon loose net check and dependency was resolved by the Enhanced Loose net mechanism. This may not result in high performance penalties. Loose net checks can fail when loads and stores are 4k aliased.",
|
||||
"SampleAfterValue": "100003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x0D",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Core cycles the allocator was stalled due to recovery from earlier clear event for this thread (e.g. misprediction or memory nuke)",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "INT_MISC.RECOVERY_CYCLES",
|
||||
"PublicDescription": "Core cycles the Resource allocator was stalled due to recovery from an earlier branch misprediction or machine clear event.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x0D",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Core cycles the allocator was stalled due to recovery from earlier clear event for any thread running on the physical core (e.g. misprediction or memory nuke).",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "INT_MISC.RECOVERY_CYCLES_ANY",
|
||||
"AnyThread": "1",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x0D",
|
||||
"UMask": "0x80",
|
||||
"BriefDescription": "Cycles the issue-stage is waiting for front-end to fetch from resteered path following branch misprediction or machine clear events.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "INT_MISC.CLEAR_RESTEER_CYCLES",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x0E",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Uops that Resource Allocation Table (RAT) issues to Reservation Station (RS)",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "UOPS_ISSUED.ANY",
|
||||
"PublicDescription": "Counts the number of uops that the Resource Allocation Table (RAT) issues to the Reservation Station (RS).",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"Invert": "1",
|
||||
"EventCode": "0x0E",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Cycles when Resource Allocation Table (RAT) does not issue Uops to Reservation Station (RS) for the thread",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "UOPS_ISSUED.STALL_CYCLES",
|
||||
"CounterMask": "1",
|
||||
"PublicDescription": "Counts cycles during which the Resource Allocation Table (RAT) does not issue any Uops to the reservation station (RS) for the current thread.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x0E",
|
||||
"UMask": "0x2",
|
||||
"BriefDescription": "Uops inserted at issue-stage in order to preserve upper bits of vector registers.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "UOPS_ISSUED.VECTOR_WIDTH_MISMATCH",
|
||||
"PublicDescription": "Counts the number of Blend Uops issued by the Resource Allocation Table (RAT) to the reservation station (RS) in order to preserve upper bits of vector registers. Starting with the Skylake microarchitecture, these Blend uops are needed since every Intel SSE instruction executed in Dirty Upper State needs to preserve bits 128-255 of the destination register. For more information, refer to \u201cMixing Intel AVX and Intel SSE Code\u201d section of the Optimization Guide.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x0E",
|
||||
"UMask": "0x20",
|
||||
"BriefDescription": "Number of slow LEA uops being allocated. A uop is generally considered SlowLea if it has 3 sources (e.g. 2 sources + immediate) regardless if as a result of LEA instruction or not.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "UOPS_ISSUED.SLOW_LEA",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x14",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Cycles when divide unit is busy executing divide or square root operations. Accounts for integer and floating-point operations.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "ARITH.DIVIDER_ACTIVE",
|
||||
"CounterMask": "1",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x3C",
|
||||
"UMask": "0x0",
|
||||
"BriefDescription": "Thread cycles when thread is not in halt state",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "CPU_CLK_UNHALTED.THREAD_P",
|
||||
"PublicDescription": "This is an architectural event that counts the number of thread cycles while the thread is not in a halt state. The thread enters the halt state when it is running the HLT instruction. The core frequency may change from time to time due to power or thermal throttling. For this reason, this event may have a changing ratio with regards to wall clock time.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x3C",
|
||||
"UMask": "0x0",
|
||||
"BriefDescription": "Core cycles when at least one thread on the physical core is not in halt state.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "CPU_CLK_UNHALTED.THREAD_P_ANY",
|
||||
"AnyThread": "1",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EdgeDetect": "1",
|
||||
"EventCode": "0x3C",
|
||||
"UMask": "0x0",
|
||||
"BriefDescription": "Counts when there is a transition from ring 1, 2 or 3 to ring 0.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "CPU_CLK_UNHALTED.RING0_TRANS",
|
||||
"CounterMask": "1",
|
||||
"PublicDescription": "Counts when the Current Privilege Level (CPL) transitions from ring 1, 2 or 3 to ring 0 (Kernel).",
|
||||
"SampleAfterValue": "100007",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x3C",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Core crystal clock cycles when the thread is unhalted.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "CPU_CLK_THREAD_UNHALTED.REF_XCLK",
|
||||
"SampleAfterValue": "2503",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x3C",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Core crystal clock cycles when at least one thread on the physical core is unhalted.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "CPU_CLK_THREAD_UNHALTED.REF_XCLK_ANY",
|
||||
"AnyThread": "1",
|
||||
"SampleAfterValue": "2503",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x3C",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Core crystal clock cycles when the thread is unhalted.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "CPU_CLK_UNHALTED.REF_XCLK",
|
||||
"SampleAfterValue": "2503",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x3C",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Core crystal clock cycles when at least one thread on the physical core is unhalted.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "CPU_CLK_UNHALTED.REF_XCLK_ANY",
|
||||
"AnyThread": "1",
|
||||
"SampleAfterValue": "2503",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x3C",
|
||||
"UMask": "0x2",
|
||||
"BriefDescription": "Core crystal clock cycles when this thread is unhalted and the other thread is halted.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "CPU_CLK_THREAD_UNHALTED.ONE_THREAD_ACTIVE",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x3C",
|
||||
"UMask": "0x2",
|
||||
"BriefDescription": "Core crystal clock cycles when this thread is unhalted and the other thread is halted.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "CPU_CLK_UNHALTED.ONE_THREAD_ACTIVE",
|
||||
"SampleAfterValue": "2503",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x4C",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Demand load dispatches that hit L1D fill buffer (FB) allocated for software prefetch.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "LOAD_HIT_PRE.SW_PF",
|
||||
"PublicDescription": "Counts all not software-prefetch load dispatches that hit the fill buffer (FB) allocated for the software prefetch. It can also be incremented by some lock instructions. So it should only be used with profiling so that the locks can be excluded by ASM (Assembly File) inspection of the nearby instructions.",
|
||||
"SampleAfterValue": "100003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x5E",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Cycles when Reservation Station (RS) is empty for the thread",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "RS_EVENTS.EMPTY_CYCLES",
|
||||
"PublicDescription": "Counts cycles during which the reservation station (RS) is empty for the thread.; Note: In ST-mode, not active thread should drive 0. This is usually caused by severely costly branch mispredictions, or allocator/FE issues.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EdgeDetect": "1",
|
||||
"Invert": "1",
|
||||
"EventCode": "0x5E",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Counts end of periods where the Reservation Station (RS) was empty. Could be useful to precisely locate Frontend Latency Bound issues.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "RS_EVENTS.EMPTY_END",
|
||||
"CounterMask": "1",
|
||||
"PublicDescription": "Counts end of periods where the Reservation Station (RS) was empty. Could be useful to precisely locate front-end Latency Bound issues.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x87",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Stalls caused by changing prefix length of the instruction.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "ILD_STALL.LCP",
|
||||
"PublicDescription": "Counts cycles that the Instruction Length decoder (ILD) stalls occurred due to dynamically changing prefix length of the decoded instruction (by operand size prefix instruction 0x66, address size prefix instruction 0x67 or REX.W for Intel64). Count is proportional to the number of prefixes in a 16B-line. This may result in a three-cycle penalty for each LCP (Length changing prefix) in a 16-byte chunk.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xA1",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Cycles per thread when uops are executed in port 0",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "UOPS_DISPATCHED_PORT.PORT_0",
|
||||
"PublicDescription": "Counts, on the per-thread basis, cycles during which at least one uop is dispatched from the Reservation Station (RS) to port 0.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xA1",
|
||||
"UMask": "0x2",
|
||||
"BriefDescription": "Cycles per thread when uops are executed in port 1",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "UOPS_DISPATCHED_PORT.PORT_1",
|
||||
"PublicDescription": "Counts, on the per-thread basis, cycles during which at least one uop is dispatched from the Reservation Station (RS) to port 1.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xA1",
|
||||
"UMask": "0x4",
|
||||
"BriefDescription": "Cycles per thread when uops are executed in port 2",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "UOPS_DISPATCHED_PORT.PORT_2",
|
||||
"PublicDescription": "Counts, on the per-thread basis, cycles during which at least one uop is dispatched from the Reservation Station (RS) to port 2.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xA1",
|
||||
"UMask": "0x8",
|
||||
"BriefDescription": "Cycles per thread when uops are executed in port 3",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "UOPS_DISPATCHED_PORT.PORT_3",
|
||||
"PublicDescription": "Counts, on the per-thread basis, cycles during which at least one uop is dispatched from the Reservation Station (RS) to port 3.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xA1",
|
||||
"UMask": "0x10",
|
||||
"BriefDescription": "Cycles per thread when uops are executed in port 4",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "UOPS_DISPATCHED_PORT.PORT_4",
|
||||
"PublicDescription": "Counts, on the per-thread basis, cycles during which at least one uop is dispatched from the Reservation Station (RS) to port 4.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xA1",
|
||||
"UMask": "0x20",
|
||||
"BriefDescription": "Cycles per thread when uops are executed in port 5",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "UOPS_DISPATCHED_PORT.PORT_5",
|
||||
"PublicDescription": "Counts, on the per-thread basis, cycles during which at least one uop is dispatched from the Reservation Station (RS) to port 5.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xA1",
|
||||
"UMask": "0x40",
|
||||
"BriefDescription": "Cycles per thread when uops are executed in port 6",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "UOPS_DISPATCHED_PORT.PORT_6",
|
||||
"PublicDescription": "Counts, on the per-thread basis, cycles during which at least one uop is dispatched from the Reservation Station (RS) to port 6.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xA1",
|
||||
"UMask": "0x80",
|
||||
"BriefDescription": "Cycles per thread when uops are executed in port 7",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "UOPS_DISPATCHED_PORT.PORT_7",
|
||||
"PublicDescription": "Counts, on the per-thread basis, cycles during which at least one uop is dispatched from the Reservation Station (RS) to port 7.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xA2",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Resource-related stall cycles",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "RESOURCE_STALLS.ANY",
|
||||
"PublicDescription": "Counts resource-related stall cycles. Reasons for stalls can be as follows:a. *any* u-arch structure got full (LB, SB, RS, ROB, BOB, LM, Physical Register Reclaim Table (PRRT), or Physical History Table (PHT) slots).b. *any* u-arch structure got empty (like INT/SIMD FreeLists).c. FPU control word (FPCW), MXCSR.and others. This counts cycles that the pipeline back-end blocked uop delivery from the front-end.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xA2",
|
||||
"UMask": "0x8",
|
||||
"BriefDescription": "Cycles stalled due to no store buffers available. (not including draining form sync).",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "RESOURCE_STALLS.SB",
|
||||
"PublicDescription": "Counts allocation stall cycles caused by the store buffer (SB) being full. This counts cycles that the pipeline back-end blocked uop delivery from the front-end.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xA3",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Cycles while L2 cache miss demand load is outstanding.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "CYCLE_ACTIVITY.CYCLES_L2_MISS",
|
||||
"CounterMask": "1",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xA3",
|
||||
"UMask": "0x4",
|
||||
"BriefDescription": "Total execution stalls.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "CYCLE_ACTIVITY.STALLS_TOTAL",
|
||||
"CounterMask": "4",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xA3",
|
||||
"UMask": "0x5",
|
||||
"BriefDescription": "Execution stalls while L2 cache miss demand load is outstanding.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "CYCLE_ACTIVITY.STALLS_L2_MISS",
|
||||
"CounterMask": "5",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xA3",
|
||||
"UMask": "0x8",
|
||||
"BriefDescription": "Cycles while L1 cache miss demand load is outstanding.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "CYCLE_ACTIVITY.CYCLES_L1D_MISS",
|
||||
"CounterMask": "8",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xA3",
|
||||
"UMask": "0xc",
|
||||
"BriefDescription": "Execution stalls while L1 cache miss demand load is outstanding.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "CYCLE_ACTIVITY.STALLS_L1D_MISS",
|
||||
"CounterMask": "12",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xA3",
|
||||
"UMask": "0x10",
|
||||
"BriefDescription": "Cycles while memory subsystem has an outstanding load.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "CYCLE_ACTIVITY.CYCLES_MEM_ANY",
|
||||
"CounterMask": "16",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xA3",
|
||||
"UMask": "0x14",
|
||||
"BriefDescription": "Execution stalls while memory subsystem has an outstanding load.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "CYCLE_ACTIVITY.STALLS_MEM_ANY",
|
||||
"CounterMask": "20",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xA6",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Cycles where no uops were executed, the Reservation Station was not empty, the Store Buffer was full and there was no outstanding load.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "EXE_ACTIVITY.EXE_BOUND_0_PORTS",
|
||||
"PublicDescription": "Counts cycles during which no uops were executed on all ports and Reservation Station (RS) was not empty.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xA6",
|
||||
"UMask": "0x2",
|
||||
"BriefDescription": "Cycles total of 1 uop is executed on all ports and Reservation Station was not empty.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "EXE_ACTIVITY.1_PORTS_UTIL",
|
||||
"PublicDescription": "Counts cycles during which a total of 1 uop was executed on all ports and Reservation Station (RS) was not empty.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xA6",
|
||||
"UMask": "0x4",
|
||||
"BriefDescription": "Cycles total of 2 uops are executed on all ports and Reservation Station was not empty.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "EXE_ACTIVITY.2_PORTS_UTIL",
|
||||
"PublicDescription": "Counts cycles during which a total of 2 uops were executed on all ports and Reservation Station (RS) was not empty.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xA6",
|
||||
"UMask": "0x8",
|
||||
"BriefDescription": "Cycles total of 3 uops are executed on all ports and Reservation Station was not empty.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "EXE_ACTIVITY.3_PORTS_UTIL",
|
||||
"PublicDescription": "Cycles total of 3 uops are executed on all ports and Reservation Station (RS) was not empty.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xA6",
|
||||
"UMask": "0x10",
|
||||
"BriefDescription": "Cycles total of 4 uops are executed on all ports and Reservation Station was not empty.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "EXE_ACTIVITY.4_PORTS_UTIL",
|
||||
"PublicDescription": "Cycles total of 4 uops are executed on all ports and Reservation Station (RS) was not empty.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xA6",
|
||||
"UMask": "0x40",
|
||||
"BriefDescription": "Cycles where the Store Buffer was full and no outstanding load.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "EXE_ACTIVITY.BOUND_ON_STORES",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xA8",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Number of Uops delivered by the LSD.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "LSD.UOPS",
|
||||
"PublicDescription": "Number of uops delivered to the back-end by the LSD(Loop Stream Detector).",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xA8",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Cycles Uops delivered by the LSD, but didn't come from the decoder.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "LSD.CYCLES_ACTIVE",
|
||||
"CounterMask": "1",
|
||||
"PublicDescription": "Counts the cycles when at least one uop is delivered by the LSD (Loop-stream detector).",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xA8",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Cycles 4 Uops delivered by the LSD, but didn't come from the decoder.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "LSD.CYCLES_4_UOPS",
|
||||
"CounterMask": "4",
|
||||
"PublicDescription": "Counts the cycles when 4 uops are delivered by the LSD (Loop-stream detector).",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xB1",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Counts the number of uops to be executed per-thread each cycle.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "UOPS_EXECUTED.THREAD",
|
||||
"PublicDescription": "Number of uops to be executed per-thread each cycle.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"Invert": "1",
|
||||
"EventCode": "0xB1",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Counts number of cycles no uops were dispatched to be executed on this thread.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "UOPS_EXECUTED.STALL_CYCLES",
|
||||
"CounterMask": "1",
|
||||
"PublicDescription": "Counts cycles during which no uops were dispatched from the Reservation Station (RS) per thread.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xB1",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Cycles where at least 1 uop was executed per-thread",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "UOPS_EXECUTED.CYCLES_GE_1_UOP_EXEC",
|
||||
"CounterMask": "1",
|
||||
"PublicDescription": "Cycles where at least 1 uop was executed per-thread.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xB1",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Cycles where at least 2 uops were executed per-thread",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "UOPS_EXECUTED.CYCLES_GE_2_UOPS_EXEC",
|
||||
"CounterMask": "2",
|
||||
"PublicDescription": "Cycles where at least 2 uops were executed per-thread.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xB1",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Cycles where at least 3 uops were executed per-thread",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "UOPS_EXECUTED.CYCLES_GE_3_UOPS_EXEC",
|
||||
"CounterMask": "3",
|
||||
"PublicDescription": "Cycles where at least 3 uops were executed per-thread.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xB1",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Cycles where at least 4 uops were executed per-thread",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "UOPS_EXECUTED.CYCLES_GE_4_UOPS_EXEC",
|
||||
"CounterMask": "4",
|
||||
"PublicDescription": "Cycles where at least 4 uops were executed per-thread.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xB1",
|
||||
"UMask": "0x2",
|
||||
"BriefDescription": "Number of uops executed on the core.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "UOPS_EXECUTED.CORE",
|
||||
"PublicDescription": "Number of uops executed from any thread.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xB1",
|
||||
"UMask": "0x2",
|
||||
"BriefDescription": "Cycles at least 1 micro-op is executed from any thread on physical core.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_1",
|
||||
"CounterMask": "1",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xB1",
|
||||
"UMask": "0x2",
|
||||
"BriefDescription": "Cycles at least 2 micro-op is executed from any thread on physical core.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_2",
|
||||
"CounterMask": "2",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xB1",
|
||||
"UMask": "0x2",
|
||||
"BriefDescription": "Cycles at least 3 micro-op is executed from any thread on physical core.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_3",
|
||||
"CounterMask": "3",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xB1",
|
||||
"UMask": "0x2",
|
||||
"BriefDescription": "Cycles at least 4 micro-op is executed from any thread on physical core.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "UOPS_EXECUTED.CORE_CYCLES_GE_4",
|
||||
"CounterMask": "4",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"Invert": "1",
|
||||
"EventCode": "0xB1",
|
||||
"UMask": "0x2",
|
||||
"BriefDescription": "Cycles with no micro-ops executed from any thread on physical core.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "UOPS_EXECUTED.CORE_CYCLES_NONE",
|
||||
"CounterMask": "1",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xB1",
|
||||
"UMask": "0x10",
|
||||
"BriefDescription": "Counts the number of x87 uops dispatched.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "UOPS_EXECUTED.X87",
|
||||
"PublicDescription": "Counts the number of x87 uops executed.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC0",
|
||||
"UMask": "0x0",
|
||||
"BriefDescription": "Number of instructions retired. General Counter - architectural event",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "INST_RETIRED.ANY_P",
|
||||
"Errata": "SKL091, SKL044",
|
||||
"PublicDescription": "Counts the number of instructions (EOMs) retired. Counting covers macro-fused instructions individually (that is, increments by two).",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC0",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Precise instruction retired event with HW to reduce effect of PEBS shadow in IP distribution",
|
||||
"PEBS": "2",
|
||||
"Counter": "1",
|
||||
"EventName": "INST_RETIRED.PREC_DIST",
|
||||
"Errata": "SKL091, SKL044",
|
||||
"PublicDescription": "A version of INST_RETIRED that allows for a more unbiased distribution of samples across instructions retired. It utilizes the Precise Distribution of Instructions Retired (PDIR) feature to mitigate some bias in how retired instructions get sampled.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "1"
|
||||
},
|
||||
{
|
||||
"Invert": "1",
|
||||
"EventCode": "0xC0",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Number of cycles using always true condition applied to PEBS instructions retired event.",
|
||||
"PEBS": "2",
|
||||
"Counter": "0,2,3",
|
||||
"EventName": "INST_RETIRED.TOTAL_CYCLES_PS",
|
||||
"CounterMask": "10",
|
||||
"Errata": "SKL091, SKL044",
|
||||
"PublicDescription": "Number of cycles using an always true condition applied to PEBS instructions retired event. (inst_ret< 16)",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,2,3"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC1",
|
||||
"UMask": "0x3f",
|
||||
"BriefDescription": "Number of times a microcode assist is invoked by HW other than FP-assist. Examples include AD (page Access Dirty) and AVX* related assists.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "OTHER_ASSISTS.ANY",
|
||||
"SampleAfterValue": "100003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC2",
|
||||
"UMask": "0x2",
|
||||
"BriefDescription": "Retirement slots used.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "UOPS_RETIRED.RETIRE_SLOTS",
|
||||
"PublicDescription": "Counts the retirement slots used.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"Invert": "1",
|
||||
"EventCode": "0xC2",
|
||||
"UMask": "0x2",
|
||||
"BriefDescription": "Cycles without actually retired uops.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "UOPS_RETIRED.STALL_CYCLES",
|
||||
"CounterMask": "1",
|
||||
"PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts cycles without actually retired uops.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"Invert": "1",
|
||||
"EventCode": "0xC2",
|
||||
"UMask": "0x2",
|
||||
"BriefDescription": "Cycles with less than 10 actually retired uops.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "UOPS_RETIRED.TOTAL_CYCLES",
|
||||
"CounterMask": "10",
|
||||
"PublicDescription": "Number of cycles using always true condition (uops_ret < 16) applied to non PEBS uops retired event.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EdgeDetect": "1",
|
||||
"EventCode": "0xC3",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Number of machine clears (nukes) of any type. ",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "MACHINE_CLEARS.COUNT",
|
||||
"CounterMask": "1",
|
||||
"PublicDescription": "Number of machine clears (nukes) of any type.",
|
||||
"SampleAfterValue": "100003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC3",
|
||||
"UMask": "0x4",
|
||||
"BriefDescription": "Self-modifying code (SMC) detected.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "MACHINE_CLEARS.SMC",
|
||||
"PublicDescription": "Counts self-modifying code (SMC) detected, which causes a machine clear.",
|
||||
"SampleAfterValue": "100003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC4",
|
||||
"UMask": "0x0",
|
||||
"BriefDescription": "All (macro) branch instructions retired.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "BR_INST_RETIRED.ALL_BRANCHES",
|
||||
"Errata": "SKL091",
|
||||
"PublicDescription": "Counts all (macro) branch instructions retired.",
|
||||
"SampleAfterValue": "400009",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC4",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Conditional branch instructions retired.",
|
||||
"PEBS": "1",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "BR_INST_RETIRED.CONDITIONAL",
|
||||
"Errata": "SKL091",
|
||||
"PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts conditional branch instructions retired.",
|
||||
"SampleAfterValue": "400009",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC4",
|
||||
"UMask": "0x2",
|
||||
"BriefDescription": "Direct and indirect near call instructions retired.",
|
||||
"PEBS": "1",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "BR_INST_RETIRED.NEAR_CALL",
|
||||
"Errata": "SKL091",
|
||||
"PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts both direct and indirect near call instructions retired.",
|
||||
"SampleAfterValue": "100007",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC4",
|
||||
"UMask": "0x4",
|
||||
"BriefDescription": "All (macro) branch instructions retired. ",
|
||||
"PEBS": "2",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "BR_INST_RETIRED.ALL_BRANCHES_PEBS",
|
||||
"Errata": "SKL091",
|
||||
"PublicDescription": "This is a precise version of BR_INST_RETIRED.ALL_BRANCHES that counts all (macro) branch instructions retired.",
|
||||
"SampleAfterValue": "400009",
|
||||
"CounterHTOff": "0,1,2,3"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC4",
|
||||
"UMask": "0x8",
|
||||
"BriefDescription": "Return instructions retired.",
|
||||
"PEBS": "1",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "BR_INST_RETIRED.NEAR_RETURN",
|
||||
"Errata": "SKL091",
|
||||
"PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts return instructions retired.",
|
||||
"SampleAfterValue": "100007",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC4",
|
||||
"UMask": "0x10",
|
||||
"BriefDescription": "Not taken branch instructions retired.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "BR_INST_RETIRED.NOT_TAKEN",
|
||||
"Errata": "SKL091",
|
||||
"PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts not taken branch instructions retired.",
|
||||
"SampleAfterValue": "400009",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC4",
|
||||
"UMask": "0x20",
|
||||
"BriefDescription": "Taken branch instructions retired.",
|
||||
"PEBS": "1",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "BR_INST_RETIRED.NEAR_TAKEN",
|
||||
"Errata": "SKL091",
|
||||
"PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts taken branch instructions retired.",
|
||||
"SampleAfterValue": "400009",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC4",
|
||||
"UMask": "0x40",
|
||||
"BriefDescription": "Far branch instructions retired.",
|
||||
"PEBS": "1",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "BR_INST_RETIRED.FAR_BRANCH",
|
||||
"Errata": "SKL091",
|
||||
"PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts far branch instructions retired.",
|
||||
"SampleAfterValue": "100007",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC5",
|
||||
"UMask": "0x0",
|
||||
"BriefDescription": "All mispredicted macro branch instructions retired.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "BR_MISP_RETIRED.ALL_BRANCHES",
|
||||
"PublicDescription": "Counts all the retired branch instructions that were mispredicted by the processor. A branch misprediction occurs when the processor incorrectly predicts the destination of the branch. When the misprediction is discovered at execution, all the instructions executed in the wrong (speculative) path must be discarded, and the processor must start fetching from the correct path.",
|
||||
"SampleAfterValue": "400009",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC5",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Mispredicted conditional branch instructions retired.",
|
||||
"PEBS": "1",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "BR_MISP_RETIRED.CONDITIONAL",
|
||||
"PublicDescription": "This is a non-precise version (that is, does not use PEBS) of the event that counts mispredicted conditional branch instructions retired.",
|
||||
"SampleAfterValue": "400009",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC5",
|
||||
"UMask": "0x2",
|
||||
"BriefDescription": "Mispredicted direct and indirect near call instructions retired.",
|
||||
"PEBS": "1",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "BR_MISP_RETIRED.NEAR_CALL",
|
||||
"PublicDescription": "Counts both taken and not taken retired mispredicted direct and indirect near calls, including both register and memory indirect.",
|
||||
"SampleAfterValue": "400009",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC5",
|
||||
"UMask": "0x4",
|
||||
"BriefDescription": "Mispredicted macro branch instructions retired. ",
|
||||
"PEBS": "2",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "BR_MISP_RETIRED.ALL_BRANCHES_PEBS",
|
||||
"PublicDescription": "This is a precise version of BR_MISP_RETIRED.ALL_BRANCHES that counts all mispredicted macro branch instructions retired.",
|
||||
"SampleAfterValue": "400009",
|
||||
"CounterHTOff": "0,1,2,3"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xC5",
|
||||
"UMask": "0x20",
|
||||
"BriefDescription": "Number of near branch instructions retired that were mispredicted and taken.",
|
||||
"PEBS": "1",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "BR_MISP_RETIRED.NEAR_TAKEN",
|
||||
"SampleAfterValue": "400009",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xCC",
|
||||
"UMask": "0x20",
|
||||
"BriefDescription": "Increments whenever there is an update to the LBR array.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "ROB_MISC_EVENTS.LBR_INSERTS",
|
||||
"PublicDescription": "Increments when an entry is added to the Last Branch Record (LBR) array (or removed from the array in case of RETURNs in call stack mode). The event requires LBR enable via IA32_DEBUGCTL MSR and branch type selection via MSR_LBR_SELECT.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xE6",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Counts the total number when the front end is resteered, mainly when the BPU cannot provide a correct prediction and this is corrected by other branch handling mechanisms at the front end.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "BACLEARS.ANY",
|
||||
"PublicDescription": "Counts the number of times the front-end is resteered when it finds a branch instruction in a fetch line. This occurs for the first time a branch instruction is fetched or when the branch is not tracked by the BPU (Branch Prediction Unit) anymore.",
|
||||
"SampleAfterValue": "100003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
}
|
||||
]
|
||||
172
tools/perf/pmu-events/arch/x86/skylakex/uncore-memory.json
Normal file
172
tools/perf/pmu-events/arch/x86/skylakex/uncore-memory.json
Normal file
|
|
@ -0,0 +1,172 @@
|
|||
[
|
||||
{
|
||||
"BriefDescription": "read requests to memory controller. Derived from unc_m_cas_count.rd",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventCode": "0x4",
|
||||
"EventName": "LLC_MISSES.MEM_READ",
|
||||
"PerPkg": "1",
|
||||
"ScaleUnit": "64Bytes",
|
||||
"UMask": "0x3",
|
||||
"Unit": "iMC"
|
||||
},
|
||||
{
|
||||
"BriefDescription": "write requests to memory controller. Derived from unc_m_cas_count.wr",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventCode": "0x4",
|
||||
"EventName": "LLC_MISSES.MEM_WRITE",
|
||||
"PerPkg": "1",
|
||||
"ScaleUnit": "64Bytes",
|
||||
"UMask": "0xC",
|
||||
"Unit": "iMC"
|
||||
},
|
||||
{
|
||||
"BriefDescription": "Memory controller clock ticks",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "UNC_M_CLOCKTICKS",
|
||||
"PerPkg": "1",
|
||||
"Unit": "iMC"
|
||||
},
|
||||
{
|
||||
"BriefDescription": "Cycles where DRAM ranks are in power down (CKE) mode",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventCode": "0x85",
|
||||
"EventName": "UNC_M_POWER_CHANNEL_PPD",
|
||||
"MetricExpr": "(UNC_M_POWER_CHANNEL_PPD / UNC_M_CLOCKTICKS) * 100.",
|
||||
"MetricName": "power_channel_ppd %",
|
||||
"PerPkg": "1",
|
||||
"Unit": "iMC"
|
||||
},
|
||||
{
|
||||
"BriefDescription": "Cycles Memory is in self refresh power mode",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventCode": "0x43",
|
||||
"EventName": "UNC_M_POWER_SELF_REFRESH",
|
||||
"MetricExpr": "(UNC_M_POWER_SELF_REFRESH / UNC_M_CLOCKTICKS) * 100.",
|
||||
"MetricName": "power_self_refresh %",
|
||||
"PerPkg": "1",
|
||||
"Unit": "iMC"
|
||||
},
|
||||
{
|
||||
"BriefDescription": "Pre-charges due to page misses",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventCode": "0x2",
|
||||
"EventName": "UNC_M_PRE_COUNT.PAGE_MISS",
|
||||
"PerPkg": "1",
|
||||
"UMask": "0x1",
|
||||
"Unit": "iMC"
|
||||
},
|
||||
{
|
||||
"BriefDescription": "Pre-charge for reads",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventCode": "0x2",
|
||||
"EventName": "UNC_M_PRE_COUNT.RD",
|
||||
"PerPkg": "1",
|
||||
"UMask": "0x4",
|
||||
"Unit": "iMC"
|
||||
},
|
||||
{
|
||||
"BriefDescription": "Pre-charge for writes",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventCode": "0x2",
|
||||
"EventName": "UNC_M_PRE_COUNT.WR",
|
||||
"PerPkg": "1",
|
||||
"UMask": "0x8",
|
||||
"Unit": "iMC"
|
||||
},
|
||||
{
|
||||
"BriefDescription": "DRAM Page Activate commands sent due to a write request",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventCode": "0x1",
|
||||
"EventName": "UNC_M_ACT_COUNT.WR",
|
||||
"PerPkg": "1",
|
||||
"PublicDescription": "Counts DRAM Page Activate commands sent on this channel due to a write request to the iMC (Memory Controller). Activate commands are issued to open up a page on the DRAM devices so that it can be read or written to with a CAS (Column Access Select) command.",
|
||||
"UMask": "0x2",
|
||||
"Unit": "iMC"
|
||||
},
|
||||
{
|
||||
"BriefDescription": "All DRAM CAS Commands issued",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventCode": "0x4",
|
||||
"EventName": "UNC_M_CAS_COUNT.ALL",
|
||||
"PerPkg": "1",
|
||||
"PublicDescription": "Counts all CAS (Column Address Select) commands issued to DRAM per memory channel. CAS commands are issued to specify the address to read or write on DRAM, so this event increments for every read and write. This event counts whether AutoPrecharge (which closes the DRAM Page automatically after a read/write) is enabled or not.",
|
||||
"UMask": "0xF",
|
||||
"Unit": "iMC"
|
||||
},
|
||||
{
|
||||
"BriefDescription": "read requests to memory controller. Derived from unc_m_cas_count.rd",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventCode": "0x4",
|
||||
"EventName": "LLC_MISSES.MEM_READ",
|
||||
"PerPkg": "1",
|
||||
"ScaleUnit": "64Bytes",
|
||||
"UMask": "0x3",
|
||||
"Unit": "iMC"
|
||||
},
|
||||
{
|
||||
"BriefDescription": "All DRAM Read CAS Commands issued (does not include underfills) ",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventCode": "0x4",
|
||||
"EventName": "UNC_M_CAS_COUNT.RD_REG",
|
||||
"PerPkg": "1",
|
||||
"PublicDescription": "Counts CAS (Column Access Select) regular read commands issued to DRAM on a per channel basis. CAS commands are issued to specify the address to read or write on DRAM, and this event increments for every regular read. This event only counts regular reads and does not includes underfill reads due to partial write requests. This event counts whether AutoPrecharge (which closes the DRAM Page automatically after a read/write) is enabled or not.",
|
||||
"UMask": "0x1",
|
||||
"Unit": "iMC"
|
||||
},
|
||||
{
|
||||
"BriefDescription": "DRAM Underfill Read CAS Commands issued",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventCode": "0x4",
|
||||
"EventName": "UNC_M_CAS_COUNT.RD_UNDERFILL",
|
||||
"PerPkg": "1",
|
||||
"PublicDescription": "Counts CAS (Column Access Select) underfill read commands issued to DRAM due to a partial write, on a per channel basis. CAS commands are issued to specify the address to read or write on DRAM, and this command counts underfill reads. Partial writes must be completed by first reading in the underfill from DRAM and then merging in the partial write data before writing the full line back to DRAM. This event will generally count about the same as the number of partial writes, but may be slightly less because of partials hitting in the WPQ (due to a previous write request). ",
|
||||
"UMask": "0x2",
|
||||
"Unit": "iMC"
|
||||
},
|
||||
{
|
||||
"BriefDescription": "write requests to memory controller. Derived from unc_m_cas_count.wr",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventCode": "0x4",
|
||||
"EventName": "LLC_MISSES.MEM_WRITE",
|
||||
"PerPkg": "1",
|
||||
"ScaleUnit": "64Bytes",
|
||||
"UMask": "0xC",
|
||||
"Unit": "iMC"
|
||||
},
|
||||
{
|
||||
"BriefDescription": "Read Pending Queue Allocations",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventCode": "0x10",
|
||||
"EventName": "UNC_M_RPQ_INSERTS",
|
||||
"PerPkg": "1",
|
||||
"PublicDescription": "Counts the number of read requests allocated into the Read Pending Queue (RPQ). This queue is used to schedule reads out to the memory controller and to track the requests. Requests allocate into the RPQ soon after they enter the memory controller, and need credits for an entry in this buffer before being sent from the CHA to the iMC. The requests deallocate after the read CAS command has been issued to DRAM. This event counts both Isochronous and non-Isochronous requests which were issued to the RPQ. ",
|
||||
"Unit": "iMC"
|
||||
},
|
||||
{
|
||||
"BriefDescription": "Read Pending Queue Occupancy",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventCode": "0x80",
|
||||
"EventName": "UNC_M_RPQ_OCCUPANCY",
|
||||
"PerPkg": "1",
|
||||
"PublicDescription": "Counts the number of entries in the Read Pending Queue (RPQ) at each cycle. This can then be used to calculate both the average occupancy of the queue (in conjunction with the number of cycles not empty) and the average latency in the queue (in conjunction with the number of allocations). The RPQ is used to schedule reads out to the memory controller and to track the requests. Requests allocate into the RPQ soon after they enter the memory controller, and need credits for an entry in this buffer before being sent from the CHA to the iMC. They deallocate from the RPQ after the CAS command has been issued to memory.",
|
||||
"Unit": "iMC"
|
||||
},
|
||||
{
|
||||
"BriefDescription": "Write Pending Queue Allocations",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventCode": "0x20",
|
||||
"EventName": "UNC_M_WPQ_INSERTS",
|
||||
"PerPkg": "1",
|
||||
"PublicDescription": "Counts the number of writes requests allocated into the Write Pending Queue (WPQ). The WPQ is used to schedule writes out to the memory controller and to track the requests. Requests allocate into the WPQ soon after they enter the memory controller, and need credits for an entry in this buffer before being sent from the CHA to the iMC (Memory Controller). The write requests deallocate after being issued to DRAM. Write requests themselves are able to complete (from the perspective of the rest of the system) as soon they have 'posted' to the iMC.",
|
||||
"Unit": "iMC"
|
||||
},
|
||||
{
|
||||
"BriefDescription": "Write Pending Queue Occupancy",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventCode": "0x81",
|
||||
"EventName": "UNC_M_WPQ_OCCUPANCY",
|
||||
"PerPkg": "1",
|
||||
"PublicDescription": "Counts the number of entries in the Write Pending Queue (WPQ) at each cycle. This can then be used to calculate both the average queue occupancy (in conjunction with the number of cycles not empty) and the average latency (in conjunction with the number of allocations). The WPQ is used to schedule writes out to the memory controller and to track the requests.",
|
||||
"Unit": "iMC"
|
||||
}
|
||||
]
|
||||
1156
tools/perf/pmu-events/arch/x86/skylakex/uncore-other.json
Normal file
1156
tools/perf/pmu-events/arch/x86/skylakex/uncore-other.json
Normal file
File diff suppressed because it is too large
Load diff
284
tools/perf/pmu-events/arch/x86/skylakex/virtual-memory.json
Normal file
284
tools/perf/pmu-events/arch/x86/skylakex/virtual-memory.json
Normal file
|
|
@ -0,0 +1,284 @@
|
|||
[
|
||||
{
|
||||
"EventCode": "0x08",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Load misses in all DTLB levels that cause page walks",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "DTLB_LOAD_MISSES.MISS_CAUSES_A_WALK",
|
||||
"PublicDescription": "Counts demand data loads that caused a page walk of any page size (4K/2M/4M/1G). This implies it missed in all TLB levels, but the walk need not have completed.",
|
||||
"SampleAfterValue": "100003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x08",
|
||||
"UMask": "0x2",
|
||||
"BriefDescription": "Demand load Miss in all translation lookaside buffer (TLB) levels causes a page walk that completes (4K).",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "DTLB_LOAD_MISSES.WALK_COMPLETED_4K",
|
||||
"PublicDescription": "Counts demand data loads that caused a completed page walk (4K page size). This implies it missed in all TLB levels. The page walk can end with or without a fault.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x08",
|
||||
"UMask": "0x4",
|
||||
"BriefDescription": "Demand load Miss in all translation lookaside buffer (TLB) levels causes a page walk that completes (2M/4M).",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "DTLB_LOAD_MISSES.WALK_COMPLETED_2M_4M",
|
||||
"PublicDescription": "Counts demand data loads that caused a completed page walk (2M and 4M page sizes). This implies it missed in all TLB levels. The page walk can end with or without a fault.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x08",
|
||||
"UMask": "0x8",
|
||||
"BriefDescription": "Load miss in all TLB levels causes a page walk that completes. (1G)",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "DTLB_LOAD_MISSES.WALK_COMPLETED_1G",
|
||||
"PublicDescription": "Counts load misses in all DTLB levels that cause a completed page walk (1G page size). The page walk can end with or without a fault.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x08",
|
||||
"UMask": "0xe",
|
||||
"BriefDescription": "Load miss in all TLB levels causes a page walk that completes. (All page sizes)",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "DTLB_LOAD_MISSES.WALK_COMPLETED",
|
||||
"PublicDescription": "Counts demand data loads that caused a completed page walk of any page size (4K/2M/4M/1G). This implies it missed in all TLB levels. The page walk can end with or without a fault.",
|
||||
"SampleAfterValue": "100003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x08",
|
||||
"UMask": "0x10",
|
||||
"BriefDescription": "Counts 1 per cycle for each PMH that is busy with a page walk for a load. EPT page walk duration are excluded in Skylake. ",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "DTLB_LOAD_MISSES.WALK_PENDING",
|
||||
"PublicDescription": "Counts 1 per cycle for each PMH that is busy with a page walk for a load. EPT page walk duration are excluded in Skylake microarchitecture. ",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x08",
|
||||
"UMask": "0x10",
|
||||
"BriefDescription": "Cycles when at least one PMH is busy with a page walk for a load. EPT page walk duration are excluded in Skylake. ",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "DTLB_LOAD_MISSES.WALK_ACTIVE",
|
||||
"CounterMask": "1",
|
||||
"PublicDescription": "Counts cycles when at least one PMH (Page Miss Handler) is busy with a page walk for a load.",
|
||||
"SampleAfterValue": "100003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x08",
|
||||
"UMask": "0x20",
|
||||
"BriefDescription": "Loads that miss the DTLB and hit the STLB.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "DTLB_LOAD_MISSES.STLB_HIT",
|
||||
"PublicDescription": "Counts loads that miss the DTLB (Data TLB) and hit the STLB (Second level TLB).",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x49",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Store misses in all DTLB levels that cause page walks",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "DTLB_STORE_MISSES.MISS_CAUSES_A_WALK",
|
||||
"PublicDescription": "Counts demand data stores that caused a page walk of any page size (4K/2M/4M/1G). This implies it missed in all TLB levels, but the walk need not have completed.",
|
||||
"SampleAfterValue": "100003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x49",
|
||||
"UMask": "0x2",
|
||||
"BriefDescription": "Store miss in all TLB levels causes a page walk that completes. (4K)",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "DTLB_STORE_MISSES.WALK_COMPLETED_4K",
|
||||
"PublicDescription": "Counts demand data stores that caused a completed page walk (4K page size). This implies it missed in all TLB levels. The page walk can end with or without a fault.",
|
||||
"SampleAfterValue": "100003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x49",
|
||||
"UMask": "0x4",
|
||||
"BriefDescription": "Store misses in all DTLB levels that cause completed page walks (2M/4M)",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "DTLB_STORE_MISSES.WALK_COMPLETED_2M_4M",
|
||||
"PublicDescription": "Counts demand data stores that caused a completed page walk (2M and 4M page sizes). This implies it missed in all TLB levels. The page walk can end with or without a fault.",
|
||||
"SampleAfterValue": "100003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x49",
|
||||
"UMask": "0x8",
|
||||
"BriefDescription": "Store misses in all DTLB levels that cause completed page walks (1G)",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "DTLB_STORE_MISSES.WALK_COMPLETED_1G",
|
||||
"PublicDescription": "Counts store misses in all DTLB levels that cause a completed page walk (1G page size). The page walk can end with or without a fault.",
|
||||
"SampleAfterValue": "100003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x49",
|
||||
"UMask": "0xe",
|
||||
"BriefDescription": "Store misses in all TLB levels causes a page walk that completes. (All page sizes)",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "DTLB_STORE_MISSES.WALK_COMPLETED",
|
||||
"PublicDescription": "Counts demand data stores that caused a completed page walk of any page size (4K/2M/4M/1G). This implies it missed in all TLB levels. The page walk can end with or without a fault.",
|
||||
"SampleAfterValue": "100003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x49",
|
||||
"UMask": "0x10",
|
||||
"BriefDescription": "Counts 1 per cycle for each PMH that is busy with a page walk for a store. EPT page walk duration are excluded in Skylake. ",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "DTLB_STORE_MISSES.WALK_PENDING",
|
||||
"PublicDescription": "Counts 1 per cycle for each PMH that is busy with a page walk for a store. EPT page walk duration are excluded in Skylake microarchitecture. ",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x49",
|
||||
"UMask": "0x10",
|
||||
"BriefDescription": "Cycles when at least one PMH is busy with a page walk for a store. EPT page walk duration are excluded in Skylake. ",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "DTLB_STORE_MISSES.WALK_ACTIVE",
|
||||
"CounterMask": "1",
|
||||
"PublicDescription": "Counts cycles when at least one PMH (Page Miss Handler) is busy with a page walk for a store.",
|
||||
"SampleAfterValue": "100003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x49",
|
||||
"UMask": "0x20",
|
||||
"BriefDescription": "Stores that miss the DTLB and hit the STLB.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "DTLB_STORE_MISSES.STLB_HIT",
|
||||
"PublicDescription": "Stores that miss the DTLB (Data TLB) and hit the STLB (2nd Level TLB).",
|
||||
"SampleAfterValue": "100003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x4F",
|
||||
"UMask": "0x10",
|
||||
"BriefDescription": "Counts 1 per cycle for each PMH that is busy with a EPT (Extended Page Table) walk for any request type.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "EPT.WALK_PENDING",
|
||||
"PublicDescription": "Counts cycles for each PMH (Page Miss Handler) that is busy with an EPT (Extended Page Table) walk for any request type.",
|
||||
"SampleAfterValue": "2000003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x85",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Misses at all ITLB levels that cause page walks",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "ITLB_MISSES.MISS_CAUSES_A_WALK",
|
||||
"PublicDescription": "Counts page walks of any page size (4K/2M/4M/1G) caused by a code fetch. This implies it missed in the ITLB and further levels of TLB, but the walk need not have completed.",
|
||||
"SampleAfterValue": "100003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x85",
|
||||
"UMask": "0x2",
|
||||
"BriefDescription": "Code miss in all TLB levels causes a page walk that completes. (4K)",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "ITLB_MISSES.WALK_COMPLETED_4K",
|
||||
"PublicDescription": "Counts completed page walks (4K page size) caused by a code fetch. This implies it missed in the ITLB and further levels of TLB. The page walk can end with or without a fault.",
|
||||
"SampleAfterValue": "100003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x85",
|
||||
"UMask": "0x4",
|
||||
"BriefDescription": "Code miss in all TLB levels causes a page walk that completes. (2M/4M)",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "ITLB_MISSES.WALK_COMPLETED_2M_4M",
|
||||
"PublicDescription": "Counts completed page walks of any page size (4K/2M/4M/1G) caused by a code fetch. This implies it missed in the ITLB and further levels of TLB. The page walk can end with or without a fault.",
|
||||
"SampleAfterValue": "100003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x85",
|
||||
"UMask": "0x8",
|
||||
"BriefDescription": "Code miss in all TLB levels causes a page walk that completes. (1G)",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "ITLB_MISSES.WALK_COMPLETED_1G",
|
||||
"PublicDescription": "Counts store misses in all DTLB levels that cause a completed page walk (1G page size). The page walk can end with or without a fault.",
|
||||
"SampleAfterValue": "100003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x85",
|
||||
"UMask": "0xe",
|
||||
"BriefDescription": "Code miss in all TLB levels causes a page walk that completes. (All page sizes)",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "ITLB_MISSES.WALK_COMPLETED",
|
||||
"PublicDescription": "Counts completed page walks (2M and 4M page sizes) caused by a code fetch. This implies it missed in the ITLB and further levels of TLB. The page walk can end with or without a fault.",
|
||||
"SampleAfterValue": "100003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x85",
|
||||
"UMask": "0x10",
|
||||
"BriefDescription": "Counts 1 per cycle for each PMH that is busy with a page walk for an instruction fetch request. EPT page walk duration are excluded in Skylake. ",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "ITLB_MISSES.WALK_PENDING",
|
||||
"PublicDescription": "Counts 1 per cycle for each PMH (Page Miss Handler) that is busy with a page walk for an instruction fetch request. EPT page walk duration are excluded in Skylake michroarchitecture. ",
|
||||
"SampleAfterValue": "100003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x85",
|
||||
"UMask": "0x10",
|
||||
"BriefDescription": "Cycles when at least one PMH is busy with a page walk for code (instruction fetch) request. EPT page walk duration are excluded in Skylake.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "ITLB_MISSES.WALK_ACTIVE",
|
||||
"CounterMask": "1",
|
||||
"PublicDescription": "Cycles when at least one PMH is busy with a page walk for code (instruction fetch) request. EPT page walk duration are excluded in Skylake microarchitecture.",
|
||||
"SampleAfterValue": "100003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0x85",
|
||||
"UMask": "0x20",
|
||||
"BriefDescription": "Instruction fetch requests that miss the ITLB and hit the STLB.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "ITLB_MISSES.STLB_HIT",
|
||||
"SampleAfterValue": "100003",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xAE",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "Flushing of the Instruction TLB (ITLB) pages, includes 4k/2M/4M pages.",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "ITLB.ITLB_FLUSH",
|
||||
"PublicDescription": "Counts the number of flushes of the big or small ITLB pages. Counting include both TLB Flush (covering all sets) and TLB Set Clear (set-specific).",
|
||||
"SampleAfterValue": "100007",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xBD",
|
||||
"UMask": "0x1",
|
||||
"BriefDescription": "DTLB flush attempts of the thread-specific entries",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "TLB_FLUSH.DTLB_THREAD",
|
||||
"PublicDescription": "Counts the number of DTLB flush attempts of the thread-specific entries.",
|
||||
"SampleAfterValue": "100007",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
},
|
||||
{
|
||||
"EventCode": "0xBD",
|
||||
"UMask": "0x20",
|
||||
"BriefDescription": "STLB flush attempts",
|
||||
"Counter": "0,1,2,3",
|
||||
"EventName": "TLB_FLUSH.STLB_ANY",
|
||||
"PublicDescription": "Counts the number of any STLB flush attempts (such as entire, VPID, PCID, InvPage, CR3 write, etc.).",
|
||||
"SampleAfterValue": "100007",
|
||||
"CounterHTOff": "0,1,2,3,4,5,6,7"
|
||||
}
|
||||
]
|
||||
|
|
@ -137,6 +137,8 @@ static struct field {
|
|||
{ "AnyThread", "any=" },
|
||||
{ "EdgeDetect", "edge=" },
|
||||
{ "SampleAfterValue", "period=" },
|
||||
{ "FCMask", "fc_mask=" },
|
||||
{ "PortMask", "ch_mask=" },
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
|
|
@ -822,10 +824,6 @@ static int process_one_file(const char *fpath, const struct stat *sb,
|
|||
* PMU event tables (see struct pmu_events_map).
|
||||
*
|
||||
* Write out the PMU events tables and the mapping table to pmu-event.c.
|
||||
*
|
||||
* If unable to process the JSON or arch files, create an empty mapping
|
||||
* table so we can continue to build/use perf even if we cannot use the
|
||||
* PMU event aliases.
|
||||
*/
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
|
@ -836,6 +834,7 @@ int main(int argc, char *argv[])
|
|||
const char *arch;
|
||||
const char *output_file;
|
||||
const char *start_dirname;
|
||||
struct stat stbuf;
|
||||
|
||||
prog = basename(argv[0]);
|
||||
if (argc < 4) {
|
||||
|
|
@ -857,11 +856,17 @@ int main(int argc, char *argv[])
|
|||
return 2;
|
||||
}
|
||||
|
||||
sprintf(ldirname, "%s/%s", start_dirname, arch);
|
||||
|
||||
/* If architecture does not have any event lists, bail out */
|
||||
if (stat(ldirname, &stbuf) < 0) {
|
||||
pr_info("%s: Arch %s has no PMU event lists\n", prog, arch);
|
||||
goto empty_map;
|
||||
}
|
||||
|
||||
/* Include pmu-events.h first */
|
||||
fprintf(eventsfp, "#include \"../../pmu-events/pmu-events.h\"\n");
|
||||
|
||||
sprintf(ldirname, "%s/%s", start_dirname, arch);
|
||||
|
||||
/*
|
||||
* The mapfile allows multiple CPUids to point to the same JSON file,
|
||||
* so, not sure if there is a need for symlinks within the pmu-events
|
||||
|
|
@ -878,6 +883,9 @@ int main(int argc, char *argv[])
|
|||
if (rc && verbose) {
|
||||
pr_info("%s: Error walking file tree %s\n", prog, ldirname);
|
||||
goto empty_map;
|
||||
} else if (rc < 0) {
|
||||
/* Make build fail */
|
||||
return 1;
|
||||
} else if (rc) {
|
||||
goto empty_map;
|
||||
}
|
||||
|
|
@ -892,7 +900,8 @@ int main(int argc, char *argv[])
|
|||
|
||||
if (process_mapfile(eventsfp, mapfile)) {
|
||||
pr_info("%s: Error processing mapfile %s\n", prog, mapfile);
|
||||
goto empty_map;
|
||||
/* Make build fail */
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ try:
|
|||
'ia64' : audit.MACH_IA64,
|
||||
'ppc' : audit.MACH_PPC,
|
||||
'ppc64' : audit.MACH_PPC64,
|
||||
'ppc64le' : audit.MACH_PPC64LE,
|
||||
's390' : audit.MACH_S390,
|
||||
's390x' : audit.MACH_S390X,
|
||||
'i386' : audit.MACH_X86,
|
||||
|
|
|
|||
8
tools/perf/scripts/python/bin/export-to-sqlite-record
Normal file
8
tools/perf/scripts/python/bin/export-to-sqlite-record
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
#
|
||||
# export perf data to a sqlite3 database. Can cover
|
||||
# perf ip samples (excluding the tracepoints). No special
|
||||
# record requirements, just record what you want to export.
|
||||
#
|
||||
perf record $@
|
||||
29
tools/perf/scripts/python/bin/export-to-sqlite-report
Normal file
29
tools/perf/scripts/python/bin/export-to-sqlite-report
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
#!/bin/bash
|
||||
# description: export perf data to a sqlite3 database
|
||||
# args: [database name] [columns] [calls]
|
||||
n_args=0
|
||||
for i in "$@"
|
||||
do
|
||||
if expr match "$i" "-" > /dev/null ; then
|
||||
break
|
||||
fi
|
||||
n_args=$(( $n_args + 1 ))
|
||||
done
|
||||
if [ "$n_args" -gt 3 ] ; then
|
||||
echo "usage: export-to-sqlite-report [database name] [columns] [calls]"
|
||||
exit
|
||||
fi
|
||||
if [ "$n_args" -gt 2 ] ; then
|
||||
dbname=$1
|
||||
columns=$2
|
||||
calls=$3
|
||||
shift 3
|
||||
elif [ "$n_args" -gt 1 ] ; then
|
||||
dbname=$1
|
||||
columns=$2
|
||||
shift 2
|
||||
elif [ "$n_args" -gt 0 ] ; then
|
||||
dbname=$1
|
||||
shift
|
||||
fi
|
||||
perf script $@ -s "$PERF_EXEC_PATH"/scripts/python/export-to-sqlite.py $dbname $columns $calls
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/python2
|
||||
# call-graph-from-postgresql.py: create call-graph from postgresql database
|
||||
# Copyright (c) 2014, Intel Corporation.
|
||||
# call-graph-from-sql.py: create call-graph from sql database
|
||||
# Copyright (c) 2014-2017, Intel Corporation.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify it
|
||||
# under the terms and conditions of the GNU General Public License,
|
||||
|
|
@ -11,18 +11,19 @@
|
|||
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
||||
# more details.
|
||||
|
||||
# To use this script you will need to have exported data using the
|
||||
# export-to-postgresql.py script. Refer to that script for details.
|
||||
# To use this script you will need to have exported data using either the
|
||||
# export-to-sqlite.py or the export-to-postgresql.py script. Refer to those
|
||||
# scripts for details.
|
||||
#
|
||||
# Following on from the example in the export-to-postgresql.py script, a
|
||||
# Following on from the example in the export scripts, a
|
||||
# call-graph can be displayed for the pt_example database like this:
|
||||
#
|
||||
# python tools/perf/scripts/python/call-graph-from-postgresql.py pt_example
|
||||
# python tools/perf/scripts/python/call-graph-from-sql.py pt_example
|
||||
#
|
||||
# Note this script supports connecting to remote databases by setting hostname,
|
||||
# port, username, password, and dbname e.g.
|
||||
# Note that for PostgreSQL, this script supports connecting to remote databases
|
||||
# by setting hostname, port, username, password, and dbname e.g.
|
||||
#
|
||||
# python tools/perf/scripts/python/call-graph-from-postgresql.py "hostname=myhost username=myuser password=mypassword dbname=pt_example"
|
||||
# python tools/perf/scripts/python/call-graph-from-sql.py "hostname=myhost username=myuser password=mypassword dbname=pt_example"
|
||||
#
|
||||
# The result is a GUI window with a tree representing a context-sensitive
|
||||
# call-graph. Expanding a couple of levels of the tree and adjusting column
|
||||
|
|
@ -160,7 +161,7 @@ class TreeItem():
|
|||
'( SELECT short_name FROM dsos WHERE id = ( SELECT dso_id FROM symbols WHERE id = ( SELECT symbol_id FROM call_paths WHERE id = call_path_id ) ) ), '
|
||||
'( SELECT ip FROM call_paths where id = call_path_id ) '
|
||||
'FROM calls WHERE parent_call_path_id = ' + str(self.call_path_id) + ' AND comm_id = ' + str(self.comm_id) + ' AND thread_id = ' + str(self.thread_id) +
|
||||
'ORDER BY call_path_id')
|
||||
' ORDER BY call_path_id')
|
||||
if not ret:
|
||||
raise Exception("Query failed: " + query.lastError().text())
|
||||
last_call_path_id = 0
|
||||
|
|
@ -291,29 +292,40 @@ class MainWindow(QMainWindow):
|
|||
|
||||
if __name__ == '__main__':
|
||||
if (len(sys.argv) < 2):
|
||||
print >> sys.stderr, "Usage is: call-graph-from-postgresql.py <database name>"
|
||||
print >> sys.stderr, "Usage is: call-graph-from-sql.py <database name>"
|
||||
raise Exception("Too few arguments")
|
||||
|
||||
dbname = sys.argv[1]
|
||||
|
||||
db = QSqlDatabase.addDatabase('QPSQL')
|
||||
is_sqlite3 = False
|
||||
try:
|
||||
f = open(dbname)
|
||||
if f.read(15) == "SQLite format 3":
|
||||
is_sqlite3 = True
|
||||
f.close()
|
||||
except:
|
||||
pass
|
||||
|
||||
opts = dbname.split()
|
||||
for opt in opts:
|
||||
if '=' in opt:
|
||||
opt = opt.split('=')
|
||||
if opt[0] == 'hostname':
|
||||
db.setHostName(opt[1])
|
||||
elif opt[0] == 'port':
|
||||
db.setPort(int(opt[1]))
|
||||
elif opt[0] == 'username':
|
||||
db.setUserName(opt[1])
|
||||
elif opt[0] == 'password':
|
||||
db.setPassword(opt[1])
|
||||
elif opt[0] == 'dbname':
|
||||
dbname = opt[1]
|
||||
else:
|
||||
dbname = opt
|
||||
if is_sqlite3:
|
||||
db = QSqlDatabase.addDatabase('QSQLITE')
|
||||
else:
|
||||
db = QSqlDatabase.addDatabase('QPSQL')
|
||||
opts = dbname.split()
|
||||
for opt in opts:
|
||||
if '=' in opt:
|
||||
opt = opt.split('=')
|
||||
if opt[0] == 'hostname':
|
||||
db.setHostName(opt[1])
|
||||
elif opt[0] == 'port':
|
||||
db.setPort(int(opt[1]))
|
||||
elif opt[0] == 'username':
|
||||
db.setUserName(opt[1])
|
||||
elif opt[0] == 'password':
|
||||
db.setPassword(opt[1])
|
||||
elif opt[0] == 'dbname':
|
||||
dbname = opt[1]
|
||||
else:
|
||||
dbname = opt
|
||||
|
||||
db.setDatabaseName(dbname)
|
||||
if not db.open():
|
||||
|
|
@ -59,7 +59,7 @@ import datetime
|
|||
# pt_example=# \q
|
||||
#
|
||||
# An example of using the database is provided by the script
|
||||
# call-graph-from-postgresql.py. Refer to that script for details.
|
||||
# call-graph-from-sql.py. Refer to that script for details.
|
||||
#
|
||||
# Tables:
|
||||
#
|
||||
|
|
@ -340,7 +340,8 @@ if branches:
|
|||
'to_sym_offset bigint,'
|
||||
'to_ip bigint,'
|
||||
'branch_type integer,'
|
||||
'in_tx boolean)')
|
||||
'in_tx boolean,'
|
||||
'call_path_id bigint)')
|
||||
else:
|
||||
do_query(query, 'CREATE TABLE samples ('
|
||||
'id bigint NOT NULL,'
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue