mirror of
https://github.com/torvalds/linux.git
synced 2024-11-26 14:12:06 +00:00
perf/core improvements and fixes:
User visible: . Initial support for namespaces, using setns to access files in namespaces, grabbing their build-ids, etc. We still need to work more to deal with namespaces that vanish before we can get the needed data to do analysis, but this should be as good as what is in bcc now (Krister Johansen) . 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) . 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) . 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 Infrastructure: . 'perf test attr' fixes (Jiri Olsa) Vendor events: - Add POWER9 PMU events Sukadev (Bhattiprolu) - Support additional POWER8+ PVR in PMU mapfile (Shriya) Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJZbsEtAAoJENZQFvNTUqpA0rIP/j8pJ2uzOpaAqioWsqrVAY1q y1ezQxv9z6Saifa4nd8Li2fAoYMi7JeMQaTWl9GahNypTyafjWGn/i8Of0ajHh4m iRrEWEXh6DmSfHjt1Kh4hdFUQ+Au2p52Rcdu1BUnQR0+y9CJpaCuktnnkkp1bNq6 U56GKU/c5lXdHZtBenX86712eTZcG+ZfucdlhsZOdXEzgLtlkjbKtZ50wIt+tLjO dVg22hKoDDF71sxzakiSQQR8VrUrhlygd5jP3L62W2i1inVjJTGJ1rGyPOtBandX pqFitDLkZn8CzpBq4snzrUtctDLevsyy27YqPMRKbErmtnhGtTARm3utFvJkqFPE YNVYDf5Clnw9SCimY0GQE5OF9ZnmmIHzJp7Tu4cD3fVb6FTDf5q6Xy9Vlc5oOKDe ea+EEwXEeJPLZKfIuwW3osK7ukmDtN+KDO52Fw4etkvdDwzitXqLT4vDWSz3tLxj bFMr5g07cZ5t/7+0/fDfQJHhpeg5yEbNIcIkkYfEMwNFUBTLjoMoB67CNnCpa/d8 2PMsw6BEoGUV4tigI2L9jEkEiZwqIu51tgRlOHn1BZzW192egF/1R+pj4vrsZxM9 D2T98CEsbgJ1+NHXfALMcwhEsGBy3iQ34qyUpCeQi5+t/T3lCoyCJ6jRPjUC4deN +zlBbJNNNRcV53w08koC =eFUO -----END PGP SIGNATURE----- Merge tag 'perf-core-for-mingo-4.13-20170718' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: User visible changes: - Initial support for namespaces, using setns to access files in namespaces, grabbing their build-ids, etc. We still need to work more to deal with namespaces that vanish before we can get the needed data to do analysis, but this should be as good as what is in bcc now (Krister Johansen) - 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) - 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) - 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 Infrastructure changes: - 'perf test attr' fixes (Jiri Olsa) Vendor events changes: - Add POWER9 PMU events Sukadev (Bhattiprolu) - Support additional POWER8+ PVR in PMU mapfile (Shriya) Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
This commit is contained in:
commit
510457ec9d
@ -109,6 +109,9 @@ enum {
|
||||
X86_BR_ZERO_CALL = 1 << 15,/* zero length call */
|
||||
X86_BR_CALL_STACK = 1 << 16,/* call stack */
|
||||
X86_BR_IND_JMP = 1 << 17,/* indirect jump */
|
||||
|
||||
X86_BR_TYPE_SAVE = 1 << 18,/* indicate to save branch type */
|
||||
|
||||
};
|
||||
|
||||
#define X86_BR_PLM (X86_BR_USER | X86_BR_KERNEL)
|
||||
@ -510,6 +513,7 @@ static void intel_pmu_lbr_read_32(struct cpu_hw_events *cpuc)
|
||||
cpuc->lbr_entries[i].in_tx = 0;
|
||||
cpuc->lbr_entries[i].abort = 0;
|
||||
cpuc->lbr_entries[i].cycles = 0;
|
||||
cpuc->lbr_entries[i].type = 0;
|
||||
cpuc->lbr_entries[i].reserved = 0;
|
||||
}
|
||||
cpuc->lbr_stack.nr = i;
|
||||
@ -596,6 +600,7 @@ static void intel_pmu_lbr_read_64(struct cpu_hw_events *cpuc)
|
||||
cpuc->lbr_entries[out].in_tx = in_tx;
|
||||
cpuc->lbr_entries[out].abort = abort;
|
||||
cpuc->lbr_entries[out].cycles = cycles;
|
||||
cpuc->lbr_entries[out].type = 0;
|
||||
cpuc->lbr_entries[out].reserved = 0;
|
||||
out++;
|
||||
}
|
||||
@ -673,6 +678,10 @@ static int intel_pmu_setup_sw_lbr_filter(struct perf_event *event)
|
||||
|
||||
if (br_type & PERF_SAMPLE_BRANCH_CALL)
|
||||
mask |= X86_BR_CALL | X86_BR_ZERO_CALL;
|
||||
|
||||
if (br_type & PERF_SAMPLE_BRANCH_TYPE_SAVE)
|
||||
mask |= X86_BR_TYPE_SAVE;
|
||||
|
||||
/*
|
||||
* stash actual user request into reg, it may
|
||||
* be used by fixup code for some CPU
|
||||
@ -926,6 +935,43 @@ static int branch_type(unsigned long from, unsigned long to, int abort)
|
||||
return ret;
|
||||
}
|
||||
|
||||
#define X86_BR_TYPE_MAP_MAX 16
|
||||
|
||||
static int branch_map[X86_BR_TYPE_MAP_MAX] = {
|
||||
PERF_BR_CALL, /* X86_BR_CALL */
|
||||
PERF_BR_RET, /* X86_BR_RET */
|
||||
PERF_BR_SYSCALL, /* X86_BR_SYSCALL */
|
||||
PERF_BR_SYSRET, /* X86_BR_SYSRET */
|
||||
PERF_BR_UNKNOWN, /* X86_BR_INT */
|
||||
PERF_BR_UNKNOWN, /* X86_BR_IRET */
|
||||
PERF_BR_COND, /* X86_BR_JCC */
|
||||
PERF_BR_UNCOND, /* X86_BR_JMP */
|
||||
PERF_BR_UNKNOWN, /* X86_BR_IRQ */
|
||||
PERF_BR_IND_CALL, /* X86_BR_IND_CALL */
|
||||
PERF_BR_UNKNOWN, /* X86_BR_ABORT */
|
||||
PERF_BR_UNKNOWN, /* X86_BR_IN_TX */
|
||||
PERF_BR_UNKNOWN, /* X86_BR_NO_TX */
|
||||
PERF_BR_CALL, /* X86_BR_ZERO_CALL */
|
||||
PERF_BR_UNKNOWN, /* X86_BR_CALL_STACK */
|
||||
PERF_BR_IND, /* X86_BR_IND_JMP */
|
||||
};
|
||||
|
||||
static int
|
||||
common_branch_type(int type)
|
||||
{
|
||||
int i;
|
||||
|
||||
type >>= 2; /* skip X86_BR_USER and X86_BR_KERNEL */
|
||||
|
||||
if (type) {
|
||||
i = __ffs(type);
|
||||
if (i < X86_BR_TYPE_MAP_MAX)
|
||||
return branch_map[i];
|
||||
}
|
||||
|
||||
return PERF_BR_UNKNOWN;
|
||||
}
|
||||
|
||||
/*
|
||||
* implement actual branch filter based on user demand.
|
||||
* Hardware may not exactly satisfy that request, thus
|
||||
@ -942,7 +988,8 @@ intel_pmu_lbr_filter(struct cpu_hw_events *cpuc)
|
||||
bool compress = false;
|
||||
|
||||
/* if sampling all branches, then nothing to filter */
|
||||
if ((br_sel & X86_BR_ALL) == X86_BR_ALL)
|
||||
if (((br_sel & X86_BR_ALL) == X86_BR_ALL) &&
|
||||
((br_sel & X86_BR_TYPE_SAVE) != X86_BR_TYPE_SAVE))
|
||||
return;
|
||||
|
||||
for (i = 0; i < cpuc->lbr_stack.nr; i++) {
|
||||
@ -963,6 +1010,9 @@ intel_pmu_lbr_filter(struct cpu_hw_events *cpuc)
|
||||
cpuc->lbr_entries[i].from = 0;
|
||||
compress = true;
|
||||
}
|
||||
|
||||
if ((br_sel & X86_BR_TYPE_SAVE) == X86_BR_TYPE_SAVE)
|
||||
cpuc->lbr_entries[i].type = common_branch_type(type);
|
||||
}
|
||||
|
||||
if (!compress)
|
||||
|
@ -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|\
|
||||
@ -1015,6 +1038,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 +1048,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 */
|
||||
|
@ -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);
|
||||
}
|
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 */
|
@ -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.
|
||||
*/
|
||||
|
@ -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|\
|
||||
@ -1015,6 +1038,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 +1048,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 */
|
||||
|
@ -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/
|
||||
|
@ -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.
|
||||
|
@ -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:
|
||||
|
@ -330,6 +330,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
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -397,6 +397,7 @@ 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,
|
||||
.feature = perf_event__process_feature,
|
||||
.ordered_events = true,
|
||||
.ordering_requires_timestamps = true,
|
||||
},
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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)
|
||||
@ -150,6 +152,22 @@ 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 +206,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;
|
||||
@ -410,6 +430,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 +741,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 +967,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 +1014,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);
|
||||
|
@ -2682,6 +2682,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 +2973,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;
|
||||
|
@ -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;
|
||||
|
@ -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,6 +308,36 @@ static size_t syscall_arg__scnprintf_strarray(char *bf, size_t size,
|
||||
|
||||
#define SCA_STRARRAY syscall_arg__scnprintf_strarray
|
||||
|
||||
struct strarrays {
|
||||
int nr_entries;
|
||||
struct strarray **entries;
|
||||
};
|
||||
|
||||
#define DEFINE_STRARRAYS(array) struct strarrays strarrays__##array = { \
|
||||
.nr_entries = ARRAY_SIZE(array), \
|
||||
.entries = array, \
|
||||
}
|
||||
|
||||
size_t syscall_arg__scnprintf_strarrays(char *bf, size_t size,
|
||||
struct syscall_arg *arg)
|
||||
{
|
||||
struct strarrays *sas = arg->parm;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < sas->nr_entries; ++i) {
|
||||
struct strarray *sa = sas->entries[i];
|
||||
int idx = arg->val - sa->offset;
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
#if defined(__i386__) || defined(__x86_64__)
|
||||
/*
|
||||
* FIXME: Make this available to all arches as soon as the ioctl beautifier
|
||||
@ -331,11 +352,6 @@ static size_t syscall_arg__scnprintf_strhexarray(char *bf, size_t size,
|
||||
#define SCA_STRHEXARRAY syscall_arg__scnprintf_strhexarray
|
||||
#endif /* defined(__i386__) || defined(__x86_64__) */
|
||||
|
||||
static size_t syscall_arg__scnprintf_fd(char *bf, size_t size,
|
||||
struct syscall_arg *arg);
|
||||
|
||||
#define SCA_FD syscall_arg__scnprintf_fd
|
||||
|
||||
#ifndef AT_FDCWD
|
||||
#define AT_FDCWD -100
|
||||
#endif
|
||||
@ -358,21 +374,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 +422,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",
|
||||
@ -552,9 +582,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 +601,205 @@ 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;
|
||||
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];
|
||||
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), },
|
||||
.arg = { [0] = { .scnprintf = SCA_HEX, /* brk */ }, }, },
|
||||
{ .name = "clock_gettime",
|
||||
.arg = { [0] = STRARRAY(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), },
|
||||
{ .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_STRHEXARRAY, /* cmd */
|
||||
.parm = &strarray__tioctls, },
|
||||
[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 = "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 +821,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 +851,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 +861,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 +912,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 +1000,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);
|
||||
@ -1167,27 +1170,29 @@ 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)
|
||||
sc->arg_fmt = calloc(sc->nr_args, sizeof(*sc->arg_fmt));
|
||||
if (sc->arg_fmt == NULL)
|
||||
return -1;
|
||||
|
||||
if (sc->fmt)
|
||||
sc->arg_parm = sc->fmt->arg_parm;
|
||||
for (field = sc->args; field; field = field->next, ++idx) {
|
||||
if (sc->fmt) {
|
||||
sc->arg_fmt[idx] = sc->fmt->arg[idx];
|
||||
|
||||
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 (sc->fmt->arg[idx].scnprintf)
|
||||
continue;
|
||||
}
|
||||
|
||||
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 +1205,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;
|
||||
@ -1321,19 +1325,40 @@ out:
|
||||
* variable to read it. Most notably this avoids extended load instructions
|
||||
* on unaligned addresses
|
||||
*/
|
||||
static unsigned long __syscall_arg__val(unsigned char *args, u8 idx)
|
||||
{
|
||||
unsigned long val;
|
||||
unsigned char *p = args + sizeof(unsigned long) * idx;
|
||||
|
||||
memcpy(&val, p, sizeof(val));
|
||||
return val;
|
||||
}
|
||||
|
||||
unsigned long syscall_arg__val(struct syscall_arg *arg, u8 idx)
|
||||
{
|
||||
return __syscall_arg__val(arg->args, idx);
|
||||
}
|
||||
|
||||
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;
|
||||
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 = {
|
||||
.args = args,
|
||||
.idx = 0,
|
||||
.mask = 0,
|
||||
.trace = trace,
|
||||
@ -1345,9 +1370,7 @@ static size_t syscall__scnprintf_args(struct syscall *sc, char *bf, size_t size,
|
||||
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,19 +1378,20 @@ 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]) {
|
||||
if (sc->arg_fmt && sc->arg_fmt[arg.idx].scnprintf) {
|
||||
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);
|
||||
if (sc->arg_fmt[arg.idx].parm)
|
||||
arg.parm = sc->arg_fmt[arg.idx].parm;
|
||||
printed += sc->arg_fmt[arg.idx].scnprintf(bf + printed, size - printed, &arg);
|
||||
} else {
|
||||
printed += scnprintf(bf + printed, size - printed,
|
||||
"%ld", val);
|
||||
@ -1382,9 +1406,7 @@ static size_t syscall__scnprintf_args(struct syscall *sc, char *bf, size_t size,
|
||||
int i = 0;
|
||||
|
||||
while (i < 6) {
|
||||
/* special care for unaligned accesses */
|
||||
p = args + sizeof(unsigned long) * i;
|
||||
memcpy(&val, p, sizeof(val));
|
||||
val = __syscall_arg__val(args, i);
|
||||
printed += scnprintf(bf + printed, size - printed,
|
||||
"%sarg%d: %ld",
|
||||
printed ? ", " : "", i, val);
|
||||
@ -1635,17 +1657,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)) {
|
||||
fprintf(trace->output, ") %ld", ret);
|
||||
} 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);
|
||||
|
@ -16,6 +16,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
|
||||
|
@ -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);
|
||||
|
@ -19,3 +19,7 @@
|
||||
004d0000,1,power8.json,core
|
||||
004d0100,1,power8.json,core
|
||||
004d0200,1,power8.json,core
|
||||
004c0100,1,power8.json,core
|
||||
004e0100,1,power9.json,core
|
||||
004e0200,1,power9.json,core
|
||||
004e1200,1,power9.json,core
|
||||
|
|
176
tools/perf/pmu-events/arch/powerpc/power9/cache.json
Normal file
176
tools/perf/pmu-events/arch/powerpc/power9/cache.json
Normal file
@ -0,0 +1,176 @@
|
||||
[
|
||||
{,
|
||||
"EventCode": "0x1002A",
|
||||
"EventName": "PM_CMPLU_STALL_LARX",
|
||||
"BriefDescription": "Finish stall because the NTF instruction was a larx waiting to be satisfied",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1003C",
|
||||
"EventName": "PM_CMPLU_STALL_DMISS_L2L3",
|
||||
"BriefDescription": "Completion stall by Dcache miss which resolved in L2/L3",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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.",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x400F0",
|
||||
"EventName": "PM_LD_MISS_L1",
|
||||
"BriefDescription": "Load Missed L1, at execution time (not gated by finish, which means this counter can be greater than loads finished)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1C058",
|
||||
"EventName": "PM_DTLB_MISS_16G",
|
||||
"BriefDescription": "Data TLB Miss page size 16G",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1D15C",
|
||||
"EventName": "PM_MRK_DTLB_MISS_1G",
|
||||
"BriefDescription": "Marked Data TLB reload (after a miss) page size 2M. Implies radix translation was used",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x101E6",
|
||||
"EventName": "PM_THRESH_EXC_4096",
|
||||
"BriefDescription": "Threshold counter exceed a count of 4096",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2D15E",
|
||||
"EventName": "PM_MRK_DTLB_MISS_16G",
|
||||
"BriefDescription": "Marked Data TLB Miss page size 16G",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3D156",
|
||||
"EventName": "PM_MRK_DTLB_MISS_64K",
|
||||
"BriefDescription": "Marked Data TLB Miss page size 64K",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D016",
|
||||
"EventName": "PM_CMPLU_STALL_FXLONG",
|
||||
"BriefDescription": "Completion stall due to a long latency scalar fixed point instruction (division, square root)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4C15E",
|
||||
"EventName": "PM_MRK_DTLB_MISS_16M",
|
||||
"BriefDescription": "Marked Data TLB Miss page size 16M",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x401E4",
|
||||
"EventName": "PM_MRK_DTLB_MISS",
|
||||
"BriefDescription": "Marked dtlb miss",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x401EA",
|
||||
"EventName": "PM_THRESH_EXC_128",
|
||||
"BriefDescription": "Threshold counter exceeded a value of 128",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x400F6",
|
||||
"EventName": "PM_BR_MPRED_CMPL",
|
||||
"BriefDescription": "Number of Branch Mispredicts",
|
||||
"PublicDescription": ""
|
||||
}
|
||||
]
|
@ -0,0 +1,44 @@
|
||||
[
|
||||
{,
|
||||
"EventCode": "0x10058",
|
||||
"EventName": "PM_MEM_LOC_THRESH_IFU",
|
||||
"BriefDescription": "Local Memory above threshold for IFU speculation control",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4505E",
|
||||
"EventName": "PM_FLOP_CMPL",
|
||||
"BriefDescription": "Floating Point Operation Finished",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2D154",
|
||||
"EventName": "PM_MRK_DERAT_MISS_64K",
|
||||
"BriefDescription": "Marked Data ERAT Miss (Data TLB Access) page size 64K",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x30012",
|
||||
"EventName": "PM_FLUSH_COMPLETION",
|
||||
"BriefDescription": "The instruction that was next to complete did not complete because it suffered a flush",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4016E",
|
||||
"EventName": "PM_THRESH_NOT_MET",
|
||||
"BriefDescription": "Threshold counter did not meet threshold",
|
||||
"PublicDescription": ""
|
||||
}
|
||||
]
|
446
tools/perf/pmu-events/arch/powerpc/power9/frontend.json
Normal file
446
tools/perf/pmu-events/arch/powerpc/power9/frontend.json
Normal file
@ -0,0 +1,446 @@
|
||||
[
|
||||
{,
|
||||
"EventCode": "0x20036",
|
||||
"EventName": "PM_BR_2PATH",
|
||||
"BriefDescription": "Branches that are not strongly biased",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x40036",
|
||||
"EventName": "PM_BR_2PATH",
|
||||
"BriefDescription": "Branches that are not strongly biased",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x10010",
|
||||
"EventName": "PM_PMC4_OVERFLOW",
|
||||
"BriefDescription": "Overflow from counter 4",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x10020",
|
||||
"EventName": "PM_PMC4_REWIND",
|
||||
"BriefDescription": "PMC4 Rewind Event",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1013E",
|
||||
"EventName": "PM_MRK_LD_MISS_EXPOSED_CYC",
|
||||
"BriefDescription": "Marked Load exposed Miss (use edge detect to count #)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x15046",
|
||||
"EventName": "PM_IPTEG_FROM_L3.1_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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1015E",
|
||||
"EventName": "PM_MRK_FAB_RSP_RD_T_INTV",
|
||||
"BriefDescription": "Sampled Read got a T intervention",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x14054",
|
||||
"EventName": "PM_INST_PUMP_CPRED",
|
||||
"BriefDescription": "Pump prediction correct. Counts across all types of pumps for an instruction fetch",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x15152",
|
||||
"EventName": "PM_SYNC_MRK_BR_LINK",
|
||||
"BriefDescription": "Marked Branch and link branch that can cause a synchronous interrupt",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1515C",
|
||||
"EventName": "PM_SYNC_MRK_BR_MPRED",
|
||||
"BriefDescription": "Marked Branch mispredict that can cause a synchronous interrupt",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1E050",
|
||||
"EventName": "PM_CMPLU_STALL_TEND",
|
||||
"BriefDescription": "Finish stall because the NTF instruction was a tend instruction awaiting response from L2",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1E15E",
|
||||
"EventName": "PM_MRK_L2_TM_REQ_ABORT",
|
||||
"BriefDescription": "TM abort",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x101E8",
|
||||
"EventName": "PM_THRESH_EXC_256",
|
||||
"BriefDescription": "Threshold counter exceed a count of 256",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x101EC",
|
||||
"EventName": "PM_THRESH_MET",
|
||||
"BriefDescription": "threshold exceeded",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x100F2",
|
||||
"EventName": "PM_1PLUS_PPC_CMPL",
|
||||
"BriefDescription": "1 or more ppc insts finished",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x20114",
|
||||
"EventName": "PM_MRK_L2_RC_DISP",
|
||||
"BriefDescription": "Marked Instruction RC dispatched in L2",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2C010",
|
||||
"EventName": "PM_CMPLU_STALL_LSU",
|
||||
"BriefDescription": "Completion stall by LSU instruction",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2C01E",
|
||||
"EventName": "PM_CMPLU_STALL_SYNC_PMU_INT",
|
||||
"BriefDescription": "Cycles in which the NTC instruction is waiting for a synchronous PMU interrupt",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2D01C",
|
||||
"EventName": "PM_CMPLU_STALL_STCX",
|
||||
"BriefDescription": "Finish stall because the NTF instruction was a stcx waiting for response from L2",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2D14C",
|
||||
"EventName": "PM_MRK_DATA_FROM_L3.1_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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x25044",
|
||||
"EventName": "PM_IPTEG_FROM_L3.1_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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2015E",
|
||||
"EventName": "PM_MRK_FAB_RSP_RWITM_RTY",
|
||||
"BriefDescription": "Sampled store did a rwitm and got a rty",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x24050",
|
||||
"EventName": "PM_IOPS_CMPL",
|
||||
"BriefDescription": "Internal Operations completed",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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.",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2F152",
|
||||
"EventName": "PM_MRK_FAB_RSP_DCLAIM_CYC",
|
||||
"BriefDescription": "cycles L2 RC took for a dclaim",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x200FA",
|
||||
"EventName": "PM_BR_TAKEN_CMPL",
|
||||
"BriefDescription": "New event for Branch Taken",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3001C",
|
||||
"EventName": "PM_LSU_REJECT_LMQ_FULL",
|
||||
"BriefDescription": "LSU Reject due to LMQ full (up to 4 per cycles)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x30026",
|
||||
"EventName": "PM_CMPLU_STALL_STORE_DATA",
|
||||
"BriefDescription": "Finish stall because the next to finish instruction was a store waiting on data",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3012A",
|
||||
"EventName": "PM_MRK_L2_RC_DONE",
|
||||
"BriefDescription": "Marked RC done",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x35044",
|
||||
"EventName": "PM_IPTEG_FROM_L3.1_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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x30154",
|
||||
"EventName": "PM_MRK_FAB_RSP_DCLAIM",
|
||||
"BriefDescription": "Marked store had to do a dclaim",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3015E",
|
||||
"EventName": "PM_MRK_FAB_RSP_CLAIM_RTY",
|
||||
"BriefDescription": "Sampled store did a rwitm and got a rty",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3C056",
|
||||
"EventName": "PM_DTLB_MISS_64K",
|
||||
"BriefDescription": "Data TLB Miss page size 64K",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x34050",
|
||||
"EventName": "PM_INST_SYS_PUMP_CPRED",
|
||||
"BriefDescription": "Initial and Final Pump Scope was system pump (prediction=correct) for an instruction fetch",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3E15C",
|
||||
"EventName": "PM_MRK_L2_TM_ST_ABORT_SISTER",
|
||||
"BriefDescription": "TM marked store abort for this thread",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x30060",
|
||||
"EventName": "PM_TM_TRANS_RUN_INST",
|
||||
"BriefDescription": "Run instructions completed in transactional state (gated by the run latch)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x301E6",
|
||||
"EventName": "PM_MRK_DERAT_MISS",
|
||||
"BriefDescription": "Erat Miss (TLB Access) All page sizes",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x301EA",
|
||||
"EventName": "PM_THRESH_EXC_1024",
|
||||
"BriefDescription": "Threshold counter exceeded a value of 1024",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x300FA",
|
||||
"EventName": "PM_INST_FROM_L3MISS",
|
||||
"BriefDescription": "Marked instruction was reloaded from a location beyond the local chiplet",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x40116",
|
||||
"EventName": "PM_MRK_LARX_FIN",
|
||||
"BriefDescription": "Larx finished",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4C01C",
|
||||
"EventName": "PM_CMPLU_STALL_ST_FWD",
|
||||
"BriefDescription": "Completion stall due to store forward",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4E012",
|
||||
"EventName": "PM_CMPLU_STALL_MTFPSCR",
|
||||
"BriefDescription": "Completion stall because the ISU is updating the register and notifying the Effective Address Table (EAT)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4C044",
|
||||
"EventName": "PM_DATA_FROM_L3.1_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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x45044",
|
||||
"EventName": "PM_IPTEG_FROM_L3.1_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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4015E",
|
||||
"EventName": "PM_MRK_FAB_RSP_RD_RTY",
|
||||
"BriefDescription": "Sampled L2 reads retry count",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4C056",
|
||||
"EventName": "PM_DTLB_MISS_16M",
|
||||
"BriefDescription": "Data TLB Miss page size 16M",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x44052",
|
||||
"EventName": "PM_INST_PUMP_MPRED",
|
||||
"BriefDescription": "Pump misprediction. Counts across all types of pumps for an instruction fetch",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x44056",
|
||||
"EventName": "PM_VECTOR_ST_CMPL",
|
||||
"BriefDescription": "Number of vector store instructions completed",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4F150",
|
||||
"EventName": "PM_MRK_FAB_RSP_RWITM_CYC",
|
||||
"BriefDescription": "cycles L2 RC took for a rwitm",
|
||||
"PublicDescription": ""
|
||||
}
|
||||
]
|
782
tools/perf/pmu-events/arch/powerpc/power9/marked.json
Normal file
782
tools/perf/pmu-events/arch/powerpc/power9/marked.json
Normal file
@ -0,0 +1,782 @@
|
||||
[
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x10132",
|
||||
"EventName": "PM_MRK_INST_ISSUED",
|
||||
"BriefDescription": "Marked instruction issued",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1C046",
|
||||
"EventName": "PM_DATA_FROM_L3.1_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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x14046",
|
||||
"EventName": "PM_INST_FROM_L3.1_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)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1E046",
|
||||
"EventName": "PM_DPTEG_FROM_L3.1_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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1C054",
|
||||
"EventName": "PM_DATA_PUMP_CPRED",
|
||||
"BriefDescription": "Pump prediction correct. Counts across all types of pumps for a demand load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1C05E",
|
||||
"EventName": "PM_MEM_LOC_THRESH_LSU_MED",
|
||||
"BriefDescription": "Local memory above threshold for data prefetch",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1D058",
|
||||
"EventName": "PM_DARQ0_10_12_ENTRIES",
|
||||
"BriefDescription": "Cycles in which 10 or more DARQ entries (out of 12) are in use",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x15150",
|
||||
"EventName": "PM_SYNC_MRK_PROBE_NOP",
|
||||
"BriefDescription": "Marked probeNops which can cause synchronous interrupts",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1E052",
|
||||
"EventName": "PM_CMPLU_STALL_SLB",
|
||||
"BriefDescription": "Finish stall because the NTF instruction was awaiting L2 response for an SLB",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1F150",
|
||||
"EventName": "PM_MRK_ST_L2DISP_TO_CMPL_CYC",
|
||||
"BriefDescription": "cycles from L2 rc disp to l2 rc completion",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1006C",
|
||||
"EventName": "PM_RUN_CYC_ST_MODE",
|
||||
"BriefDescription": "Cycles run latch is set and core is in ST mode",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1016E",
|
||||
"EventName": "PM_MRK_BR_CMPL",
|
||||
"BriefDescription": "Branch Instruction completed",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x101E0",
|
||||
"EventName": "PM_MRK_INST_DISP",
|
||||
"BriefDescription": "The thread has dispatched a randomly sampled marked instruction",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x101E2",
|
||||
"EventName": "PM_MRK_BR_TAKEN_CMPL",
|
||||
"BriefDescription": "Marked Branch Taken completed",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2C016",
|
||||
"EventName": "PM_CMPLU_STALL_PASTE",
|
||||
"BriefDescription": "Finish stall because the NTF instruction was a paste waiting for response from L2",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2C01C",
|
||||
"EventName": "PM_CMPLU_STALL_DMISS_REMOTE",
|
||||
"BriefDescription": "Completion stall by Dcache miss which resolved from remote chip (cache or memory)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2E01E",
|
||||
"EventName": "PM_CMPLU_STALL_NTC_FLUSH",
|
||||
"BriefDescription": "Completion stall due to ntc flush",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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.",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x20130",
|
||||
"EventName": "PM_MRK_INST_DECODED",
|
||||
"BriefDescription": "An instruction was marked at decode time. Random Instruction Sampling (RIS) only",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x20138",
|
||||
"EventName": "PM_MRK_ST_NEST",
|
||||
"BriefDescription": "Marked store sent to nest",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2013A",
|
||||
"EventName": "PM_MRK_BRU_FIN",
|
||||
"BriefDescription": "bru marked instr finish",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2C044",
|
||||
"EventName": "PM_DATA_FROM_L3.1_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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x24044",
|
||||
"EventName": "PM_INST_FROM_L3.1_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)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2E044",
|
||||
"EventName": "PM_DPTEG_FROM_L3.1_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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2C058",
|
||||
"EventName": "PM_MEM_PREF",
|
||||
"BriefDescription": "Memory prefetch for this thread. Includes L4",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2E050",
|
||||
"EventName": "PM_DARQ0_7_9_ENTRIES",
|
||||
"BriefDescription": "Cycles in which 7,8, or 9 DARQ entries (out of 12) are in use",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2E05E",
|
||||
"EventName": "PM_LMQ_EMPTY_CYC",
|
||||
"BriefDescription": "Cycles in which the LMQ has no pending load misses for this thread",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x200FD",
|
||||
"EventName": "PM_L1_ICACHE_MISS",
|
||||
"BriefDescription": "Demand iCache Miss",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x30006",
|
||||
"EventName": "PM_CMPLU_STALL_OTHER_CMPL",
|
||||
"BriefDescription": "Instructions the core completed while this tread was stalled",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x30008",
|
||||
"EventName": "PM_DISP_STARVED",
|
||||
"BriefDescription": "Dispatched Starved",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3000E",
|
||||
"EventName": "PM_FXU_1PLUS_BUSY",
|
||||
"BriefDescription": "At least one of the 4 FXU units is busy",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3012C",
|
||||
"EventName": "PM_MRK_ST_FWD",
|
||||
"BriefDescription": "Marked st forwards",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x30130",
|
||||
"EventName": "PM_MRK_INST_FIN",
|
||||
"BriefDescription": "marked instruction finished",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3C044",
|
||||
"EventName": "PM_DATA_FROM_L3.1_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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x34044",
|
||||
"EventName": "PM_INST_FROM_L3.1_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)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x35046",
|
||||
"EventName": "PM_IPTEG_FROM_L2.1_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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3504E",
|
||||
"EventName": "PM_DARQ0_4_6_ENTRIES",
|
||||
"BriefDescription": "Cycles in which 4, 5, or 6 DARQ entries (out of 12) are in use",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3E044",
|
||||
"EventName": "PM_DPTEG_FROM_L3.1_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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3F144",
|
||||
"EventName": "PM_MRK_DPTEG_FROM_L3.1_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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3C050",
|
||||
"EventName": "PM_DATA_SYS_PUMP_CPRED",
|
||||
"BriefDescription": "Initial and Final Pump Scope was system pump (prediction=correct) for a demand load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3E158",
|
||||
"EventName": "PM_MRK_STCX_FAIL",
|
||||
"BriefDescription": "marked stcx failed",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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.",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x30068",
|
||||
"EventName": "PM_L1_ICACHE_RELOADED_PREF",
|
||||
"BriefDescription": "Counts all Icache prefetch reloads ( includes demand turned into prefetch)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x301E4",
|
||||
"EventName": "PM_MRK_BR_MPRED_CMPL",
|
||||
"BriefDescription": "Marked Branch Mispredicted",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x300F2",
|
||||
"EventName": "PM_INST_DISP",
|
||||
"BriefDescription": "# PPC Dispatched",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x300F6",
|
||||
"EventName": "PM_L1_DCACHE_RELOAD_VALID",
|
||||
"BriefDescription": "DL1 reloaded due to Demand Load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x300FE",
|
||||
"EventName": "PM_DATA_FROM_L3MISS",
|
||||
"BriefDescription": "Demand LD - L3 Miss (not L2 hit and not L3 hit)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4000C",
|
||||
"EventName": "PM_FREQ_UP",
|
||||
"BriefDescription": "Power Management: Above Threshold A",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D01A",
|
||||
"EventName": "PM_CMPLU_STALL_EIEIO",
|
||||
"BriefDescription": "Finish stall because the NTF instruction is an EIEIO waiting for response from L2",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4E014",
|
||||
"EventName": "PM_TM_TX_PASS_RUN_INST",
|
||||
"BriefDescription": "Run instructions spent in successful transactions",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4E018",
|
||||
"EventName": "PM_CMPLU_STALL_NTC_DISP_FIN",
|
||||
"BriefDescription": "Finish stall because the NTF instruction was one that must finish at dispatch.",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4C122",
|
||||
"EventName": "PM_DARQ1_0_3_ENTRIES",
|
||||
"BriefDescription": "Cycles in which 3 or fewer DARQ1 entries (out of 12) are in use",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x40134",
|
||||
"EventName": "PM_MRK_INST_TIMEO",
|
||||
"BriefDescription": "marked Instruction finish timeout (instruction lost)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4003C",
|
||||
"EventName": "PM_DISP_HELD_SYNC_HOLD",
|
||||
"BriefDescription": "Cycles in which dispatch is held because of a synchronizing instruction in the pipeline",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D04A",
|
||||
"EventName": "PM_DARQ0_0_3_ENTRIES",
|
||||
"BriefDescription": "Cycles in which 3 or less DARQ entries (out of 12) are in use",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x45046",
|
||||
"EventName": "PM_IPTEG_FROM_L2.1_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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4F144",
|
||||
"EventName": "PM_MRK_DPTEG_FROM_L3.1_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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4C052",
|
||||
"EventName": "PM_DATA_PUMP_MPRED",
|
||||
"BriefDescription": "Pump misprediction. Counts across all types of pumps for a demand load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D058",
|
||||
"EventName": "PM_VECTOR_FLOP_CMPL",
|
||||
"BriefDescription": "Vector FP instruction completed",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D05A",
|
||||
"EventName": "PM_NON_MATH_FLOP_CMPL",
|
||||
"BriefDescription": "Non FLOP operation completed",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4505A",
|
||||
"EventName": "PM_SP_FLOP_CMPL",
|
||||
"BriefDescription": "SP instruction completed",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x401E0",
|
||||
"EventName": "PM_MRK_INST_CMPL",
|
||||
"BriefDescription": "marked instruction completed",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x400F4",
|
||||
"EventName": "PM_RUN_PURR",
|
||||
"BriefDescription": "Run_PURR",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
}
|
||||
]
|
158
tools/perf/pmu-events/arch/powerpc/power9/memory.json
Normal file
158
tools/perf/pmu-events/arch/powerpc/power9/memory.json
Normal file
@ -0,0 +1,158 @@
|
||||
[
|
||||
{,
|
||||
"EventCode": "0x10008",
|
||||
"EventName": "PM_RUN_SPURR",
|
||||
"BriefDescription": "Run SPURR",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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.",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1C050",
|
||||
"EventName": "PM_DATA_CHIP_PUMP_CPRED",
|
||||
"BriefDescription": "Initial and Final Pump Scope was chip pump (prediction=correct) for a demand load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1D15E",
|
||||
"EventName": "PM_MRK_RUN_CYC",
|
||||
"BriefDescription": "Run cycles in which a marked instruction is in the pipeline",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x15158",
|
||||
"EventName": "PM_SYNC_MRK_L2HIT",
|
||||
"BriefDescription": "Marked L2 Hits that can throw a synchronous interrupt",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x20010",
|
||||
"EventName": "PM_PMC1_OVERFLOW",
|
||||
"BriefDescription": "Overflow from counter 1",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2005A",
|
||||
"EventName": "PM_DARQ1_7_9_ENTRIES",
|
||||
"BriefDescription": "Cycles in which 7 to 9 DARQ1 entries (out of 12) are in use",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2D156",
|
||||
"EventName": "PM_MRK_DTLB_MISS_4K",
|
||||
"BriefDescription": "Marked Data TLB Miss page size 4k",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2E05C",
|
||||
"EventName": "PM_LSU_REJECT_ERAT_MISS",
|
||||
"BriefDescription": "LSU Reject due to ERAT (up to 4 per cycles)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x200F6",
|
||||
"EventName": "PM_LSU_DERAT_MISS",
|
||||
"BriefDescription": "DERAT Reloaded due to a DERAT miss",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3C058",
|
||||
"EventName": "PM_LARX_FIN",
|
||||
"BriefDescription": "Larx finished",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3E050",
|
||||
"EventName": "PM_DARQ1_4_6_ENTRIES",
|
||||
"BriefDescription": "Cycles in which 4, 5, or 6 DARQ1 entries (out of 12) are in use",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3006E",
|
||||
"EventName": "PM_NEST_REF_CLK",
|
||||
"BriefDescription": "Multiply by 4 to obtain the number of PB cycles",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x301E2",
|
||||
"EventName": "PM_MRK_ST_CMPL",
|
||||
"BriefDescription": "Marked store completed and sent to nest",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D02C",
|
||||
"EventName": "PM_PMC1_REWIND",
|
||||
"BriefDescription": "",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4003E",
|
||||
"EventName": "PM_LD_CMPL",
|
||||
"BriefDescription": "count of Loads completed",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D056",
|
||||
"EventName": "PM_NON_FMA_FLOP_CMPL",
|
||||
"BriefDescription": "Non FMA instruction completed",
|
||||
"PublicDescription": ""
|
||||
}
|
||||
]
|
836
tools/perf/pmu-events/arch/powerpc/power9/other.json
Normal file
836
tools/perf/pmu-events/arch/powerpc/power9/other.json
Normal file
@ -0,0 +1,836 @@
|
||||
[
|
||||
{,
|
||||
"EventCode": "0x1001C",
|
||||
"EventName": "PM_CMPLU_STALL_THRD",
|
||||
"BriefDescription": "Completion Stalled because the thread was blocked",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1002E",
|
||||
"EventName": "PM_LMQ_MERGE",
|
||||
"BriefDescription": "A demand miss collides with a prefetch for the same line",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x10134",
|
||||
"EventName": "PM_MRK_ST_DONE_L2",
|
||||
"BriefDescription": "marked store completed in L2 ( RC machine done)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x10138",
|
||||
"EventName": "PM_MRK_BR_2PATH",
|
||||
"BriefDescription": "marked branches which are not strongly biased",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1C04A",
|
||||
"EventName": "PM_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 demand load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1C04C",
|
||||
"EventName": "PM_DATA_FROM_LL4",
|
||||
"BriefDescription": "The processor's data cache was reloaded from the local chip's L4 cache due to a demand load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1D140",
|
||||
"EventName": "PM_MRK_DATA_FROM_L3.1_MOD_CYC",
|
||||
"BriefDescription": "Duration in cycles to reload with Modified (M) data from another core's L3 on the same chip due to a marked load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1D144",
|
||||
"EventName": "PM_MRK_DATA_FROM_L3_DISP_CONFLICT",
|
||||
"BriefDescription": "The processor's data cache was reloaded from local core's L3 with dispatch conflict due to a marked load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1D146",
|
||||
"EventName": "PM_MRK_DATA_FROM_MEMORY_CYC",
|
||||
"BriefDescription": "Duration in cycles to reload from a memory location including L4 from local remote or distant due to a marked load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1D148",
|
||||
"EventName": "PM_MRK_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 marked load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1D14E",
|
||||
"EventName": "PM_MRK_DATA_FROM_OFF_CHIP_CACHE_CYC",
|
||||
"BriefDescription": "Duration in cycles to reload either shared or modified data from another core's L2/L3 on a different chip (remote or distant) due to a marked load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x15040",
|
||||
"EventName": "PM_IPTEG_FROM_L2_NO_CONFLICT",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB from local core's L2 without conflict due to a instruction side request",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1504C",
|
||||
"EventName": "PM_IPTEG_FROM_LL4",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB from the local chip's L4 cache due to a instruction side request",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1E048",
|
||||
"EventName": "PM_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 data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1E04E",
|
||||
"EventName": "PM_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 data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1F146",
|
||||
"EventName": "PM_MRK_DPTEG_FROM_L3.1_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 marked data side request.. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x10052",
|
||||
"EventName": "PM_GRP_PUMP_MPRED_RTY",
|
||||
"BriefDescription": "Final Pump Scope (Group) ended up larger than Initial Pump Scope (Chip) for all data types excluding data prefetch (demand load,inst prefetch,inst fetch,xlate)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1C05C",
|
||||
"EventName": "PM_DTLB_MISS_2M",
|
||||
"BriefDescription": "Data TLB reload (after a miss) page size 2M. Implies radix translation was used",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x14156",
|
||||
"EventName": "PM_MRK_DATA_FROM_L2_CYC",
|
||||
"BriefDescription": "Duration in cycles to reload from local core's L2 due to a marked load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x14158",
|
||||
"EventName": "PM_MRK_DATA_FROM_L2_NO_CONFLICT_CYC",
|
||||
"BriefDescription": "Duration in cycles to reload from local core's L2 without conflict due to a marked load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1415C",
|
||||
"EventName": "PM_MRK_DATA_FROM_L3_MEPF_CYC",
|
||||
"BriefDescription": "Duration in cycles to reload from local core's L3 without dispatch conflicts hit on Mepf state due to a marked load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1D150",
|
||||
"EventName": "PM_MRK_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 marked load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1D152",
|
||||
"EventName": "PM_MRK_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 marked load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1D156",
|
||||
"EventName": "PM_MRK_LD_MISS_L1_CYC",
|
||||
"BriefDescription": "Marked ld latency",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x15154",
|
||||
"EventName": "PM_SYNC_MRK_L3MISS",
|
||||
"BriefDescription": "Marked L3 misses that can throw a synchronous interrupt",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1515A",
|
||||
"EventName": "PM_SYNC_MRK_L2MISS",
|
||||
"BriefDescription": "Marked L2 Miss that can throw a synchronous interrupt",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1E05A",
|
||||
"EventName": "PM_CMPLU_STALL_ANY_SYNC",
|
||||
"BriefDescription": "Cycles in which the NTC sync instruction (isync, lwsync or hwsync) is not allowed to complete ",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1E05C",
|
||||
"EventName": "PM_CMPLU_STALL_NESTED_TBEGIN",
|
||||
"BriefDescription": "Completion stall because the ISU is updating the TEXASR to keep track of the nested tbegin. This is a short delay, and it includes ROT",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1F152",
|
||||
"EventName": "PM_MRK_FAB_RSP_BKILL_CYC",
|
||||
"BriefDescription": "cycles L2 RC took for a bkill",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1F056",
|
||||
"EventName": "PM_RADIX_PWC_L1_HIT",
|
||||
"BriefDescription": "A radix translation attempt missed in the TLB and only the first level page walk cache was a hit.",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x101E4",
|
||||
"EventName": "PM_MRK_L1_ICACHE_MISS",
|
||||
"BriefDescription": "sampled Instruction suffered an icache Miss",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x101EA",
|
||||
"EventName": "PM_MRK_L1_RELOAD_VALID",
|
||||
"BriefDescription": "Marked demand reload",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x100FA",
|
||||
"EventName": "PM_ANY_THRD_RUN_CYC",
|
||||
"BriefDescription": "Cycles in which at least one thread has the run latch set",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x100FC",
|
||||
"EventName": "PM_LD_REF_L1",
|
||||
"BriefDescription": "All L1 D cache load references counted at finish, gated by reject",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x20006",
|
||||
"EventName": "PM_DISP_HELD_ISSQ_FULL",
|
||||
"BriefDescription": "Dispatch held due to Issue q full. Includes issue queue and branch queue",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2000C",
|
||||
"EventName": "PM_THRD_ALL_RUN_CYC",
|
||||
"BriefDescription": "Cycles in which all the threads have the run latch set",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2001A",
|
||||
"EventName": "PM_NTC_ALL_FIN",
|
||||
"BriefDescription": "Cycles after all instructions have finished to group completed",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2D014",
|
||||
"EventName": "PM_CMPLU_STALL_LRQ_FULL",
|
||||
"BriefDescription": "Finish stall because the NTF instruction was a load that was held in LSAQ (load-store address queue) because the LRQ (load-reorder queue) was full",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2D018",
|
||||
"EventName": "PM_CMPLU_STALL_EXEC_UNIT",
|
||||
"BriefDescription": "Completion stall due to execution units (FXU/VSU/CRU)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2D01E",
|
||||
"EventName": "PM_ICT_NOSLOT_DISP_HELD_ISSQ",
|
||||
"BriefDescription": "Ict empty for this thread due to dispatch hold on this thread due to Issue q full, BRQ full, XVCF Full, Count cache, Link, Tar full",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2E014",
|
||||
"EventName": "PM_STCX_FIN",
|
||||
"BriefDescription": "Number of stcx instructions finished. This includes instructions in the speculative path of a branch that may be flushed",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2C120",
|
||||
"EventName": "PM_MRK_DATA_FROM_L2_NO_CONFLICT",
|
||||
"BriefDescription": "The processor's data cache was reloaded from local core's L2 without conflict due to a marked load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2C122",
|
||||
"EventName": "PM_MRK_DATA_FROM_L3_DISP_CONFLICT_CYC",
|
||||
"BriefDescription": "Duration in cycles to reload from local core's L3 with dispatch conflict due to a marked load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2C126",
|
||||
"EventName": "PM_MRK_DATA_FROM_L2",
|
||||
"BriefDescription": "The processor's data cache was reloaded from local core's L2 due to a marked load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2C12A",
|
||||
"EventName": "PM_MRK_DATA_FROM_RMEM_CYC",
|
||||
"BriefDescription": "Duration in cycles to reload from another chip's memory on the same Node or Group ( Remote) due to a marked load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2C12C",
|
||||
"EventName": "PM_MRK_DATA_FROM_DL4_CYC",
|
||||
"BriefDescription": "Duration in cycles to reload from another chip's L4 on a different Node or Group (Distant) due to a marked load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2D120",
|
||||
"EventName": "PM_MRK_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 marked load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2D026",
|
||||
"EventName": "PM_RADIX_PWC_L1_PDE_FROM_L2",
|
||||
"BriefDescription": "A Page Directory Entry was reloaded to a level 1 page walk cache from the core's L2 data cache",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x20132",
|
||||
"EventName": "PM_MRK_DFU_FIN",
|
||||
"BriefDescription": "Decimal Unit marked Instruction Finish",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x20134",
|
||||
"EventName": "PM_MRK_FXU_FIN",
|
||||
"BriefDescription": "fxu marked instr finish",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2C04E",
|
||||
"EventName": "PM_LD_MISS_L1_FIN",
|
||||
"BriefDescription": "Number of load instructions that finished with an L1 miss. Note that even if a load spans multiple slices this event will increment only once per load op.",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x24040",
|
||||
"EventName": "PM_INST_FROM_L2_MEPF",
|
||||
"BriefDescription": "The processor's Instruction cache was reloaded from local core's L2 hit without dispatch conflicts on Mepf state. due to an instruction fetch (not prefetch)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x24048",
|
||||
"EventName": "PM_INST_FROM_LMEM",
|
||||
"BriefDescription": "The processor's Instruction cache was reloaded from the local chip's Memory due to an instruction fetch (not prefetch)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2D142",
|
||||
"EventName": "PM_MRK_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 marked load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2D144",
|
||||
"EventName": "PM_MRK_DATA_FROM_L3.1_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 marked load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2D148",
|
||||
"EventName": "PM_MRK_DATA_FROM_L2_DISP_CONFLICT_LDHITST",
|
||||
"BriefDescription": "The processor's data cache was reloaded from local core's L2 with load hit store conflict due to a marked load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x25048",
|
||||
"EventName": "PM_IPTEG_FROM_LMEM",
|
||||
"BriefDescription": "A Page Table Entry was loaded into the TLB from the local chip's Memory due to a instruction side request",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2E040",
|
||||
"EventName": "PM_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 data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2E04A",
|
||||
"EventName": "PM_DPTEG_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 data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2F14A",
|
||||
"EventName": "PM_MRK_DPTEG_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 marked data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x20054",
|
||||
"EventName": "PM_L1_PREF",
|
||||
"BriefDescription": "A data line was written to the L1 due to a hardware or software prefetch",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x20056",
|
||||
"EventName": "PM_TAKEN_BR_MPRED_CMPL",
|
||||
"BriefDescription": "Total number of taken branches that were incorrectly predicted as not-taken. This event counts branches completed and does not include speculative instructions",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x20058",
|
||||
"EventName": "PM_DARQ1_10_12_ENTRIES",
|
||||
"BriefDescription": "Cycles in which 10 or more DARQ1 entries (out of 12) are in use",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2C050",
|
||||
"EventName": "PM_DATA_GRP_PUMP_CPRED",
|
||||
"BriefDescription": "Initial and Final Pump Scope was group pump (prediction=correct) for a demand load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2C05E",
|
||||
"EventName": "PM_INST_GRP_PUMP_MPRED",
|
||||
"BriefDescription": "Final Pump Scope (Group) ended up either larger or smaller than Initial Pump Scope for an instruction fetch (demand only)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2505C",
|
||||
"EventName": "PM_VSU_FIN",
|
||||
"BriefDescription": "VSU instruction finished. Up to 4 per cycle",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2505E",
|
||||
"EventName": "PM_BACK_BR_CMPL",
|
||||
"BriefDescription": "Branch instruction completed with a target address less than current instruction address",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2E052",
|
||||
"EventName": "PM_TM_PASSED",
|
||||
"BriefDescription": "Number of TM transactions that passed",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x20064",
|
||||
"EventName": "PM_IERAT_RELOAD_4K",
|
||||
"BriefDescription": "IERAT reloaded (after a miss) for 4K pages",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2006C",
|
||||
"EventName": "PM_RUN_CYC_SMT4_MODE",
|
||||
"BriefDescription": "Cycles in which this thread's run latch is set and the core is in SMT4 mode",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x201E0",
|
||||
"EventName": "PM_MRK_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 marked load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x201E4",
|
||||
"EventName": "PM_MRK_DATA_FROM_L3MISS",
|
||||
"BriefDescription": "The processor's data cache was reloaded from a location other than the local core's L3 due to a marked load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x201E8",
|
||||
"EventName": "PM_THRESH_EXC_512",
|
||||
"BriefDescription": "Threshold counter exceeded a value of 512",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x200F2",
|
||||
"EventName": "PM_INST_DISP",
|
||||
"BriefDescription": "# PPC Dispatched",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x30016",
|
||||
"EventName": "PM_CMPLU_STALL_SRQ_FULL",
|
||||
"BriefDescription": "Finish stall because the NTF instruction was a store that was held in LSAQ because the SRQ was full",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x30018",
|
||||
"EventName": "PM_ICT_NOSLOT_DISP_HELD_HB_FULL",
|
||||
"BriefDescription": "Ict empty for this thread due to dispatch holds because the History Buffer was full. Could be GPR/VSR/VMR/FPR/CR/XVF; CR; XVF (XER/VSCR/FPSCR)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3001A",
|
||||
"EventName": "PM_DATA_TABLEWALK_CYC",
|
||||
"BriefDescription": "Data Tablewalk Cycles. Could be 1 or 2 active tablewalks. Includes data prefetches.",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x30132",
|
||||
"EventName": "PM_MRK_VSU_FIN",
|
||||
"BriefDescription": "VSU marked instr finish",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x30134",
|
||||
"EventName": "PM_MRK_ST_CMPL_INT",
|
||||
"BriefDescription": "marked store finished with intervention",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x30038",
|
||||
"EventName": "PM_CMPLU_STALL_DMISS_LMEM",
|
||||
"BriefDescription": "Completion stall due to cache miss that resolves in local memory",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3C040",
|
||||
"EventName": "PM_DATA_FROM_L2_DISP_CONFLICT_LDHITST",
|
||||
"BriefDescription": "The processor's data cache was reloaded from local core's L2 with load hit store conflict due to a demand load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3C042",
|
||||
"EventName": "PM_DATA_FROM_L3_DISP_CONFLICT",
|
||||
"BriefDescription": "The processor's data cache was reloaded from local core's L3 with dispatch conflict due to a demand load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3D140",
|
||||
"EventName": "PM_MRK_DATA_FROM_L2_DISP_CONFLICT_OTHER_CYC",
|
||||
"BriefDescription": "Duration in cycles to reload from local core's L2 with dispatch conflict due to a marked load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3D144",
|
||||
"EventName": "PM_MRK_DATA_FROM_L2_MEPF_CYC",
|
||||
"BriefDescription": "Duration in cycles to reload from local core's L2 hit without dispatch conflicts on Mepf state. due to a marked load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3D146",
|
||||
"EventName": "PM_MRK_DATA_FROM_L3_NO_CONFLICT",
|
||||
"BriefDescription": "The processor's data cache was reloaded from local core's L3 without conflict due to a marked load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3D14C",
|
||||
"EventName": "PM_MRK_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 marked load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3D14E",
|
||||
"EventName": "PM_MRK_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 marked load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x35042",
|
||||
"EventName": "PM_IPTEG_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 instruction side request",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x35048",
|
||||
"EventName": "PM_IPTEG_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 instruction side request",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3504C",
|
||||
"EventName": "PM_IPTEG_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 instruction side request",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3F146",
|
||||
"EventName": "PM_MRK_DPTEG_FROM_L2.1_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 marked data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3005A",
|
||||
"EventName": "PM_ISQ_0_8_ENTRIES",
|
||||
"BriefDescription": "Cycles in which 8 or less Issue Queue entries are in use. This is a shared event, not per thread",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3005C",
|
||||
"EventName": "PM_BFU_BUSY",
|
||||
"BriefDescription": "Cycles in which all 4 Binary Floating Point units are busy. The BFU is running at capacity",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3C05E",
|
||||
"EventName": "PM_MEM_RWITM",
|
||||
"BriefDescription": "Memory Read With Intent to Modify for this thread",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x34054",
|
||||
"EventName": "PM_PARTIAL_ST_FIN",
|
||||
"BriefDescription": "Any store finished by an LSU slice",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3D15E",
|
||||
"EventName": "PM_MULT_MRK",
|
||||
"BriefDescription": "mult marked instr",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x35152",
|
||||
"EventName": "PM_MRK_DATA_FROM_L2MISS_CYC",
|
||||
"BriefDescription": "Duration in cycles to reload from a location other than the local core's L2 due to a marked load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x35154",
|
||||
"EventName": "PM_MRK_DATA_FROM_L3_CYC",
|
||||
"BriefDescription": "Duration in cycles to reload from local core's L3 due to a marked load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x35156",
|
||||
"EventName": "PM_MRK_DATA_FROM_L3.1_SHR_CYC",
|
||||
"BriefDescription": "Duration in cycles to reload with Shared (S) data from another core's L3 on the same chip due to a marked load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x35158",
|
||||
"EventName": "PM_MRK_DATA_FROM_L3.1_ECO_MOD_CYC",
|
||||
"BriefDescription": "Duration in cycles to reload with Modified (M) data from another core's ECO L3 on the same chip due to a marked load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3515E",
|
||||
"EventName": "PM_MRK_BACK_BR_CMPL",
|
||||
"BriefDescription": "Marked branch instruction completed with a target address less than current instruction address",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3E05E",
|
||||
"EventName": "PM_L3_CO_MEPF",
|
||||
"BriefDescription": "L3 castouts in Mepf state for this thread",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3F150",
|
||||
"EventName": "PM_MRK_ST_DRAIN_TO_L2DISP_CYC",
|
||||
"BriefDescription": "cycles to drain st from core to L2",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3F054",
|
||||
"EventName": "PM_RADIX_PWC_L4_PTE_FROM_L3MISS",
|
||||
"BriefDescription": "A Page Table Entry was reloaded to a level 4 page walk cache from beyond the core's L3 data cache. This is the deepest level of PWC possible for a translation. The source could be local/remote/distant memory or another core's cache",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x30162",
|
||||
"EventName": "PM_MRK_LSU_DERAT_MISS",
|
||||
"BriefDescription": "Marked derat reload (miss) for any page size",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3006A",
|
||||
"EventName": "PM_IERAT_RELOAD_64K",
|
||||
"BriefDescription": "IERAT Reloaded (Miss) for a 64k page",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x300F8",
|
||||
"EventName": "PM_TB_BIT_TRANS",
|
||||
"BriefDescription": "timebase event",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x40006",
|
||||
"EventName": "PM_ISLB_MISS",
|
||||
"BriefDescription": "Number of ISLB misses for this thread",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x40008",
|
||||
"EventName": "PM_SRQ_EMPTY_CYC",
|
||||
"BriefDescription": "Cycles in which the SRQ has at least one (out of four) empty slice",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x40014",
|
||||
"EventName": "PM_PROBE_NOP_DISP",
|
||||
"BriefDescription": "ProbeNops dispatched",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4001C",
|
||||
"EventName": "PM_INST_IMC_MATCH_CMPL",
|
||||
"BriefDescription": "IMC Match Count",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4C01A",
|
||||
"EventName": "PM_CMPLU_STALL_DMISS_L3MISS",
|
||||
"BriefDescription": "Completion stall due to cache miss resolving missed the L3",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D012",
|
||||
"EventName": "PM_PMC3_SAVED",
|
||||
"BriefDescription": "PMC3 Rewind Value saved",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4E11E",
|
||||
"EventName": "PM_MRK_DATA_FROM_DMEM_CYC",
|
||||
"BriefDescription": "Duration in cycles to reload from another chip's memory on the same Node or Group (Distant) due to a marked load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4C124",
|
||||
"EventName": "PM_MRK_DATA_FROM_L3_NO_CONFLICT_CYC",
|
||||
"BriefDescription": "Duration in cycles to reload from local core's L3 without conflict due to a marked load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D12E",
|
||||
"EventName": "PM_MRK_DATA_FROM_DL2L3_MOD_CYC",
|
||||
"BriefDescription": "Duration in cycles to reload 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 load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4013A",
|
||||
"EventName": "PM_MRK_IC_MISS",
|
||||
"BriefDescription": "Marked instruction experienced I cache miss",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x44044",
|
||||
"EventName": "PM_INST_FROM_L3.1_ECO_MOD",
|
||||
"BriefDescription": "The processor's Instruction cache was reloaded with Modified (M) data from another core's ECO L3 on the same chip due to an instruction fetch (not prefetch)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x44046",
|
||||
"EventName": "PM_INST_FROM_L2.1_MOD",
|
||||
"BriefDescription": "The processor's Instruction cache was reloaded with Modified (M) data from another core's L2 on the same chip due to an instruction fetch (not prefetch)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4404A",
|
||||
"EventName": "PM_INST_FROM_OFF_CHIP_CACHE",
|
||||
"BriefDescription": "The processor's Instruction cache was reloaded either shared or modified data from another core's L2/L3 on a different chip (remote or distant) due to an instruction fetch (not prefetch)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D144",
|
||||
"EventName": "PM_MRK_DATA_FROM_L3.1_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 marked load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D146",
|
||||
"EventName": "PM_MRK_DATA_FROM_L2.1_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 marked load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4504C",
|
||||
"EventName": "PM_IPTEG_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 instruction side request",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4E044",
|
||||
"EventName": "PM_DPTEG_FROM_L3.1_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 data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4E04A",
|
||||
"EventName": "PM_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 data side request. When using Radix Page Translation, this count excludes PDE reloads. Only PTE reloads are included",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x40154",
|
||||
"EventName": "PM_MRK_FAB_RSP_BKILL",
|
||||
"BriefDescription": "Marked store had to do a bkill",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4C054",
|
||||
"EventName": "PM_DERAT_MISS_16G",
|
||||
"BriefDescription": "Data ERAT Miss (Data TLB Access) page size 16G",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4C05A",
|
||||
"EventName": "PM_DTLB_MISS_1G",
|
||||
"BriefDescription": "Data TLB reload (after a miss) page size 1G. Implies radix translation was used",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x44054",
|
||||
"EventName": "PM_VECTOR_LD_CMPL",
|
||||
"BriefDescription": "Number of vector load instructions completed",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D05E",
|
||||
"EventName": "PM_BR_CMPL",
|
||||
"BriefDescription": "Any Branch instruction completed",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x45054",
|
||||
"EventName": "PM_FMA_CMPL",
|
||||
"BriefDescription": "two flops operation completed (fmadd, fnmadd, fmsub, fnmsub) Scalar instructions only. ",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x45056",
|
||||
"EventName": "PM_SCALAR_FLOP_CMPL",
|
||||
"BriefDescription": "Scalar flop operation completed",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4505C",
|
||||
"EventName": "PM_MATH_FLOP_CMPL",
|
||||
"BriefDescription": "Math flop instruction completed",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4E05E",
|
||||
"EventName": "PM_TM_OUTER_TBEGIN_DISP",
|
||||
"BriefDescription": "Number of outer tbegin instructions dispatched. The dispatch unit determines whether the tbegin instruction is outer or nested. This is a speculative count, which includes flushed instructions",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4F054",
|
||||
"EventName": "PM_RADIX_PWC_MISS",
|
||||
"BriefDescription": "A radix translation attempt missed in the TLB and all levels of page walk cache.",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4F05C",
|
||||
"EventName": "PM_RADIX_PWC_L2_PTE_FROM_L3MISS",
|
||||
"BriefDescription": "A Page Table Entry was reloaded to a level 2 page walk cache from beyond the core's L3 data cache. This implies that level 3 and level 4 PWC accesses were not necessary for this translation. The source could be local/remote/distant memory or another core's cache",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x401E6",
|
||||
"EventName": "PM_MRK_INST_FROM_L3MISS",
|
||||
"BriefDescription": "Marked instruction was reloaded from a location beyond the local chiplet",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x401E8",
|
||||
"EventName": "PM_MRK_DATA_FROM_L2MISS",
|
||||
"BriefDescription": "The processor's data cache was reloaded from a location other than the local core's L2 due to a marked load",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x400FA",
|
||||
"EventName": "PM_RUN_INST_CMPL",
|
||||
"BriefDescription": "Run_Instructions",
|
||||
"PublicDescription": ""
|
||||
}
|
||||
]
|
680
tools/perf/pmu-events/arch/powerpc/power9/pipeline.json
Normal file
680
tools/perf/pmu-events/arch/powerpc/power9/pipeline.json
Normal file
@ -0,0 +1,680 @@
|
||||
[
|
||||
{,
|
||||
"EventCode": "0x1E",
|
||||
"EventName": "PM_CYC",
|
||||
"BriefDescription": "Cycles",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x100F0",
|
||||
"EventName": "PM_CYC",
|
||||
"BriefDescription": "Cycles",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2",
|
||||
"EventName": "PM_INST_CMPL",
|
||||
"BriefDescription": "Number of PowerPC Instructions that completed.",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x100FE",
|
||||
"EventName": "PM_INST_CMPL",
|
||||
"BriefDescription": "# PPC instructions completed",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x10006",
|
||||
"EventName": "PM_DISP_HELD",
|
||||
"BriefDescription": "Dispatch Held",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x10016",
|
||||
"EventName": "PM_DSLB_MISS",
|
||||
"BriefDescription": "Data SLB Miss - Total of all segment sizes",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x10018",
|
||||
"EventName": "PM_IC_DEMAND_CYC",
|
||||
"BriefDescription": "Icache miss demand cycles",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x10022",
|
||||
"EventName": "PM_PMC2_SAVED",
|
||||
"BriefDescription": "PMC2 Rewind Value saved",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x10024",
|
||||
"EventName": "PM_PMC5_OVERFLOW",
|
||||
"BriefDescription": "Overflow from counter 5",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x10056",
|
||||
"EventName": "PM_MEM_READ",
|
||||
"BriefDescription": "Reads from Memory from this thread (includes data/inst/xlate/l1prefetch/inst prefetch). Includes L4",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1C056",
|
||||
"EventName": "PM_DERAT_MISS_4K",
|
||||
"BriefDescription": "Data ERAT Miss (Data TLB Access) page size 4K",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1C05A",
|
||||
"EventName": "PM_DERAT_MISS_2M",
|
||||
"BriefDescription": "Data ERAT Miss (Data TLB Access) page size 2M. Implies radix translation",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x14050",
|
||||
"EventName": "PM_INST_CHIP_PUMP_CPRED",
|
||||
"BriefDescription": "Initial and Final Pump Scope was chip pump (prediction=correct) for an instruction fetch",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1D154",
|
||||
"EventName": "PM_MRK_DATA_FROM_L2.1_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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x15156",
|
||||
"EventName": "PM_SYNC_MRK_FX_DIVIDE",
|
||||
"BriefDescription": "Marked fixed point divide that can cause a synchronous interrupt",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1E054",
|
||||
"EventName": "PM_CMPLU_STALL",
|
||||
"BriefDescription": "Nothing completed and ICT not empty",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x10062",
|
||||
"EventName": "PM_LD_L3MISS_PEND_CYC",
|
||||
"BriefDescription": "Cycles L3 miss was pending for this thread",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x10068",
|
||||
"EventName": "PM_BRU_FIN",
|
||||
"BriefDescription": "Branch Instruction Finished",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x100F6",
|
||||
"EventName": "PM_IERAT_RELOAD",
|
||||
"BriefDescription": "Number of I-ERAT reloads",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x100F8",
|
||||
"EventName": "PM_ICT_NOSLOT_CYC",
|
||||
"BriefDescription": "Number of cycles the ICT has no itags assigned to this thread",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x20008",
|
||||
"EventName": "PM_ICT_EMPTY_CYC",
|
||||
"BriefDescription": "Cycles in which the ICT is completely empty. No itags are assigned to any thread",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2000E",
|
||||
"EventName": "PM_FXU_BUSY",
|
||||
"BriefDescription": "Cycles in which all 4 FXUs are busy. The FXU is running at capacity",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2C018",
|
||||
"EventName": "PM_CMPLU_STALL_DMISS_L21_L31",
|
||||
"BriefDescription": "Completion stall by Dcache miss which resolved on chip ( excluding local L2/L3)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2D01A",
|
||||
"EventName": "PM_ICT_NOSLOT_IC_MISS",
|
||||
"BriefDescription": "Ict empty for this thread due to Icache Miss",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2E012",
|
||||
"EventName": "PM_TM_TX_PASS_RUN_CYC",
|
||||
"BriefDescription": "cycles spent in successful transactions",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2D14E",
|
||||
"EventName": "PM_MRK_DATA_FROM_L2.1_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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2F144",
|
||||
"EventName": "PM_MRK_DPTEG_FROM_L3.1_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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2C054",
|
||||
"EventName": "PM_DERAT_MISS_64K",
|
||||
"BriefDescription": "Data ERAT Miss (Data TLB Access) page size 64K",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2C05A",
|
||||
"EventName": "PM_DERAT_MISS_1G",
|
||||
"BriefDescription": "Data ERAT Miss (Data TLB Access) page size 1G. Implies radix translation",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x24052",
|
||||
"EventName": "PM_FXU_IDLE",
|
||||
"BriefDescription": "Cycles in which FXU0, FXU1, FXU2, and FXU3 are all idle",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2D150",
|
||||
"EventName": "PM_MRK_DERAT_MISS_4K",
|
||||
"BriefDescription": "Marked Data ERAT Miss (Data TLB Access) page size 4K",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2D152",
|
||||
"EventName": "PM_MRK_DERAT_MISS_2M",
|
||||
"BriefDescription": "Marked Data ERAT Miss (Data TLB Access) page size 2M. Implies radix translation",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x20066",
|
||||
"EventName": "PM_TLB_MISS",
|
||||
"BriefDescription": "TLB Miss (I + D)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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.",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x200F4",
|
||||
"EventName": "PM_RUN_CYC",
|
||||
"BriefDescription": "Run_cycles",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x200F8",
|
||||
"EventName": "PM_EXT_INT",
|
||||
"BriefDescription": "external interrupt",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x30020",
|
||||
"EventName": "PM_PMC2_REWIND",
|
||||
"BriefDescription": "PMC2 Rewind Event (did not match condition)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x30022",
|
||||
"EventName": "PM_PMC4_SAVED",
|
||||
"BriefDescription": "PMC4 Rewind Value saved (matched condition)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x30024",
|
||||
"EventName": "PM_PMC6_OVERFLOW",
|
||||
"BriefDescription": "Overflow from counter 6",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3D148",
|
||||
"EventName": "PM_MRK_DATA_FROM_L2.1_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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3E046",
|
||||
"EventName": "PM_DPTEG_FROM_L2.1_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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x30056",
|
||||
"EventName": "PM_TM_ABORTS",
|
||||
"BriefDescription": "Number of TM transactions aborted",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x30058",
|
||||
"EventName": "PM_TLBIE_FIN",
|
||||
"BriefDescription": "tlbie finished",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3C054",
|
||||
"EventName": "PM_DERAT_MISS_16M",
|
||||
"BriefDescription": "Data ERAT Miss (Data TLB Access) page size 16M",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x34058",
|
||||
"EventName": "PM_ICT_NOSLOT_BR_MPRED_ICMISS",
|
||||
"BriefDescription": "Ict empty for this thread due to Icache Miss and branch mispred",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3405E",
|
||||
"EventName": "PM_IFETCH_THROTTLE",
|
||||
"BriefDescription": "Cycles in which Instruction fetch throttle was active.",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3D152",
|
||||
"EventName": "PM_MRK_DERAT_MISS_1G",
|
||||
"BriefDescription": "Marked Data ERAT Miss (Data TLB Access) page size 1G. Implies radix translation",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3D154",
|
||||
"EventName": "PM_MRK_DERAT_MISS_16M",
|
||||
"BriefDescription": "Marked Data ERAT Miss (Data TLB Access) page size 16M",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3D058",
|
||||
"EventName": "PM_VSU_DP_FSQRT_FDIV",
|
||||
"BriefDescription": "vector versions of fdiv,fsqrt",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x300FC",
|
||||
"EventName": "PM_DTLB_MISS",
|
||||
"BriefDescription": "Data PTEG reload",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x40004",
|
||||
"EventName": "PM_FXU_FIN",
|
||||
"BriefDescription": "The fixed point unit Unit finished an instruction. Instructions that finish may not necessary complete.",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x40010",
|
||||
"EventName": "PM_PMC3_OVERFLOW",
|
||||
"BriefDescription": "Overflow from counter 3",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D01C",
|
||||
"EventName": "PM_ICT_NOSLOT_DISP_HELD_SYNC",
|
||||
"BriefDescription": "Dispatch held due to a synchronizing instruction at dispatch",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D01E",
|
||||
"EventName": "PM_ICT_NOSLOT_BR_MPRED",
|
||||
"BriefDescription": "Ict empty for this thread due to branch mispred",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4E01A",
|
||||
"EventName": "PM_ICT_NOSLOT_DISP_HELD",
|
||||
"BriefDescription": "Cycles in which the NTC instruction is held at dispatch for any reason",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D124",
|
||||
"EventName": "PM_MRK_DATA_FROM_L3.1_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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D04C",
|
||||
"EventName": "PM_DFU_BUSY",
|
||||
"BriefDescription": "Cycles in which all 4 Decimal Floating Point units are busy. The DFU is running at capacity",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D04E",
|
||||
"EventName": "PM_VSU_FSQRT_FDIV",
|
||||
"BriefDescription": "four flops operation (fdiv,fsqrt) Scalar Instructions only",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4E046",
|
||||
"EventName": "PM_DPTEG_FROM_L2.1_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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4F146",
|
||||
"EventName": "PM_MRK_DPTEG_FROM_L2.1_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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4C058",
|
||||
"EventName": "PM_MEM_CO",
|
||||
"BriefDescription": "Memory castouts from this thread",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4C15C",
|
||||
"EventName": "PM_MRK_DERAT_MISS_16G",
|
||||
"BriefDescription": "Marked Data ERAT Miss (Data TLB Access) page size 16G",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D050",
|
||||
"EventName": "PM_VSU_NON_FLOP_CMPL",
|
||||
"BriefDescription": "Non FLOP operation completed",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D052",
|
||||
"EventName": "PM_2FLOP_CMPL",
|
||||
"BriefDescription": "DP vector version of fmul, fsub, fcmp, fsel, fabs, fnabs, fres ,fsqrte, fneg ",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x45058",
|
||||
"EventName": "PM_IC_MISS_CMPL",
|
||||
"BriefDescription": "Non-speculative icache miss, counted at completion",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x40062",
|
||||
"EventName": "PM_DUMMY1_REMOVE_ME",
|
||||
"BriefDescription": "Space holder for L2_PC_PM_MK_LDST_SCOPE_PRED_STATUS",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x40064",
|
||||
"EventName": "PM_DUMMY2_REMOVE_ME",
|
||||
"BriefDescription": "Space holder for LS_PC_RELOAD_RA",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4006A",
|
||||
"EventName": "PM_IERAT_RELOAD_16M",
|
||||
"BriefDescription": "IERAT Reloaded (Miss) for a 16M page",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x401EC",
|
||||
"EventName": "PM_THRESH_EXC_2048",
|
||||
"BriefDescription": "Threshold counter exceeded a value of 2048",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x400F2",
|
||||
"EventName": "PM_1PLUS_PPC_DISP",
|
||||
"BriefDescription": "Cycles at least one Instr Dispatched",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x400F8",
|
||||
"EventName": "PM_FLUSH",
|
||||
"BriefDescription": "Flush (any type)",
|
||||
"PublicDescription": ""
|
||||
}
|
||||
]
|
146
tools/perf/pmu-events/arch/powerpc/power9/pmc.json
Normal file
146
tools/perf/pmu-events/arch/powerpc/power9/pmc.json
Normal file
@ -0,0 +1,146 @@
|
||||
[
|
||||
{,
|
||||
"EventCode": "0x0",
|
||||
"EventName": "PM_SUSPENDED",
|
||||
"BriefDescription": "Counter OFF",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x10026",
|
||||
"EventName": "PM_TABLEWALK_CYC",
|
||||
"BriefDescription": "Cycles when an instruction tablewalk is active",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x10060",
|
||||
"EventName": "PM_TM_TRANS_RUN_CYC",
|
||||
"BriefDescription": "run cycles in transactional state",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2C056",
|
||||
"EventName": "PM_DTLB_MISS_4K",
|
||||
"BriefDescription": "Data TLB Miss page size 4k",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3000C",
|
||||
"EventName": "PM_FREQ_DOWN",
|
||||
"BriefDescription": "Power Management: Below Threshold B",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x301E8",
|
||||
"EventName": "PM_THRESH_EXC_64",
|
||||
"BriefDescription": "Threshold counter exceeded a value of 64",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x40118",
|
||||
"EventName": "PM_MRK_DCACHE_RELOAD_INTV",
|
||||
"BriefDescription": "Combined Intervention event",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D018",
|
||||
"EventName": "PM_CMPLU_STALL_BRU",
|
||||
"BriefDescription": "Completion stall due to a Branch Unit",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x40056",
|
||||
"EventName": "PM_MEM_LOC_THRESH_LSU_HIGH",
|
||||
"BriefDescription": "Local memory above threshold for LSU medium",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D054",
|
||||
"EventName": "PM_8FLOP_CMPL",
|
||||
"BriefDescription": "8 FLOP instruction completed",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x45050",
|
||||
"EventName": "PM_1FLOP_CMPL",
|
||||
"BriefDescription": "one flop (fadd, fmul, fsub, fcmp, fsel, fabs, fnabs, fres, fsqrte, fneg) operation completed",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x45052",
|
||||
"EventName": "PM_4FLOP_CMPL",
|
||||
"BriefDescription": "4 FLOP instruction completed",
|
||||
"PublicDescription": ""
|
||||
}
|
||||
]
|
272
tools/perf/pmu-events/arch/powerpc/power9/translation.json
Normal file
272
tools/perf/pmu-events/arch/powerpc/power9/translation.json
Normal file
@ -0,0 +1,272 @@
|
||||
[
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1D142",
|
||||
"EventName": "PM_MRK_DATA_FROM_L3.1_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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1E058",
|
||||
"EventName": "PM_STCX_FAIL",
|
||||
"BriefDescription": "stcx failed",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x1F15E",
|
||||
"EventName": "PM_MRK_PROBE_NOP_CMPL",
|
||||
"BriefDescription": "Marked probeNops completed",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x20112",
|
||||
"EventName": "PM_MRK_NTF_FIN",
|
||||
"BriefDescription": "Marked next to finish instruction finished",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x20016",
|
||||
"EventName": "PM_ST_FIN",
|
||||
"BriefDescription": "Store finish count. Includes speculative activity",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x20018",
|
||||
"EventName": "PM_ST_FWD",
|
||||
"BriefDescription": "Store forwards that finished",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2E018",
|
||||
"EventName": "PM_CMPLU_STALL_VFXLONG",
|
||||
"BriefDescription": "Completion stall due to a long latency vector fixed point instruction (division, square root)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x2E01C",
|
||||
"EventName": "PM_CMPLU_STALL_TLBIE",
|
||||
"BriefDescription": "Finish stall because the NTF instruction was a tlbie waiting for response from L2",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x201E6",
|
||||
"EventName": "PM_THRESH_EXC_32",
|
||||
"BriefDescription": "Threshold counter exceeded a value of 32",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x200F0",
|
||||
"EventName": "PM_ST_CMPL",
|
||||
"BriefDescription": "Stores completed from S2Q (2nd-level store queue).",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x200FE",
|
||||
"EventName": "PM_DATA_FROM_L2MISS",
|
||||
"BriefDescription": "Demand LD - L2 Miss (not L2 hit)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x30010",
|
||||
"EventName": "PM_PMC2_OVERFLOW",
|
||||
"BriefDescription": "Overflow from counter 2",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x3C046",
|
||||
"EventName": "PM_DATA_FROM_L2.1_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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x34046",
|
||||
"EventName": "PM_INST_FROM_L2.1_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)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x30066",
|
||||
"EventName": "PM_LSU_FIN",
|
||||
"BriefDescription": "LSU Finished a PPC instruction (up to 4 per cycle)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x300F0",
|
||||
"EventName": "PM_ST_MISS_L1",
|
||||
"BriefDescription": "Store Missed L1",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D010",
|
||||
"EventName": "PM_PMC1_SAVED",
|
||||
"BriefDescription": "PMC1 Rewind Value saved",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x40132",
|
||||
"EventName": "PM_MRK_LSU_FIN",
|
||||
"BriefDescription": "lsu marked instr PPC finish",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4C046",
|
||||
"EventName": "PM_DATA_FROM_L2.1_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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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)",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"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",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4D05C",
|
||||
"EventName": "PM_DP_QP_FLOP_CMPL",
|
||||
"BriefDescription": "Double-Precion or Quad-Precision instruction completed",
|
||||
"PublicDescription": ""
|
||||
},
|
||||
{,
|
||||
"EventCode": "0x4E05C",
|
||||
"EventName": "PM_LSU_REJECT_LHS",
|
||||
"BriefDescription": "LSU Reject due to LHS (up to 4 per cycle)",
|
||||
"PublicDescription": ""
|
||||
}
|
||||
]
|
@ -36,6 +36,7 @@
|
||||
#define ENV "PERF_TEST_ATTR"
|
||||
|
||||
static char *dir;
|
||||
static bool ready;
|
||||
|
||||
void test_attr__init(void)
|
||||
{
|
||||
@ -67,6 +68,9 @@ static int store_event(struct perf_event_attr *attr, pid_t pid, int cpu,
|
||||
FILE *file;
|
||||
char path[PATH_MAX];
|
||||
|
||||
if (!ready)
|
||||
return 0;
|
||||
|
||||
snprintf(path, PATH_MAX, "%s/event-%d-%llu-%d", dir,
|
||||
attr->type, attr->config, fd);
|
||||
|
||||
@ -136,7 +140,7 @@ void test_attr__open(struct perf_event_attr *attr, pid_t pid, int cpu,
|
||||
{
|
||||
int errno_saved = errno;
|
||||
|
||||
if (store_event(attr, pid, cpu, fd, group_fd, flags)) {
|
||||
if ((fd != -1) && store_event(attr, pid, cpu, fd, group_fd, flags)) {
|
||||
pr_err("test attr FAILED");
|
||||
exit(128);
|
||||
}
|
||||
@ -144,6 +148,12 @@ void test_attr__open(struct perf_event_attr *attr, pid_t pid, int cpu,
|
||||
errno = errno_saved;
|
||||
}
|
||||
|
||||
void test_attr__ready(void)
|
||||
{
|
||||
if (unlikely(test_attr__enabled) && !ready)
|
||||
ready = true;
|
||||
}
|
||||
|
||||
static int run_dir(const char *d, const char *perf)
|
||||
{
|
||||
char v[] = "-vvvvv";
|
||||
|
@ -9,6 +9,20 @@ import logging
|
||||
import shutil
|
||||
import ConfigParser
|
||||
|
||||
def data_equal(a, b):
|
||||
# Allow multiple values in assignment separated by '|'
|
||||
a_list = a.split('|')
|
||||
b_list = b.split('|')
|
||||
|
||||
for a_item in a_list:
|
||||
for b_item in b_list:
|
||||
if (a_item == b_item):
|
||||
return True
|
||||
elif (a_item == '*') or (b_item == '*'):
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
class Fail(Exception):
|
||||
def __init__(self, test, msg):
|
||||
self.msg = msg
|
||||
@ -82,34 +96,25 @@ class Event(dict):
|
||||
self.add(base)
|
||||
self.add(data)
|
||||
|
||||
def compare_data(self, a, b):
|
||||
# Allow multiple values in assignment separated by '|'
|
||||
a_list = a.split('|')
|
||||
b_list = b.split('|')
|
||||
|
||||
for a_item in a_list:
|
||||
for b_item in b_list:
|
||||
if (a_item == b_item):
|
||||
return True
|
||||
elif (a_item == '*') or (b_item == '*'):
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
def equal(self, other):
|
||||
for t in Event.terms:
|
||||
log.debug(" [%s] %s %s" % (t, self[t], other[t]));
|
||||
if not self.has_key(t) or not other.has_key(t):
|
||||
return False
|
||||
if not self.compare_data(self[t], other[t]):
|
||||
if not data_equal(self[t], other[t]):
|
||||
return False
|
||||
return True
|
||||
|
||||
def optional(self):
|
||||
if self.has_key('optional') and self['optional'] == '1':
|
||||
return True
|
||||
return False
|
||||
|
||||
def diff(self, other):
|
||||
for t in Event.terms:
|
||||
if not self.has_key(t) or not other.has_key(t):
|
||||
continue
|
||||
if not self.compare_data(self[t], other[t]):
|
||||
if not data_equal(self[t], other[t]):
|
||||
log.warning("expected %s=%s, got %s" % (t, self[t], other[t]))
|
||||
|
||||
# Test file description needs to have following sections:
|
||||
@ -218,9 +223,9 @@ class Test(object):
|
||||
self.perf, self.command, tempdir, self.args)
|
||||
ret = os.WEXITSTATUS(os.system(cmd))
|
||||
|
||||
log.info(" '%s' ret %d " % (cmd, ret))
|
||||
log.info(" '%s' ret '%s', expected '%s'" % (cmd, str(ret), str(self.ret)))
|
||||
|
||||
if ret != int(self.ret):
|
||||
if not data_equal(str(ret), str(self.ret)):
|
||||
raise Unsup(self)
|
||||
|
||||
def compare(self, expect, result):
|
||||
@ -244,9 +249,12 @@ class Test(object):
|
||||
log.debug(" match: [%s] matches %s" % (exp_name, str(exp_list)))
|
||||
|
||||
# we did not any matching event - fail
|
||||
if (not exp_list):
|
||||
exp_event.diff(res_event)
|
||||
raise Fail(self, 'match failure');
|
||||
if not exp_list:
|
||||
if exp_event.optional():
|
||||
log.debug(" %s does not match, but is optional" % exp_name)
|
||||
else:
|
||||
exp_event.diff(res_event)
|
||||
raise Fail(self, 'match failure');
|
||||
|
||||
match[exp_name] = exp_list
|
||||
|
||||
|
@ -7,7 +7,7 @@ cpu=*
|
||||
type=0|1
|
||||
size=112
|
||||
config=0
|
||||
sample_period=4000
|
||||
sample_period=*
|
||||
sample_type=263
|
||||
read_format=0
|
||||
disabled=1
|
||||
@ -15,7 +15,7 @@ inherit=1
|
||||
pinned=0
|
||||
exclusive=0
|
||||
exclude_user=0
|
||||
exclude_kernel=0
|
||||
exclude_kernel=0|1
|
||||
exclude_hv=0
|
||||
exclude_idle=0
|
||||
mmap=1
|
||||
@ -25,7 +25,7 @@ inherit_stat=0
|
||||
enable_on_exec=1
|
||||
task=0
|
||||
watermark=0
|
||||
precise_ip=0
|
||||
precise_ip=0|1|2|3
|
||||
mmap_data=0
|
||||
sample_id_all=1
|
||||
exclude_host=0|1
|
||||
|
@ -8,14 +8,14 @@ type=0
|
||||
size=112
|
||||
config=0
|
||||
sample_period=0
|
||||
sample_type=0
|
||||
sample_type=65536
|
||||
read_format=3
|
||||
disabled=1
|
||||
inherit=1
|
||||
pinned=0
|
||||
exclusive=0
|
||||
exclude_user=0
|
||||
exclude_kernel=0
|
||||
exclude_kernel=0|1
|
||||
exclude_hv=0
|
||||
exclude_idle=0
|
||||
mmap=0
|
||||
|
@ -1,6 +1,7 @@
|
||||
[config]
|
||||
command = record
|
||||
args = -C 0 kill >/dev/null 2>&1
|
||||
ret = 1
|
||||
|
||||
[event:base-record]
|
||||
cpu=0
|
||||
|
@ -1,5 +1,6 @@
|
||||
[config]
|
||||
command = record
|
||||
args = kill >/dev/null 2>&1
|
||||
ret = 1
|
||||
|
||||
[event:base-record]
|
||||
|
@ -1,8 +1,8 @@
|
||||
[config]
|
||||
command = record
|
||||
args = -b kill >/dev/null 2>&1
|
||||
ret = 1
|
||||
|
||||
[event:base-record]
|
||||
sample_period=4000
|
||||
sample_type=2311
|
||||
branch_sample_type=8
|
||||
|
@ -1,8 +1,8 @@
|
||||
[config]
|
||||
command = record
|
||||
args = -j any kill >/dev/null 2>&1
|
||||
ret = 1
|
||||
|
||||
[event:base-record]
|
||||
sample_period=4000
|
||||
sample_type=2311
|
||||
branch_sample_type=8
|
||||
|
@ -1,8 +1,8 @@
|
||||
[config]
|
||||
command = record
|
||||
args = -j any_call kill >/dev/null 2>&1
|
||||
ret = 1
|
||||
|
||||
[event:base-record]
|
||||
sample_period=4000
|
||||
sample_type=2311
|
||||
branch_sample_type=16
|
||||
|
@ -1,8 +1,8 @@
|
||||
[config]
|
||||
command = record
|
||||
args = -j any_ret kill >/dev/null 2>&1
|
||||
ret = 1
|
||||
|
||||
[event:base-record]
|
||||
sample_period=4000
|
||||
sample_type=2311
|
||||
branch_sample_type=32
|
||||
|
@ -1,8 +1,8 @@
|
||||
[config]
|
||||
command = record
|
||||
args = -j hv kill >/dev/null 2>&1
|
||||
ret = 1
|
||||
|
||||
[event:base-record]
|
||||
sample_period=4000
|
||||
sample_type=2311
|
||||
branch_sample_type=8
|
||||
|
@ -1,8 +1,8 @@
|
||||
[config]
|
||||
command = record
|
||||
args = -j ind_call kill >/dev/null 2>&1
|
||||
ret = 1
|
||||
|
||||
[event:base-record]
|
||||
sample_period=4000
|
||||
sample_type=2311
|
||||
branch_sample_type=64
|
||||
|
@ -1,8 +1,8 @@
|
||||
[config]
|
||||
command = record
|
||||
args = -j k kill >/dev/null 2>&1
|
||||
ret = 1
|
||||
|
||||
[event:base-record]
|
||||
sample_period=4000
|
||||
sample_type=2311
|
||||
branch_sample_type=8
|
||||
|
@ -1,8 +1,8 @@
|
||||
[config]
|
||||
command = record
|
||||
args = -j u kill >/dev/null 2>&1
|
||||
ret = 1
|
||||
|
||||
[event:base-record]
|
||||
sample_period=4000
|
||||
sample_type=2311
|
||||
branch_sample_type=8
|
||||
|
@ -1,6 +1,7 @@
|
||||
[config]
|
||||
command = record
|
||||
args = -c 123 kill >/dev/null 2>&1
|
||||
ret = 1
|
||||
|
||||
[event:base-record]
|
||||
sample_period=123
|
||||
|
@ -1,10 +1,9 @@
|
||||
[config]
|
||||
command = record
|
||||
args = -d kill >/dev/null 2>&1
|
||||
ret = 1
|
||||
|
||||
[event:base-record]
|
||||
sample_period=4000
|
||||
|
||||
# sample_type = PERF_SAMPLE_IP | PERF_SAMPLE_TID | PERF_SAMPLE_TIME |
|
||||
# PERF_SAMPLE_ADDR | PERF_SAMPLE_PERIOD | PERF_SAMPLE_DATA_SRC
|
||||
sample_type=33039
|
||||
|
@ -1,6 +1,7 @@
|
||||
[config]
|
||||
command = record
|
||||
args = -F 100 kill >/dev/null 2>&1
|
||||
ret = 1
|
||||
|
||||
[event:base-record]
|
||||
sample_period=100
|
||||
|
@ -1,6 +1,7 @@
|
||||
[config]
|
||||
command = record
|
||||
args = -g kill >/dev/null 2>&1
|
||||
ret = 1
|
||||
|
||||
[event:base-record]
|
||||
sample_type=295
|
||||
|
@ -1,10 +1,12 @@
|
||||
[config]
|
||||
command = record
|
||||
args = --call-graph dwarf -- kill >/dev/null 2>&1
|
||||
ret = 1
|
||||
|
||||
[event:base-record]
|
||||
sample_type=12583
|
||||
sample_type=45359
|
||||
exclude_callchain_user=1
|
||||
sample_stack_user=8192
|
||||
# TODO different for each arch, no support for that now
|
||||
sample_regs_user=*
|
||||
mmap_data=1
|
||||
|
@ -1,6 +1,7 @@
|
||||
[config]
|
||||
command = record
|
||||
args = --call-graph fp kill >/dev/null 2>&1
|
||||
ret = 1
|
||||
|
||||
[event:base-record]
|
||||
sample_type=295
|
||||
|
@ -1,6 +1,7 @@
|
||||
[config]
|
||||
command = record
|
||||
args = --group -e cycles,instructions kill >/dev/null 2>&1
|
||||
ret = 1
|
||||
|
||||
[event-1:base-record]
|
||||
fd=1
|
||||
|
@ -1,6 +1,7 @@
|
||||
[config]
|
||||
command = record
|
||||
args = -e '{cycles,cache-misses}:S' kill >/dev/null 2>&1
|
||||
ret = 1
|
||||
|
||||
[event-1:base-record]
|
||||
fd=1
|
||||
|
@ -1,6 +1,7 @@
|
||||
[config]
|
||||
command = record
|
||||
args = -e '{cycles,instructions}' kill >/dev/null 2>&1
|
||||
ret = 1
|
||||
|
||||
[event-1:base-record]
|
||||
fd=1
|
||||
|
@ -1,9 +1,9 @@
|
||||
[config]
|
||||
command = record
|
||||
args = -D kill >/dev/null 2>&1
|
||||
args = --no-buffering kill >/dev/null 2>&1
|
||||
ret = 1
|
||||
|
||||
[event:base-record]
|
||||
sample_period=4000
|
||||
sample_type=263
|
||||
watermark=0
|
||||
wakeup_events=1
|
@ -1,6 +1,7 @@
|
||||
[config]
|
||||
command = record
|
||||
args = -i kill >/dev/null 2>&1
|
||||
ret = 1
|
||||
|
||||
[event:base-record]
|
||||
sample_type=263
|
||||
|
@ -1,6 +1,7 @@
|
||||
[config]
|
||||
command = record
|
||||
args = -n kill >/dev/null 2>&1
|
||||
ret = 1
|
||||
|
||||
[event:base-record]
|
||||
sample_period=0
|
||||
|
@ -1,6 +1,7 @@
|
||||
[config]
|
||||
command = record
|
||||
args = -c 100 -P kill >/dev/null 2>&1
|
||||
ret = 1
|
||||
|
||||
[event:base-record]
|
||||
sample_period=100
|
||||
|
@ -1,7 +1,7 @@
|
||||
[config]
|
||||
command = record
|
||||
args = -R kill >/dev/null 2>&1
|
||||
ret = 1
|
||||
|
||||
[event:base-record]
|
||||
sample_period=4000
|
||||
sample_type=1415
|
||||
|
@ -4,6 +4,6 @@ args = -e cycles -C 0 kill >/dev/null 2>&1
|
||||
ret = 1
|
||||
|
||||
[event:base-stat]
|
||||
# events are enabled by default when attached to cpu
|
||||
disabled=0
|
||||
# events are disabled by default when attached to cpu
|
||||
disabled=1
|
||||
enable_on_exec=0
|
||||
|
@ -38,12 +38,14 @@ config=0
|
||||
fd=6
|
||||
type=0
|
||||
config=7
|
||||
optional=1
|
||||
|
||||
# PERF_TYPE_HARDWARE / PERF_COUNT_HW_STALLED_CYCLES_BACKEND
|
||||
[event7:base-stat]
|
||||
fd=7
|
||||
type=0
|
||||
config=8
|
||||
optional=1
|
||||
|
||||
# PERF_TYPE_HARDWARE / PERF_COUNT_HW_INSTRUCTIONS
|
||||
[event8:base-stat]
|
||||
|
@ -39,12 +39,14 @@ config=0
|
||||
fd=6
|
||||
type=0
|
||||
config=7
|
||||
optional=1
|
||||
|
||||
# PERF_TYPE_HARDWARE / PERF_COUNT_HW_STALLED_CYCLES_BACKEND
|
||||
[event7:base-stat]
|
||||
fd=7
|
||||
type=0
|
||||
config=8
|
||||
optional=1
|
||||
|
||||
# PERF_TYPE_HARDWARE / PERF_COUNT_HW_INSTRUCTIONS
|
||||
[event8:base-stat]
|
||||
|
@ -39,12 +39,14 @@ config=0
|
||||
fd=6
|
||||
type=0
|
||||
config=7
|
||||
optional=1
|
||||
|
||||
# PERF_TYPE_HARDWARE / PERF_COUNT_HW_STALLED_CYCLES_BACKEND
|
||||
[event7:base-stat]
|
||||
fd=7
|
||||
type=0
|
||||
config=8
|
||||
optional=1
|
||||
|
||||
# PERF_TYPE_HARDWARE / PERF_COUNT_HW_INSTRUCTIONS
|
||||
[event8:base-stat]
|
||||
@ -108,6 +110,7 @@ config=65538
|
||||
fd=15
|
||||
type=3
|
||||
config=1
|
||||
optional=1
|
||||
|
||||
# PERF_TYPE_HW_CACHE,
|
||||
# PERF_COUNT_HW_CACHE_L1I << 0 |
|
||||
|
@ -39,12 +39,14 @@ config=0
|
||||
fd=6
|
||||
type=0
|
||||
config=7
|
||||
optional=1
|
||||
|
||||
# PERF_TYPE_HARDWARE / PERF_COUNT_HW_STALLED_CYCLES_BACKEND
|
||||
[event7:base-stat]
|
||||
fd=7
|
||||
type=0
|
||||
config=8
|
||||
optional=1
|
||||
|
||||
# PERF_TYPE_HARDWARE / PERF_COUNT_HW_INSTRUCTIONS
|
||||
[event8:base-stat]
|
||||
@ -108,6 +110,7 @@ config=65538
|
||||
fd=15
|
||||
type=3
|
||||
config=1
|
||||
optional=1
|
||||
|
||||
# PERF_TYPE_HW_CACHE,
|
||||
# PERF_COUNT_HW_CACHE_L1I << 0 |
|
||||
@ -162,6 +165,7 @@ config=65540
|
||||
fd=21
|
||||
type=3
|
||||
config=512
|
||||
optional=1
|
||||
|
||||
# PERF_TYPE_HW_CACHE,
|
||||
# PERF_COUNT_HW_CACHE_L1D << 0 |
|
||||
@ -171,3 +175,4 @@ config=512
|
||||
fd=22
|
||||
type=3
|
||||
config=66048
|
||||
optional=1
|
||||
|
@ -33,7 +33,7 @@ static int build_id_cache__add_file(const char *filename)
|
||||
}
|
||||
|
||||
build_id__sprintf(build_id, sizeof(build_id), sbuild_id);
|
||||
err = build_id_cache__add_s(sbuild_id, filename, false, false);
|
||||
err = build_id_cache__add_s(sbuild_id, filename, NULL, false, false);
|
||||
if (err < 0)
|
||||
pr_debug("Failed to add build id cache of %s\n", filename);
|
||||
return err;
|
||||
@ -54,7 +54,7 @@ static char *get_self_path(void)
|
||||
static int search_cached_probe(const char *target,
|
||||
const char *group, const char *event)
|
||||
{
|
||||
struct probe_cache *cache = probe_cache__new(target);
|
||||
struct probe_cache *cache = probe_cache__new(target, NULL);
|
||||
int ret = 0;
|
||||
|
||||
if (!cache) {
|
||||
@ -83,6 +83,8 @@ int test__sdt_event(int subtests __maybe_unused)
|
||||
}
|
||||
/* Note that buildid_dir must be an absolute path */
|
||||
tempdir = realpath(__tempdir, NULL);
|
||||
if (tempdir == NULL)
|
||||
goto error_rmdir;
|
||||
|
||||
/* At first, scan itself */
|
||||
set_buildid_dir(tempdir);
|
||||
@ -100,7 +102,7 @@ int test__sdt_event(int subtests __maybe_unused)
|
||||
|
||||
error_rmdir:
|
||||
/* Cleanup temporary buildid dir */
|
||||
rm_rf(tempdir);
|
||||
rm_rf(__tempdir);
|
||||
error:
|
||||
free(tempdir);
|
||||
free(myself);
|
||||
|
@ -1 +1,2 @@
|
||||
libperf-y += fcntl.o
|
||||
libperf-y += statx.o
|
||||
|
@ -1,13 +1,44 @@
|
||||
#ifndef _PERF_TRACE_BEAUTY_H
|
||||
#define _PERF_TRACE_BEAUTY_H
|
||||
|
||||
#include <linux/kernel.h>
|
||||
#include <linux/types.h>
|
||||
|
||||
struct strarray {
|
||||
int offset;
|
||||
int nr_entries;
|
||||
const char **entries;
|
||||
};
|
||||
|
||||
#define DEFINE_STRARRAY(array) struct strarray strarray__##array = { \
|
||||
.nr_entries = ARRAY_SIZE(array), \
|
||||
.entries = array, \
|
||||
}
|
||||
|
||||
#define DEFINE_STRARRAY_OFFSET(array, off) struct strarray strarray__##array = { \
|
||||
.offset = off, \
|
||||
.nr_entries = ARRAY_SIZE(array), \
|
||||
.entries = array, \
|
||||
}
|
||||
|
||||
size_t strarray__scnprintf(struct strarray *sa, char *bf, size_t size, const char *intfmt, int val);
|
||||
|
||||
struct trace;
|
||||
struct thread;
|
||||
|
||||
/**
|
||||
* @val: value of syscall argument being formatted
|
||||
* @args: All the args, use syscall_args__val(arg, nth) to access one
|
||||
* @thread: tid state (maps, pid, tid, etc)
|
||||
* @trace: 'perf trace' internals: all threads, etc
|
||||
* @parm: private area, may be an strarray, for instance
|
||||
* @idx: syscall arg idx (is this the first?)
|
||||
* @mask: a syscall arg may mask another arg, see syscall_arg__scnprintf_futex_op
|
||||
*/
|
||||
|
||||
struct syscall_arg {
|
||||
unsigned long val;
|
||||
unsigned char *args;
|
||||
struct thread *thread;
|
||||
struct trace *trace;
|
||||
void *parm;
|
||||
@ -15,10 +46,44 @@ struct syscall_arg {
|
||||
u8 mask;
|
||||
};
|
||||
|
||||
unsigned long syscall_arg__val(struct syscall_arg *arg, u8 idx);
|
||||
|
||||
size_t syscall_arg__scnprintf_strarrays(char *bf, size_t size, struct syscall_arg *arg);
|
||||
#define SCA_STRARRAYS syscall_arg__scnprintf_strarrays
|
||||
|
||||
size_t syscall_arg__scnprintf_fd(char *bf, size_t size, struct syscall_arg *arg);
|
||||
#define SCA_FD syscall_arg__scnprintf_fd
|
||||
|
||||
size_t syscall_arg__scnprintf_hex(char *bf, size_t size, struct syscall_arg *arg);
|
||||
#define SCA_HEX syscall_arg__scnprintf_hex
|
||||
|
||||
size_t syscall_arg__scnprintf_int(char *bf, size_t size, struct syscall_arg *arg);
|
||||
#define SCA_INT syscall_arg__scnprintf_int
|
||||
|
||||
size_t syscall_arg__scnprintf_long(char *bf, size_t size, struct syscall_arg *arg);
|
||||
#define SCA_LONG syscall_arg__scnprintf_long
|
||||
|
||||
size_t syscall_arg__scnprintf_pid(char *bf, size_t size, struct syscall_arg *arg);
|
||||
#define SCA_PID syscall_arg__scnprintf_pid
|
||||
|
||||
size_t syscall_arg__scnprintf_fcntl_cmd(char *bf, size_t size, struct syscall_arg *arg);
|
||||
#define SCA_FCNTL_CMD syscall_arg__scnprintf_fcntl_cmd
|
||||
|
||||
size_t syscall_arg__scnprintf_fcntl_arg(char *bf, size_t size, struct syscall_arg *arg);
|
||||
#define SCA_FCNTL_ARG syscall_arg__scnprintf_fcntl_arg
|
||||
|
||||
size_t syscall_arg__scnprintf_open_flags(char *bf, size_t size, struct syscall_arg *arg);
|
||||
#define SCA_OPEN_FLAGS syscall_arg__scnprintf_open_flags
|
||||
|
||||
size_t syscall_arg__scnprintf_statx_flags(char *bf, size_t size, struct syscall_arg *arg);
|
||||
#define SCA_STATX_FLAGS syscall_arg__scnprintf_statx_flags
|
||||
|
||||
size_t syscall_arg__scnprintf_statx_mask(char *bf, size_t size, struct syscall_arg *arg);
|
||||
#define SCA_STATX_MASK syscall_arg__scnprintf_statx_mask
|
||||
|
||||
size_t open__scnprintf_flags(unsigned long flags, char *bf, size_t size);
|
||||
|
||||
void syscall_arg__set_ret_scnprintf(struct syscall_arg *arg,
|
||||
size_t (*ret_scnprintf)(char *bf, size_t size, struct syscall_arg *arg));
|
||||
|
||||
#endif /* _PERF_TRACE_BEAUTY_H */
|
||||
|
100
tools/perf/trace/beauty/fcntl.c
Normal file
100
tools/perf/trace/beauty/fcntl.c
Normal file
@ -0,0 +1,100 @@
|
||||
/*
|
||||
* trace/beauty/fcntl.c
|
||||
*
|
||||
* Copyright (C) 2017, Red Hat Inc, Arnaldo Carvalho de Melo <acme@redhat.com>
|
||||
*
|
||||
* Released under the GPL v2. (and only v2, not any later version)
|
||||
*/
|
||||
|
||||
#include "trace/beauty/beauty.h"
|
||||
#include <linux/kernel.h>
|
||||
#include <uapi/linux/fcntl.h>
|
||||
|
||||
static size_t fcntl__scnprintf_getfd(unsigned long val, char *bf, size_t size)
|
||||
{
|
||||
return scnprintf(bf, size, "%s", val ? "CLOEXEC" : "0");
|
||||
}
|
||||
|
||||
static size_t syscall_arg__scnprintf_fcntl_getfd(char *bf, size_t size, struct syscall_arg *arg)
|
||||
{
|
||||
return fcntl__scnprintf_getfd(arg->val, bf, size);
|
||||
}
|
||||
|
||||
static size_t fcntl__scnprintf_getlease(unsigned long val, char *bf, size_t size)
|
||||
{
|
||||
static const char *fcntl_setlease[] = { "RDLCK", "WRLCK", "UNLCK", };
|
||||
static DEFINE_STRARRAY(fcntl_setlease);
|
||||
|
||||
return strarray__scnprintf(&strarray__fcntl_setlease, bf, size, "%x", val);
|
||||
}
|
||||
|
||||
static size_t syscall_arg__scnprintf_fcntl_getlease(char *bf, size_t size, struct syscall_arg *arg)
|
||||
{
|
||||
return fcntl__scnprintf_getlease(arg->val, bf, size);
|
||||
}
|
||||
|
||||
size_t syscall_arg__scnprintf_fcntl_cmd(char *bf, size_t size, struct syscall_arg *arg)
|
||||
{
|
||||
if (arg->val == F_GETFL) {
|
||||
syscall_arg__set_ret_scnprintf(arg, syscall_arg__scnprintf_open_flags);
|
||||
goto mask_arg;
|
||||
}
|
||||
if (arg->val == F_GETFD) {
|
||||
syscall_arg__set_ret_scnprintf(arg, syscall_arg__scnprintf_fcntl_getfd);
|
||||
goto mask_arg;
|
||||
}
|
||||
if (arg->val == F_DUPFD_CLOEXEC || arg->val == F_DUPFD) {
|
||||
syscall_arg__set_ret_scnprintf(arg, syscall_arg__scnprintf_fd);
|
||||
goto out;
|
||||
}
|
||||
if (arg->val == F_GETOWN) {
|
||||
syscall_arg__set_ret_scnprintf(arg, syscall_arg__scnprintf_pid);
|
||||
goto mask_arg;
|
||||
}
|
||||
if (arg->val == F_GETLEASE) {
|
||||
syscall_arg__set_ret_scnprintf(arg, syscall_arg__scnprintf_fcntl_getlease);
|
||||
goto mask_arg;
|
||||
}
|
||||
/*
|
||||
* Some commands ignore the third fcntl argument, "arg", so mask it
|
||||
*/
|
||||
if (arg->val == F_GET_SEALS ||
|
||||
arg->val == F_GETSIG) {
|
||||
mask_arg:
|
||||
arg->mask |= (1 << 2);
|
||||
}
|
||||
out:
|
||||
return syscall_arg__scnprintf_strarrays(bf, size, arg);
|
||||
}
|
||||
|
||||
size_t syscall_arg__scnprintf_fcntl_arg(char *bf, size_t size, struct syscall_arg *arg)
|
||||
{
|
||||
int cmd = syscall_arg__val(arg, 1);
|
||||
|
||||
if (cmd == F_DUPFD)
|
||||
return syscall_arg__scnprintf_fd(bf, size, arg);
|
||||
|
||||
if (cmd == F_SETFD)
|
||||
return fcntl__scnprintf_getfd(arg->val, bf, size);
|
||||
|
||||
if (cmd == F_SETFL)
|
||||
return open__scnprintf_flags(arg->val, bf, size);
|
||||
|
||||
if (cmd == F_SETOWN)
|
||||
return syscall_arg__scnprintf_pid(bf, size, arg);
|
||||
|
||||
if (cmd == F_SETLEASE)
|
||||
return fcntl__scnprintf_getlease(arg->val, bf, size);
|
||||
/*
|
||||
* We still don't grab the contents of pointers on entry or exit,
|
||||
* so just print them as hex numbers
|
||||
*/
|
||||
if (cmd == F_SETLK || cmd == F_SETLKW || cmd == F_GETLK ||
|
||||
cmd == F_OFD_SETLK || cmd == F_OFD_SETLKW || cmd == F_OFD_GETLK ||
|
||||
cmd == F_GETOWN_EX || cmd == F_SETOWN_EX ||
|
||||
cmd == F_GET_RW_HINT || cmd == F_SET_RW_HINT ||
|
||||
cmd == F_GET_FILE_RW_HINT || cmd == F_SET_FILE_RW_HINT)
|
||||
return syscall_arg__scnprintf_hex(bf, size, arg);
|
||||
|
||||
return syscall_arg__scnprintf_long(bf, size, arg);
|
||||
}
|
@ -14,13 +14,16 @@
|
||||
#define O_NOATIME 01000000
|
||||
#endif
|
||||
|
||||
static size_t syscall_arg__scnprintf_open_flags(char *bf, size_t size,
|
||||
struct syscall_arg *arg)
|
||||
{
|
||||
int printed = 0, flags = arg->val;
|
||||
#ifndef O_TMPFILE
|
||||
#define O_TMPFILE 020000000
|
||||
#endif
|
||||
|
||||
if (!(flags & O_CREAT))
|
||||
arg->mask |= 1 << (arg->idx + 1); /* Mask the mode parm */
|
||||
#undef O_LARGEFILE
|
||||
#define O_LARGEFILE 00100000
|
||||
|
||||
size_t open__scnprintf_flags(unsigned long flags, char *bf, size_t size)
|
||||
{
|
||||
int printed = 0;
|
||||
|
||||
if (flags == 0)
|
||||
return scnprintf(bf, size, "RDONLY");
|
||||
@ -30,6 +33,7 @@ static size_t syscall_arg__scnprintf_open_flags(char *bf, size_t size,
|
||||
flags &= ~O_##n; \
|
||||
}
|
||||
|
||||
P_FLAG(RDWR);
|
||||
P_FLAG(APPEND);
|
||||
P_FLAG(ASYNC);
|
||||
P_FLAG(CLOEXEC);
|
||||
@ -38,6 +42,8 @@ static size_t syscall_arg__scnprintf_open_flags(char *bf, size_t size,
|
||||
P_FLAG(DIRECTORY);
|
||||
P_FLAG(EXCL);
|
||||
P_FLAG(LARGEFILE);
|
||||
P_FLAG(NOFOLLOW);
|
||||
P_FLAG(TMPFILE);
|
||||
P_FLAG(NOATIME);
|
||||
P_FLAG(NOCTTY);
|
||||
#ifdef O_NONBLOCK
|
||||
@ -48,7 +54,6 @@ static size_t syscall_arg__scnprintf_open_flags(char *bf, size_t size,
|
||||
#ifdef O_PATH
|
||||
P_FLAG(PATH);
|
||||
#endif
|
||||
P_FLAG(RDWR);
|
||||
#ifdef O_DSYNC
|
||||
if ((flags & O_SYNC) == O_SYNC)
|
||||
printed += scnprintf(bf + printed, size - printed, "%s%s", printed ? "|" : "", "SYNC");
|
||||
@ -68,4 +73,12 @@ static size_t syscall_arg__scnprintf_open_flags(char *bf, size_t size,
|
||||
return printed;
|
||||
}
|
||||
|
||||
#define SCA_OPEN_FLAGS syscall_arg__scnprintf_open_flags
|
||||
size_t syscall_arg__scnprintf_open_flags(char *bf, size_t size, struct syscall_arg *arg)
|
||||
{
|
||||
int flags = arg->val;
|
||||
|
||||
if (!(flags & O_CREAT))
|
||||
arg->mask |= 1 << (arg->idx + 1); /* Mask the mode parm */
|
||||
|
||||
return open__scnprintf_flags(flags, bf, size);
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
static size_t syscall_arg__scnprintf_pid(char *bf, size_t size, struct syscall_arg *arg)
|
||||
size_t syscall_arg__scnprintf_pid(char *bf, size_t size, struct syscall_arg *arg)
|
||||
{
|
||||
int pid = arg->val;
|
||||
struct trace *trace = arg->trace;
|
||||
@ -17,5 +17,3 @@ static size_t syscall_arg__scnprintf_pid(char *bf, size_t size, struct syscall_a
|
||||
|
||||
return printed;
|
||||
}
|
||||
|
||||
#define SCA_PID syscall_arg__scnprintf_pid
|
||||
|
@ -738,6 +738,35 @@ void __ui_browser__line_arrow(struct ui_browser *browser, unsigned int column,
|
||||
__ui_browser__line_arrow_down(browser, column, start, end);
|
||||
}
|
||||
|
||||
void ui_browser__mark_fused(struct ui_browser *browser, unsigned int column,
|
||||
unsigned int row, bool arrow_down)
|
||||
{
|
||||
unsigned int end_row;
|
||||
|
||||
if (row >= browser->top_idx)
|
||||
end_row = row - browser->top_idx;
|
||||
else
|
||||
return;
|
||||
|
||||
SLsmg_set_char_set(1);
|
||||
|
||||
if (arrow_down) {
|
||||
ui_browser__gotorc(browser, end_row, column - 1);
|
||||
SLsmg_write_char(SLSMG_ULCORN_CHAR);
|
||||
ui_browser__gotorc(browser, end_row, column);
|
||||
SLsmg_draw_hline(2);
|
||||
ui_browser__gotorc(browser, end_row + 1, column - 1);
|
||||
SLsmg_write_char(SLSMG_LTEE_CHAR);
|
||||
} else {
|
||||
ui_browser__gotorc(browser, end_row, column - 1);
|
||||
SLsmg_write_char(SLSMG_LTEE_CHAR);
|
||||
ui_browser__gotorc(browser, end_row, column);
|
||||
SLsmg_draw_hline(2);
|
||||
}
|
||||
|
||||
SLsmg_set_char_set(0);
|
||||
}
|
||||
|
||||
void ui_browser__init(void)
|
||||
{
|
||||
int i = 0;
|
||||
|
@ -43,6 +43,8 @@ void ui_browser__printf(struct ui_browser *browser, const char *fmt, ...);
|
||||
void ui_browser__write_graph(struct ui_browser *browser, int graph);
|
||||
void __ui_browser__line_arrow(struct ui_browser *browser, unsigned int column,
|
||||
u64 start, u64 end);
|
||||
void ui_browser__mark_fused(struct ui_browser *browser, unsigned int column,
|
||||
unsigned int row, bool arrow_down);
|
||||
void __ui_browser__show_title(struct ui_browser *browser, const char *title);
|
||||
void ui_browser__show_title(struct ui_browser *browser, const char *title);
|
||||
int ui_browser__show(struct ui_browser *browser, const char *title,
|
||||
|
@ -9,6 +9,7 @@
|
||||
#include "../../util/symbol.h"
|
||||
#include "../../util/evsel.h"
|
||||
#include "../../util/config.h"
|
||||
#include "../../util/evlist.h"
|
||||
#include <inttypes.h>
|
||||
#include <pthread.h>
|
||||
#include <linux/kernel.h>
|
||||
@ -272,6 +273,25 @@ static bool disasm_line__is_valid_jump(struct disasm_line *dl, struct symbol *sy
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool is_fused(struct annotate_browser *ab, struct disasm_line *cursor)
|
||||
{
|
||||
struct disasm_line *pos = list_prev_entry(cursor, node);
|
||||
const char *name;
|
||||
|
||||
if (!pos)
|
||||
return false;
|
||||
|
||||
if (ins__is_lock(&pos->ins))
|
||||
name = pos->ops.locked.ins.name;
|
||||
else
|
||||
name = pos->ins.name;
|
||||
|
||||
if (!name || !cursor->ins.name)
|
||||
return false;
|
||||
|
||||
return ins__is_fused(ab->arch, name, cursor->ins.name);
|
||||
}
|
||||
|
||||
static void annotate_browser__draw_current_jump(struct ui_browser *browser)
|
||||
{
|
||||
struct annotate_browser *ab = container_of(browser, struct annotate_browser, b);
|
||||
@ -307,6 +327,13 @@ static void annotate_browser__draw_current_jump(struct ui_browser *browser)
|
||||
ui_browser__set_color(browser, HE_COLORSET_JUMP_ARROWS);
|
||||
__ui_browser__line_arrow(browser, pcnt_width + 2 + ab->addr_width,
|
||||
from, to);
|
||||
|
||||
if (is_fused(ab, cursor)) {
|
||||
ui_browser__mark_fused(browser,
|
||||
pcnt_width + 3 + ab->addr_width,
|
||||
from - 1,
|
||||
to > from ? true : false);
|
||||
}
|
||||
}
|
||||
|
||||
static unsigned int annotate_browser__refresh(struct ui_browser *browser)
|
||||
@ -1074,7 +1101,8 @@ int symbol__tui_annotate(struct symbol *sym, struct map *map,
|
||||
}
|
||||
|
||||
err = symbol__disassemble(sym, map, perf_evsel__env_arch(evsel),
|
||||
sizeof_bdl, &browser.arch);
|
||||
sizeof_bdl, &browser.arch,
|
||||
perf_evsel__env_cpuid(evsel));
|
||||
if (err) {
|
||||
char msg[BUFSIZ];
|
||||
symbol__strerror_disassemble(sym, map, err, msg, sizeof(msg));
|
||||
|
@ -166,9 +166,6 @@ static struct inline_node *inline_node__create(struct map *map, u64 ip)
|
||||
if (dso == NULL)
|
||||
return NULL;
|
||||
|
||||
if (dso->kernel != DSO_TYPE_USER)
|
||||
return NULL;
|
||||
|
||||
node = dso__parse_addr_inlines(dso,
|
||||
map__rip_2objdump(map, ip));
|
||||
|
||||
|
@ -169,7 +169,7 @@ static int symbol__gtk_annotate(struct symbol *sym, struct map *map,
|
||||
return -1;
|
||||
|
||||
err = symbol__disassemble(sym, map, perf_evsel__env_arch(evsel),
|
||||
0, NULL);
|
||||
0, NULL, NULL);
|
||||
if (err) {
|
||||
char msg[BUFSIZ];
|
||||
symbol__strerror_disassemble(sym, map, err, msg, sizeof(msg));
|
||||
|
@ -35,9 +35,6 @@ static size_t inline__fprintf(struct map *map, u64 ip, int left_margin,
|
||||
if (dso == NULL)
|
||||
return 0;
|
||||
|
||||
if (dso->kernel != DSO_TYPE_USER)
|
||||
return 0;
|
||||
|
||||
node = dso__parse_addr_inlines(dso,
|
||||
map__rip_2objdump(map, ip));
|
||||
if (node == NULL)
|
||||
|
@ -93,6 +93,7 @@ libperf-y += drv_configs.o
|
||||
libperf-y += units.o
|
||||
libperf-y += time-utils.o
|
||||
libperf-y += expr-bison.o
|
||||
libperf-y += branch.o
|
||||
|
||||
libperf-$(CONFIG_LIBBPF) += bpf-loader.o
|
||||
libperf-$(CONFIG_BPF_PROLOGUE) += bpf-prologue.o
|
||||
@ -104,6 +105,10 @@ ifndef CONFIG_LIBELF
|
||||
libperf-y += symbol-minimal.o
|
||||
endif
|
||||
|
||||
ifndef CONFIG_SETNS
|
||||
libperf-y += setns.o
|
||||
endif
|
||||
|
||||
libperf-$(CONFIG_DWARF) += probe-finder.o
|
||||
libperf-$(CONFIG_DWARF) += dwarf-aux.o
|
||||
libperf-$(CONFIG_DWARF) += dwarf-regs.o
|
||||
|
@ -47,7 +47,12 @@ struct arch {
|
||||
bool sorted_instructions;
|
||||
bool initialized;
|
||||
void *priv;
|
||||
unsigned int model;
|
||||
unsigned int family;
|
||||
int (*init)(struct arch *arch);
|
||||
bool (*ins_is_fused)(struct arch *arch, const char *ins1,
|
||||
const char *ins2);
|
||||
int (*cpuid_parse)(struct arch *arch, char *cpuid);
|
||||
struct {
|
||||
char comment_char;
|
||||
char skip_functions_char;
|
||||
@ -129,6 +134,8 @@ static struct arch architectures[] = {
|
||||
.name = "x86",
|
||||
.instructions = x86__instructions,
|
||||
.nr_instructions = ARRAY_SIZE(x86__instructions),
|
||||
.ins_is_fused = x86__ins_is_fused,
|
||||
.cpuid_parse = x86__cpuid_parse,
|
||||
.objdump = {
|
||||
.comment_char = '#',
|
||||
},
|
||||
@ -171,6 +178,14 @@ int ins__scnprintf(struct ins *ins, char *bf, size_t size,
|
||||
return ins__raw_scnprintf(ins, bf, size, ops);
|
||||
}
|
||||
|
||||
bool ins__is_fused(struct arch *arch, const char *ins1, const char *ins2)
|
||||
{
|
||||
if (!arch || !arch->ins_is_fused)
|
||||
return false;
|
||||
|
||||
return arch->ins_is_fused(arch, ins1, ins2);
|
||||
}
|
||||
|
||||
static int call__parse(struct arch *arch, struct ins_operands *ops, struct map *map)
|
||||
{
|
||||
char *endptr, *tok, *name;
|
||||
@ -502,6 +517,11 @@ bool ins__is_ret(const struct ins *ins)
|
||||
return ins->ops == &ret_ops;
|
||||
}
|
||||
|
||||
bool ins__is_lock(const struct ins *ins)
|
||||
{
|
||||
return ins->ops == &lock_ops;
|
||||
}
|
||||
|
||||
static int ins__key_cmp(const void *name, const void *insp)
|
||||
{
|
||||
const struct ins *ins = insp;
|
||||
@ -1327,7 +1347,7 @@ static int dso__disassemble_filename(struct dso *dso, char *filename, size_t fil
|
||||
!dso__is_kcore(dso))
|
||||
return SYMBOL_ANNOTATE_ERRNO__NO_VMLINUX;
|
||||
|
||||
build_id_filename = dso__build_id_filename(dso, NULL, 0);
|
||||
build_id_filename = dso__build_id_filename(dso, NULL, 0, false);
|
||||
if (build_id_filename) {
|
||||
__symbol__join_symfs(filename, filename_size, build_id_filename);
|
||||
free(build_id_filename);
|
||||
@ -1381,7 +1401,7 @@ static const char *annotate__norm_arch(const char *arch_name)
|
||||
|
||||
int symbol__disassemble(struct symbol *sym, struct map *map,
|
||||
const char *arch_name, size_t privsize,
|
||||
struct arch **parch)
|
||||
struct arch **parch, char *cpuid)
|
||||
{
|
||||
struct dso *dso = map->dso;
|
||||
char command[PATH_MAX * 2];
|
||||
@ -1418,6 +1438,9 @@ int symbol__disassemble(struct symbol *sym, struct map *map,
|
||||
}
|
||||
}
|
||||
|
||||
if (arch->cpuid_parse && cpuid)
|
||||
arch->cpuid_parse(arch, cpuid);
|
||||
|
||||
pr_debug("%s: filename=%s, sym=%s, start=%#" PRIx64 ", end=%#" PRIx64 "\n", __func__,
|
||||
symfs_filename, sym->name, map->unmap_ip(map, sym->start),
|
||||
map->unmap_ip(map, sym->end));
|
||||
@ -1907,7 +1930,7 @@ int symbol__tty_annotate(struct symbol *sym, struct map *map,
|
||||
u64 len;
|
||||
|
||||
if (symbol__disassemble(sym, map, perf_evsel__env_arch(evsel),
|
||||
0, NULL) < 0)
|
||||
0, NULL, NULL) < 0)
|
||||
return -1;
|
||||
|
||||
len = symbol__size(sym);
|
||||
|
@ -52,7 +52,9 @@ struct ins_ops {
|
||||
bool ins__is_jump(const struct ins *ins);
|
||||
bool ins__is_call(const struct ins *ins);
|
||||
bool ins__is_ret(const struct ins *ins);
|
||||
bool ins__is_lock(const struct ins *ins);
|
||||
int ins__scnprintf(struct ins *ins, char *bf, size_t size, struct ins_operands *ops);
|
||||
bool ins__is_fused(struct arch *arch, const char *ins1, const char *ins2);
|
||||
|
||||
struct annotation;
|
||||
|
||||
@ -160,7 +162,7 @@ void symbol__annotate_zero_histograms(struct symbol *sym);
|
||||
|
||||
int symbol__disassemble(struct symbol *sym, struct map *map,
|
||||
const char *arch_name, size_t privsize,
|
||||
struct arch **parch);
|
||||
struct arch **parch, char *cpuid);
|
||||
|
||||
enum symbol_disassemble_errno {
|
||||
SYMBOL_ANNOTATE_ERRNO__SUCCESS = 0,
|
||||
|
147
tools/perf/util/branch.c
Normal file
147
tools/perf/util/branch.c
Normal file
@ -0,0 +1,147 @@
|
||||
#include "perf.h"
|
||||
#include "util/util.h"
|
||||
#include "util/debug.h"
|
||||
#include "util/branch.h"
|
||||
|
||||
static bool cross_area(u64 addr1, u64 addr2, int size)
|
||||
{
|
||||
u64 align1, align2;
|
||||
|
||||
align1 = addr1 & ~(size - 1);
|
||||
align2 = addr2 & ~(size - 1);
|
||||
|
||||
return (align1 != align2) ? true : false;
|
||||
}
|
||||
|
||||
#define AREA_4K 4096
|
||||
#define AREA_2M (2 * 1024 * 1024)
|
||||
|
||||
void branch_type_count(struct branch_type_stat *st, struct branch_flags *flags,
|
||||
u64 from, u64 to)
|
||||
{
|
||||
if (flags->type == PERF_BR_UNKNOWN || from == 0)
|
||||
return;
|
||||
|
||||
st->counts[flags->type]++;
|
||||
|
||||
if (flags->type == PERF_BR_COND) {
|
||||
if (to > from)
|
||||
st->cond_fwd++;
|
||||
else
|
||||
st->cond_bwd++;
|
||||
}
|
||||
|
||||
if (cross_area(from, to, AREA_2M))
|
||||
st->cross_2m++;
|
||||
else if (cross_area(from, to, AREA_4K))
|
||||
st->cross_4k++;
|
||||
}
|
||||
|
||||
const char *branch_type_name(int type)
|
||||
{
|
||||
const char *branch_names[PERF_BR_MAX] = {
|
||||
"N/A",
|
||||
"COND",
|
||||
"UNCOND",
|
||||
"IND",
|
||||
"CALL",
|
||||
"IND_CALL",
|
||||
"RET",
|
||||
"SYSCALL",
|
||||
"SYSRET",
|
||||
"COND_CALL",
|
||||
"COND_RET"
|
||||
};
|
||||
|
||||
if (type >= 0 && type < PERF_BR_MAX)
|
||||
return branch_names[type];
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
void branch_type_stat_display(FILE *fp, struct branch_type_stat *st)
|
||||
{
|
||||
u64 total = 0;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < PERF_BR_MAX; i++)
|
||||
total += st->counts[i];
|
||||
|
||||
if (total == 0)
|
||||
return;
|
||||
|
||||
fprintf(fp, "\n#");
|
||||
fprintf(fp, "\n# Branch Statistics:");
|
||||
fprintf(fp, "\n#");
|
||||
|
||||
if (st->cond_fwd > 0) {
|
||||
fprintf(fp, "\n%8s: %5.1f%%",
|
||||
"COND_FWD",
|
||||
100.0 * (double)st->cond_fwd / (double)total);
|
||||
}
|
||||
|
||||
if (st->cond_bwd > 0) {
|
||||
fprintf(fp, "\n%8s: %5.1f%%",
|
||||
"COND_BWD",
|
||||
100.0 * (double)st->cond_bwd / (double)total);
|
||||
}
|
||||
|
||||
if (st->cross_4k > 0) {
|
||||
fprintf(fp, "\n%8s: %5.1f%%",
|
||||
"CROSS_4K",
|
||||
100.0 * (double)st->cross_4k / (double)total);
|
||||
}
|
||||
|
||||
if (st->cross_2m > 0) {
|
||||
fprintf(fp, "\n%8s: %5.1f%%",
|
||||
"CROSS_2M",
|
||||
100.0 * (double)st->cross_2m / (double)total);
|
||||
}
|
||||
|
||||
for (i = 0; i < PERF_BR_MAX; i++) {
|
||||
if (st->counts[i] > 0)
|
||||
fprintf(fp, "\n%8s: %5.1f%%",
|
||||
branch_type_name(i),
|
||||
100.0 *
|
||||
(double)st->counts[i] / (double)total);
|
||||
}
|
||||
}
|
||||
|
||||
static int count_str_scnprintf(int idx, const char *str, char *bf, int size)
|
||||
{
|
||||
return scnprintf(bf, size, "%s%s", (idx) ? " " : " (", str);
|
||||
}
|
||||
|
||||
int branch_type_str(struct branch_type_stat *st, char *bf, int size)
|
||||
{
|
||||
int i, j = 0, printed = 0;
|
||||
u64 total = 0;
|
||||
|
||||
for (i = 0; i < PERF_BR_MAX; i++)
|
||||
total += st->counts[i];
|
||||
|
||||
if (total == 0)
|
||||
return 0;
|
||||
|
||||
if (st->cond_fwd > 0)
|
||||
printed += count_str_scnprintf(j++, "COND_FWD", bf + printed, size - printed);
|
||||
|
||||
if (st->cond_bwd > 0)
|
||||
printed += count_str_scnprintf(j++, "COND_BWD", bf + printed, size - printed);
|
||||
|
||||
for (i = 0; i < PERF_BR_MAX; i++) {
|
||||
if (i == PERF_BR_COND)
|
||||
continue;
|
||||
|
||||
if (st->counts[i] > 0)
|
||||
printed += count_str_scnprintf(j++, branch_type_name(i), bf + printed, size - printed);
|
||||
}
|
||||
|
||||
if (st->cross_4k > 0)
|
||||
printed += count_str_scnprintf(j++, "CROSS_4K", bf + printed, size - printed);
|
||||
|
||||
if (st->cross_2m > 0)
|
||||
printed += count_str_scnprintf(j++, "CROSS_2M", bf + printed, size - printed);
|
||||
|
||||
return printed;
|
||||
}
|
24
tools/perf/util/branch.h
Normal file
24
tools/perf/util/branch.h
Normal file
@ -0,0 +1,24 @@
|
||||
#ifndef _PERF_BRANCH_H
|
||||
#define _PERF_BRANCH_H 1
|
||||
|
||||
#include <stdint.h>
|
||||
#include "../perf.h"
|
||||
|
||||
struct branch_type_stat {
|
||||
u64 counts[PERF_BR_MAX];
|
||||
u64 cond_fwd;
|
||||
u64 cond_bwd;
|
||||
u64 cross_4k;
|
||||
u64 cross_2m;
|
||||
};
|
||||
|
||||
struct branch_flags;
|
||||
|
||||
void branch_type_count(struct branch_type_stat *st, struct branch_flags *flags,
|
||||
u64 from, u64 to);
|
||||
|
||||
const char *branch_type_name(int type);
|
||||
void branch_type_stat_display(FILE *fp, struct branch_type_stat *st);
|
||||
int branch_type_str(struct branch_type_stat *st, char *bf, int bfsize);
|
||||
|
||||
#endif /* _PERF_BRANCH_H */
|
@ -243,12 +243,15 @@ static bool build_id_cache__valid_id(char *sbuild_id)
|
||||
return result;
|
||||
}
|
||||
|
||||
static const char *build_id_cache__basename(bool is_kallsyms, bool is_vdso)
|
||||
static const char *build_id_cache__basename(bool is_kallsyms, bool is_vdso,
|
||||
bool is_debug)
|
||||
{
|
||||
return is_kallsyms ? "kallsyms" : (is_vdso ? "vdso" : "elf");
|
||||
return is_kallsyms ? "kallsyms" : (is_vdso ? "vdso" : (is_debug ?
|
||||
"debug" : "elf"));
|
||||
}
|
||||
|
||||
char *dso__build_id_filename(const struct dso *dso, char *bf, size_t size)
|
||||
char *dso__build_id_filename(const struct dso *dso, char *bf, size_t size,
|
||||
bool is_debug)
|
||||
{
|
||||
bool is_kallsyms = dso__is_kallsyms((struct dso *)dso);
|
||||
bool is_vdso = dso__is_vdso((struct dso *)dso);
|
||||
@ -270,7 +273,8 @@ char *dso__build_id_filename(const struct dso *dso, char *bf, size_t size)
|
||||
ret = asnprintf(&bf, size, "%s", linkname);
|
||||
else
|
||||
ret = asnprintf(&bf, size, "%s/%s", linkname,
|
||||
build_id_cache__basename(is_kallsyms, is_vdso));
|
||||
build_id_cache__basename(is_kallsyms, is_vdso,
|
||||
is_debug));
|
||||
if (ret < 0 || (!alloc && size < (unsigned int)ret))
|
||||
bf = NULL;
|
||||
free(linkname);
|
||||
@ -285,7 +289,7 @@ char *dso__build_id_filename(const struct dso *dso, char *bf, size_t size)
|
||||
else
|
||||
|
||||
static int write_buildid(const char *name, size_t name_len, u8 *build_id,
|
||||
pid_t pid, u16 misc, int fd)
|
||||
pid_t pid, u16 misc, struct feat_fd *fd)
|
||||
{
|
||||
int err;
|
||||
struct build_id_event b;
|
||||
@ -300,14 +304,15 @@ static int write_buildid(const char *name, size_t name_len, u8 *build_id,
|
||||
b.header.misc = misc;
|
||||
b.header.size = sizeof(b) + len;
|
||||
|
||||
err = writen(fd, &b, sizeof(b));
|
||||
err = do_write(fd, &b, sizeof(b));
|
||||
if (err < 0)
|
||||
return err;
|
||||
|
||||
return write_padded(fd, name, name_len + 1, len);
|
||||
}
|
||||
|
||||
static int machine__write_buildid_table(struct machine *machine, int fd)
|
||||
static int machine__write_buildid_table(struct machine *machine,
|
||||
struct feat_fd *fd)
|
||||
{
|
||||
int err = 0;
|
||||
char nm[PATH_MAX];
|
||||
@ -352,7 +357,8 @@ static int machine__write_buildid_table(struct machine *machine, int fd)
|
||||
return err;
|
||||
}
|
||||
|
||||
int perf_session__write_buildid_table(struct perf_session *session, int fd)
|
||||
int perf_session__write_buildid_table(struct perf_session *session,
|
||||
struct feat_fd *fd)
|
||||
{
|
||||
struct rb_node *nd;
|
||||
int err = machine__write_buildid_table(&session->machines.host, fd);
|
||||
@ -534,13 +540,14 @@ char *build_id_cache__complement(const char *incomplete_sbuild_id)
|
||||
}
|
||||
|
||||
char *build_id_cache__cachedir(const char *sbuild_id, const char *name,
|
||||
bool is_kallsyms, bool is_vdso)
|
||||
struct nsinfo *nsi, bool is_kallsyms,
|
||||
bool is_vdso)
|
||||
{
|
||||
char *realname = (char *)name, *filename;
|
||||
bool slash = is_kallsyms || is_vdso;
|
||||
|
||||
if (!slash) {
|
||||
realname = realpath(name, NULL);
|
||||
realname = nsinfo__realpath(name, nsi);
|
||||
if (!realname)
|
||||
return NULL;
|
||||
}
|
||||
@ -556,13 +563,13 @@ char *build_id_cache__cachedir(const char *sbuild_id, const char *name,
|
||||
return filename;
|
||||
}
|
||||
|
||||
int build_id_cache__list_build_ids(const char *pathname,
|
||||
int build_id_cache__list_build_ids(const char *pathname, struct nsinfo *nsi,
|
||||
struct strlist **result)
|
||||
{
|
||||
char *dir_name;
|
||||
int ret = 0;
|
||||
|
||||
dir_name = build_id_cache__cachedir(NULL, pathname, false, false);
|
||||
dir_name = build_id_cache__cachedir(NULL, pathname, nsi, false, false);
|
||||
if (!dir_name)
|
||||
return -ENOMEM;
|
||||
|
||||
@ -576,16 +583,20 @@ int build_id_cache__list_build_ids(const char *pathname,
|
||||
|
||||
#if defined(HAVE_LIBELF_SUPPORT) && defined(HAVE_GELF_GETNOTE_SUPPORT)
|
||||
static int build_id_cache__add_sdt_cache(const char *sbuild_id,
|
||||
const char *realname)
|
||||
const char *realname,
|
||||
struct nsinfo *nsi)
|
||||
{
|
||||
struct probe_cache *cache;
|
||||
int ret;
|
||||
struct nscookie nsc;
|
||||
|
||||
cache = probe_cache__new(sbuild_id);
|
||||
cache = probe_cache__new(sbuild_id, nsi);
|
||||
if (!cache)
|
||||
return -1;
|
||||
|
||||
nsinfo__mountns_enter(nsi, &nsc);
|
||||
ret = probe_cache__scan_sdt(cache, realname);
|
||||
nsinfo__mountns_exit(&nsc);
|
||||
if (ret >= 0) {
|
||||
pr_debug4("Found %d SDTs in %s\n", ret, realname);
|
||||
if (probe_cache__commit(cache) < 0)
|
||||
@ -595,25 +606,56 @@ static int build_id_cache__add_sdt_cache(const char *sbuild_id,
|
||||
return ret;
|
||||
}
|
||||
#else
|
||||
#define build_id_cache__add_sdt_cache(sbuild_id, realname) (0)
|
||||
#define build_id_cache__add_sdt_cache(sbuild_id, realname, nsi) (0)
|
||||
#endif
|
||||
|
||||
static char *build_id_cache__find_debug(const char *sbuild_id,
|
||||
struct nsinfo *nsi)
|
||||
{
|
||||
char *realname = NULL;
|
||||
char *debugfile;
|
||||
struct nscookie nsc;
|
||||
size_t len = 0;
|
||||
|
||||
debugfile = calloc(1, PATH_MAX);
|
||||
if (!debugfile)
|
||||
goto out;
|
||||
|
||||
len = __symbol__join_symfs(debugfile, PATH_MAX,
|
||||
"/usr/lib/debug/.build-id/");
|
||||
snprintf(debugfile + len, PATH_MAX - len, "%.2s/%s.debug", sbuild_id,
|
||||
sbuild_id + 2);
|
||||
|
||||
nsinfo__mountns_enter(nsi, &nsc);
|
||||
realname = realpath(debugfile, NULL);
|
||||
if (realname && access(realname, R_OK))
|
||||
zfree(&realname);
|
||||
nsinfo__mountns_exit(&nsc);
|
||||
out:
|
||||
free(debugfile);
|
||||
return realname;
|
||||
}
|
||||
|
||||
int build_id_cache__add_s(const char *sbuild_id, const char *name,
|
||||
bool is_kallsyms, bool is_vdso)
|
||||
struct nsinfo *nsi, bool is_kallsyms, bool is_vdso)
|
||||
{
|
||||
const size_t size = PATH_MAX;
|
||||
char *realname = NULL, *filename = NULL, *dir_name = NULL,
|
||||
*linkname = zalloc(size), *tmp;
|
||||
char *debugfile = NULL;
|
||||
int err = -1;
|
||||
|
||||
if (!is_kallsyms) {
|
||||
realname = realpath(name, NULL);
|
||||
if (!is_vdso)
|
||||
realname = nsinfo__realpath(name, nsi);
|
||||
else
|
||||
realname = realpath(name, NULL);
|
||||
if (!realname)
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
dir_name = build_id_cache__cachedir(sbuild_id, name,
|
||||
is_kallsyms, is_vdso);
|
||||
dir_name = build_id_cache__cachedir(sbuild_id, name, nsi, is_kallsyms,
|
||||
is_vdso);
|
||||
if (!dir_name)
|
||||
goto out_free;
|
||||
|
||||
@ -627,20 +669,52 @@ int build_id_cache__add_s(const char *sbuild_id, const char *name,
|
||||
|
||||
/* Save the allocated buildid dirname */
|
||||
if (asprintf(&filename, "%s/%s", dir_name,
|
||||
build_id_cache__basename(is_kallsyms, is_vdso)) < 0) {
|
||||
build_id_cache__basename(is_kallsyms, is_vdso,
|
||||
false)) < 0) {
|
||||
filename = NULL;
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
if (access(filename, F_OK)) {
|
||||
if (is_kallsyms) {
|
||||
if (copyfile("/proc/kallsyms", filename))
|
||||
if (copyfile("/proc/kallsyms", filename))
|
||||
goto out_free;
|
||||
} else if (nsi && nsi->need_setns) {
|
||||
if (copyfile_ns(name, filename, nsi))
|
||||
goto out_free;
|
||||
} else if (link(realname, filename) && errno != EEXIST &&
|
||||
copyfile(name, filename))
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
/* Some binaries are stripped, but have .debug files with their symbol
|
||||
* table. Check to see if we can locate one of those, since the elf
|
||||
* file itself may not be very useful to users of our tools without a
|
||||
* symtab.
|
||||
*/
|
||||
if (!is_kallsyms && !is_vdso &&
|
||||
strncmp(".ko", name + strlen(name) - 3, 3)) {
|
||||
debugfile = build_id_cache__find_debug(sbuild_id, nsi);
|
||||
if (debugfile) {
|
||||
zfree(&filename);
|
||||
if (asprintf(&filename, "%s/%s", dir_name,
|
||||
build_id_cache__basename(false, false, true)) < 0) {
|
||||
filename = NULL;
|
||||
goto out_free;
|
||||
}
|
||||
if (access(filename, F_OK)) {
|
||||
if (nsi && nsi->need_setns) {
|
||||
if (copyfile_ns(debugfile, filename,
|
||||
nsi))
|
||||
goto out_free;
|
||||
} else if (link(debugfile, filename) &&
|
||||
errno != EEXIST &&
|
||||
copyfile(debugfile, filename))
|
||||
goto out_free;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!build_id_cache__linkname(sbuild_id, linkname, size))
|
||||
goto out_free;
|
||||
tmp = strrchr(linkname, '/');
|
||||
@ -657,27 +731,30 @@ int build_id_cache__add_s(const char *sbuild_id, const char *name,
|
||||
err = 0;
|
||||
|
||||
/* Update SDT cache : error is just warned */
|
||||
if (realname && build_id_cache__add_sdt_cache(sbuild_id, realname) < 0)
|
||||
if (realname &&
|
||||
build_id_cache__add_sdt_cache(sbuild_id, realname, nsi) < 0)
|
||||
pr_debug4("Failed to update/scan SDT cache for %s\n", realname);
|
||||
|
||||
out_free:
|
||||
if (!is_kallsyms)
|
||||
free(realname);
|
||||
free(filename);
|
||||
free(debugfile);
|
||||
free(dir_name);
|
||||
free(linkname);
|
||||
return err;
|
||||
}
|
||||
|
||||
static int build_id_cache__add_b(const u8 *build_id, size_t build_id_size,
|
||||
const char *name, bool is_kallsyms,
|
||||
bool is_vdso)
|
||||
const char *name, struct nsinfo *nsi,
|
||||
bool is_kallsyms, bool is_vdso)
|
||||
{
|
||||
char sbuild_id[SBUILD_ID_SIZE];
|
||||
|
||||
build_id__sprintf(build_id, build_id_size, sbuild_id);
|
||||
|
||||
return build_id_cache__add_s(sbuild_id, name, is_kallsyms, is_vdso);
|
||||
return build_id_cache__add_s(sbuild_id, name, nsi, is_kallsyms,
|
||||
is_vdso);
|
||||
}
|
||||
|
||||
bool build_id_cache__cached(const char *sbuild_id)
|
||||
@ -743,7 +820,7 @@ static int dso__cache_build_id(struct dso *dso, struct machine *machine)
|
||||
name = nm;
|
||||
}
|
||||
return build_id_cache__add_b(dso->build_id, sizeof(dso->build_id), name,
|
||||
is_kallsyms, is_vdso);
|
||||
dso->nsinfo, is_kallsyms, is_vdso);
|
||||
}
|
||||
|
||||
static int __dsos__cache_build_ids(struct list_head *head,
|
||||
|
@ -5,10 +5,12 @@
|
||||
#define SBUILD_ID_SIZE (BUILD_ID_SIZE * 2 + 1)
|
||||
|
||||
#include "tool.h"
|
||||
#include "namespaces.h"
|
||||
#include <linux/types.h>
|
||||
|
||||
extern struct perf_tool build_id__mark_dso_hit_ops;
|
||||
struct dso;
|
||||
struct feat_fd;
|
||||
|
||||
int build_id__sprintf(const u8 *build_id, int len, char *bf);
|
||||
int sysfs__sprintf_build_id(const char *root_dir, char *sbuild_id);
|
||||
@ -16,7 +18,8 @@ int filename__sprintf_build_id(const char *pathname, char *sbuild_id);
|
||||
char *build_id_cache__kallsyms_path(const char *sbuild_id, char *bf,
|
||||
size_t size);
|
||||
|
||||
char *dso__build_id_filename(const struct dso *dso, char *bf, size_t size);
|
||||
char *dso__build_id_filename(const struct dso *dso, char *bf, size_t size,
|
||||
bool is_debug);
|
||||
|
||||
int build_id__mark_dso_hit(struct perf_tool *tool, union perf_event *event,
|
||||
struct perf_sample *sample, struct perf_evsel *evsel,
|
||||
@ -25,23 +28,26 @@ int build_id__mark_dso_hit(struct perf_tool *tool, union perf_event *event,
|
||||
int dsos__hit_all(struct perf_session *session);
|
||||
|
||||
bool perf_session__read_build_ids(struct perf_session *session, bool with_hits);
|
||||
int perf_session__write_buildid_table(struct perf_session *session, int fd);
|
||||
int perf_session__write_buildid_table(struct perf_session *session,
|
||||
struct feat_fd *fd);
|
||||
int perf_session__cache_build_ids(struct perf_session *session);
|
||||
|
||||
char *build_id_cache__origname(const char *sbuild_id);
|
||||
char *build_id_cache__linkname(const char *sbuild_id, char *bf, size_t size);
|
||||
char *build_id_cache__cachedir(const char *sbuild_id, const char *name,
|
||||
bool is_kallsyms, bool is_vdso);
|
||||
struct nsinfo *nsi, bool is_kallsyms,
|
||||
bool is_vdso);
|
||||
|
||||
struct strlist;
|
||||
|
||||
struct strlist *build_id_cache__list_all(bool validonly);
|
||||
char *build_id_cache__complement(const char *incomplete_sbuild_id);
|
||||
int build_id_cache__list_build_ids(const char *pathname,
|
||||
int build_id_cache__list_build_ids(const char *pathname, struct nsinfo *nsi,
|
||||
struct strlist **result);
|
||||
bool build_id_cache__cached(const char *sbuild_id);
|
||||
int build_id_cache__add_s(const char *sbuild_id,
|
||||
const char *name, bool is_kallsyms, bool is_vdso);
|
||||
const char *name, struct nsinfo *nsi,
|
||||
bool is_kallsyms, bool is_vdso);
|
||||
int build_id_cache__remove_s(const char *sbuild_id);
|
||||
|
||||
extern char buildid_dir[];
|
||||
|
@ -23,6 +23,7 @@
|
||||
#include "sort.h"
|
||||
#include "machine.h"
|
||||
#include "callchain.h"
|
||||
#include "branch.h"
|
||||
|
||||
#define CALLCHAIN_PARAM_DEFAULT \
|
||||
.mode = CHAIN_GRAPH_ABS, \
|
||||
@ -571,6 +572,11 @@ fill_node(struct callchain_node *node, struct callchain_cursor *cursor)
|
||||
call->cycles_count = cursor_node->branch_flags.cycles;
|
||||
call->iter_count = cursor_node->nr_loop_iter;
|
||||
call->samples_count = cursor_node->samples;
|
||||
|
||||
branch_type_count(&call->brtype_stat,
|
||||
&cursor_node->branch_flags,
|
||||
cursor_node->branch_from,
|
||||
cursor_node->ip);
|
||||
}
|
||||
|
||||
list_add_tail(&call->list, &node->val);
|
||||
@ -688,6 +694,11 @@ static enum match_result match_chain(struct callchain_cursor_node *node,
|
||||
cnode->cycles_count += node->branch_flags.cycles;
|
||||
cnode->iter_count += node->nr_loop_iter;
|
||||
cnode->samples_count += node->samples;
|
||||
|
||||
branch_type_count(&cnode->brtype_stat,
|
||||
&node->branch_flags,
|
||||
node->branch_from,
|
||||
node->ip);
|
||||
}
|
||||
|
||||
return MATCH_EQ;
|
||||
@ -922,7 +933,7 @@ merge_chain_branch(struct callchain_cursor *cursor,
|
||||
list_for_each_entry_safe(list, next_list, &src->val, list) {
|
||||
callchain_cursor_append(cursor, list->ip,
|
||||
list->ms.map, list->ms.sym,
|
||||
false, NULL, 0, 0);
|
||||
false, NULL, 0, 0, 0);
|
||||
list_del(&list->list);
|
||||
map__zput(list->ms.map);
|
||||
free(list);
|
||||
@ -962,7 +973,7 @@ int callchain_merge(struct callchain_cursor *cursor,
|
||||
int callchain_cursor_append(struct callchain_cursor *cursor,
|
||||
u64 ip, struct map *map, struct symbol *sym,
|
||||
bool branch, struct branch_flags *flags,
|
||||
int nr_loop_iter, int samples)
|
||||
int nr_loop_iter, int samples, u64 branch_from)
|
||||
{
|
||||
struct callchain_cursor_node *node = *cursor->last;
|
||||
|
||||
@ -986,6 +997,7 @@ int callchain_cursor_append(struct callchain_cursor *cursor,
|
||||
memcpy(&node->branch_flags, flags,
|
||||
sizeof(struct branch_flags));
|
||||
|
||||
node->branch_from = branch_from;
|
||||
cursor->nr++;
|
||||
|
||||
cursor->last = &node->next;
|
||||
@ -1214,95 +1226,83 @@ int callchain_branch_counts(struct callchain_root *root,
|
||||
cycles_count);
|
||||
}
|
||||
|
||||
static int count_pri64_printf(int idx, const char *str, u64 value, char *bf, int bfsize)
|
||||
{
|
||||
int printed;
|
||||
|
||||
printed = scnprintf(bf, bfsize, "%s%s:%" PRId64 "", (idx) ? " " : " (", str, value);
|
||||
|
||||
return printed;
|
||||
}
|
||||
|
||||
static int count_float_printf(int idx, const char *str, float value, char *bf, int bfsize)
|
||||
{
|
||||
int printed;
|
||||
|
||||
printed = scnprintf(bf, bfsize, "%s%s:%.1f%%", (idx) ? " " : " (", str, value);
|
||||
|
||||
return printed;
|
||||
}
|
||||
|
||||
static int counts_str_build(char *bf, int bfsize,
|
||||
u64 branch_count, u64 predicted_count,
|
||||
u64 abort_count, u64 cycles_count,
|
||||
u64 iter_count, u64 samples_count)
|
||||
u64 iter_count, u64 samples_count,
|
||||
struct branch_type_stat *brtype_stat)
|
||||
{
|
||||
double predicted_percent = 0.0;
|
||||
const char *null_str = "";
|
||||
char iter_str[32];
|
||||
char cycle_str[32];
|
||||
char *istr, *cstr;
|
||||
u64 cycles;
|
||||
int printed, i = 0;
|
||||
|
||||
if (branch_count == 0)
|
||||
return scnprintf(bf, bfsize, " (calltrace)");
|
||||
|
||||
printed = branch_type_str(brtype_stat, bf, bfsize);
|
||||
if (printed)
|
||||
i++;
|
||||
|
||||
if (predicted_count < branch_count) {
|
||||
printed += count_float_printf(i++, "predicted",
|
||||
predicted_count * 100.0 / branch_count,
|
||||
bf + printed, bfsize - printed);
|
||||
}
|
||||
|
||||
if (abort_count) {
|
||||
printed += count_float_printf(i++, "abort",
|
||||
abort_count * 100.0 / branch_count,
|
||||
bf + printed, bfsize - printed);
|
||||
}
|
||||
|
||||
cycles = cycles_count / branch_count;
|
||||
if (cycles) {
|
||||
printed += count_pri64_printf(i++, "cycles",
|
||||
cycles,
|
||||
bf + printed, bfsize - printed);
|
||||
}
|
||||
|
||||
if (iter_count && samples_count) {
|
||||
if (cycles > 0)
|
||||
scnprintf(iter_str, sizeof(iter_str),
|
||||
" iterations:%" PRId64 "",
|
||||
iter_count / samples_count);
|
||||
else
|
||||
scnprintf(iter_str, sizeof(iter_str),
|
||||
"iterations:%" PRId64 "",
|
||||
iter_count / samples_count);
|
||||
istr = iter_str;
|
||||
} else
|
||||
istr = (char *)null_str;
|
||||
|
||||
if (cycles > 0) {
|
||||
scnprintf(cycle_str, sizeof(cycle_str),
|
||||
"cycles:%" PRId64 "", cycles);
|
||||
cstr = cycle_str;
|
||||
} else
|
||||
cstr = (char *)null_str;
|
||||
|
||||
predicted_percent = predicted_count * 100.0 / branch_count;
|
||||
|
||||
if ((predicted_count == branch_count) && (abort_count == 0)) {
|
||||
if ((cycles > 0) || (istr != (char *)null_str))
|
||||
return scnprintf(bf, bfsize, " (%s%s)", cstr, istr);
|
||||
else
|
||||
return scnprintf(bf, bfsize, "%s", (char *)null_str);
|
||||
printed += count_pri64_printf(i++, "iterations",
|
||||
iter_count / samples_count,
|
||||
bf + printed, bfsize - printed);
|
||||
}
|
||||
|
||||
if ((predicted_count < branch_count) && (abort_count == 0)) {
|
||||
if ((cycles > 0) || (istr != (char *)null_str))
|
||||
return scnprintf(bf, bfsize,
|
||||
" (predicted:%.1f%% %s%s)",
|
||||
predicted_percent, cstr, istr);
|
||||
else {
|
||||
return scnprintf(bf, bfsize,
|
||||
" (predicted:%.1f%%)",
|
||||
predicted_percent);
|
||||
}
|
||||
}
|
||||
if (i)
|
||||
return scnprintf(bf + printed, bfsize - printed, ")");
|
||||
|
||||
if ((predicted_count == branch_count) && (abort_count > 0)) {
|
||||
if ((cycles > 0) || (istr != (char *)null_str))
|
||||
return scnprintf(bf, bfsize,
|
||||
" (abort:%" PRId64 " %s%s)",
|
||||
abort_count, cstr, istr);
|
||||
else
|
||||
return scnprintf(bf, bfsize,
|
||||
" (abort:%" PRId64 ")",
|
||||
abort_count);
|
||||
}
|
||||
|
||||
if ((cycles > 0) || (istr != (char *)null_str))
|
||||
return scnprintf(bf, bfsize,
|
||||
" (predicted:%.1f%% abort:%" PRId64 " %s%s)",
|
||||
predicted_percent, abort_count, cstr, istr);
|
||||
|
||||
return scnprintf(bf, bfsize,
|
||||
" (predicted:%.1f%% abort:%" PRId64 ")",
|
||||
predicted_percent, abort_count);
|
||||
bf[0] = 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int callchain_counts_printf(FILE *fp, char *bf, int bfsize,
|
||||
u64 branch_count, u64 predicted_count,
|
||||
u64 abort_count, u64 cycles_count,
|
||||
u64 iter_count, u64 samples_count)
|
||||
u64 iter_count, u64 samples_count,
|
||||
struct branch_type_stat *brtype_stat)
|
||||
{
|
||||
char str[128];
|
||||
char str[256];
|
||||
|
||||
counts_str_build(str, sizeof(str), branch_count,
|
||||
predicted_count, abort_count, cycles_count,
|
||||
iter_count, samples_count);
|
||||
iter_count, samples_count, brtype_stat);
|
||||
|
||||
if (fp)
|
||||
return fprintf(fp, "%s", str);
|
||||
@ -1334,7 +1334,8 @@ int callchain_list_counts__printf_value(struct callchain_node *node,
|
||||
|
||||
return callchain_counts_printf(fp, bf, bfsize, branch_count,
|
||||
predicted_count, abort_count,
|
||||
cycles_count, iter_count, samples_count);
|
||||
cycles_count, iter_count, samples_count,
|
||||
&clist->brtype_stat);
|
||||
}
|
||||
|
||||
static void free_callchain_node(struct callchain_node *node)
|
||||
@ -1459,7 +1460,8 @@ int callchain_cursor__copy(struct callchain_cursor *dst,
|
||||
|
||||
rc = callchain_cursor_append(dst, node->ip, node->map, node->sym,
|
||||
node->branch, &node->branch_flags,
|
||||
node->nr_loop_iter, node->samples);
|
||||
node->nr_loop_iter, node->samples,
|
||||
node->branch_from);
|
||||
if (rc)
|
||||
break;
|
||||
|
||||
|
@ -7,6 +7,7 @@
|
||||
#include "event.h"
|
||||
#include "map.h"
|
||||
#include "symbol.h"
|
||||
#include "branch.h"
|
||||
|
||||
#define HELP_PAD "\t\t\t\t"
|
||||
|
||||
@ -119,6 +120,7 @@ struct callchain_list {
|
||||
u64 cycles_count;
|
||||
u64 iter_count;
|
||||
u64 samples_count;
|
||||
struct branch_type_stat brtype_stat;
|
||||
char *srcline;
|
||||
struct list_head list;
|
||||
};
|
||||
@ -135,6 +137,7 @@ struct callchain_cursor_node {
|
||||
struct symbol *sym;
|
||||
bool branch;
|
||||
struct branch_flags branch_flags;
|
||||
u64 branch_from;
|
||||
int nr_loop_iter;
|
||||
int samples;
|
||||
struct callchain_cursor_node *next;
|
||||
@ -198,7 +201,7 @@ static inline void callchain_cursor_reset(struct callchain_cursor *cursor)
|
||||
int callchain_cursor_append(struct callchain_cursor *cursor, u64 ip,
|
||||
struct map *map, struct symbol *sym,
|
||||
bool branch, struct branch_flags *flags,
|
||||
int nr_loop_iter, int samples);
|
||||
int nr_loop_iter, int samples, u64 branch_from);
|
||||
|
||||
/* Close a cursor writing session. Initialize for the reader */
|
||||
static inline void callchain_cursor_commit(struct callchain_cursor *cursor)
|
||||
|
@ -32,6 +32,7 @@ char dso__symtab_origin(const struct dso *dso)
|
||||
[DSO_BINARY_TYPE__JAVA_JIT] = 'j',
|
||||
[DSO_BINARY_TYPE__DEBUGLINK] = 'l',
|
||||
[DSO_BINARY_TYPE__BUILD_ID_CACHE] = 'B',
|
||||
[DSO_BINARY_TYPE__BUILD_ID_CACHE_DEBUGINFO] = 'D',
|
||||
[DSO_BINARY_TYPE__FEDORA_DEBUGINFO] = 'f',
|
||||
[DSO_BINARY_TYPE__UBUNTU_DEBUGINFO] = 'u',
|
||||
[DSO_BINARY_TYPE__OPENEMBEDDED_DEBUGINFO] = 'o',
|
||||
@ -97,7 +98,12 @@ int dso__read_binary_type_filename(const struct dso *dso,
|
||||
break;
|
||||
}
|
||||
case DSO_BINARY_TYPE__BUILD_ID_CACHE:
|
||||
if (dso__build_id_filename(dso, filename, size) == NULL)
|
||||
if (dso__build_id_filename(dso, filename, size, false) == NULL)
|
||||
ret = -1;
|
||||
break;
|
||||
|
||||
case DSO_BINARY_TYPE__BUILD_ID_CACHE_DEBUGINFO:
|
||||
if (dso__build_id_filename(dso, filename, size, true) == NULL)
|
||||
ret = -1;
|
||||
break;
|
||||
|
||||
@ -504,7 +510,14 @@ static void check_data_close(void);
|
||||
*/
|
||||
static int open_dso(struct dso *dso, struct machine *machine)
|
||||
{
|
||||
int fd = __open_dso(dso, machine);
|
||||
int fd;
|
||||
struct nscookie nsc;
|
||||
|
||||
if (dso->binary_type != DSO_BINARY_TYPE__BUILD_ID_CACHE)
|
||||
nsinfo__mountns_enter(dso->nsinfo, &nsc);
|
||||
fd = __open_dso(dso, machine);
|
||||
if (dso->binary_type != DSO_BINARY_TYPE__BUILD_ID_CACHE)
|
||||
nsinfo__mountns_exit(&nsc);
|
||||
|
||||
if (fd >= 0) {
|
||||
dso__list_add(dso);
|
||||
@ -1236,6 +1249,7 @@ void dso__delete(struct dso *dso)
|
||||
dso_cache__free(dso);
|
||||
dso__free_a2l(dso);
|
||||
zfree(&dso->symsrc_filename);
|
||||
nsinfo__zput(dso->nsinfo);
|
||||
pthread_mutex_destroy(&dso->lock);
|
||||
free(dso);
|
||||
}
|
||||
@ -1301,6 +1315,7 @@ bool __dsos__read_build_ids(struct list_head *head, bool with_hits)
|
||||
{
|
||||
bool have_build_id = false;
|
||||
struct dso *pos;
|
||||
struct nscookie nsc;
|
||||
|
||||
list_for_each_entry(pos, head, node) {
|
||||
if (with_hits && !pos->hit && !dso__is_vdso(pos))
|
||||
@ -1309,11 +1324,13 @@ bool __dsos__read_build_ids(struct list_head *head, bool with_hits)
|
||||
have_build_id = true;
|
||||
continue;
|
||||
}
|
||||
nsinfo__mountns_enter(pos->nsinfo, &nsc);
|
||||
if (filename__read_build_id(pos->long_name, pos->build_id,
|
||||
sizeof(pos->build_id)) > 0) {
|
||||
have_build_id = true;
|
||||
pos->has_build_id = true;
|
||||
}
|
||||
nsinfo__mountns_exit(&nsc);
|
||||
}
|
||||
|
||||
return have_build_id;
|
||||
|
@ -10,6 +10,7 @@
|
||||
#include <linux/types.h>
|
||||
#include <linux/bitops.h>
|
||||
#include "map.h"
|
||||
#include "namespaces.h"
|
||||
#include "build-id.h"
|
||||
|
||||
enum dso_binary_type {
|
||||
@ -20,6 +21,7 @@ enum dso_binary_type {
|
||||
DSO_BINARY_TYPE__JAVA_JIT,
|
||||
DSO_BINARY_TYPE__DEBUGLINK,
|
||||
DSO_BINARY_TYPE__BUILD_ID_CACHE,
|
||||
DSO_BINARY_TYPE__BUILD_ID_CACHE_DEBUGINFO,
|
||||
DSO_BINARY_TYPE__FEDORA_DEBUGINFO,
|
||||
DSO_BINARY_TYPE__UBUNTU_DEBUGINFO,
|
||||
DSO_BINARY_TYPE__BUILDID_DEBUGINFO,
|
||||
@ -187,6 +189,7 @@ struct dso {
|
||||
void *priv;
|
||||
u64 db_id;
|
||||
};
|
||||
struct nsinfo *nsinfo;
|
||||
refcount_t refcnt;
|
||||
char name[0];
|
||||
};
|
||||
|
@ -57,6 +57,7 @@ static const char *perf_event__names[] = {
|
||||
[PERF_RECORD_STAT_ROUND] = "STAT_ROUND",
|
||||
[PERF_RECORD_EVENT_UPDATE] = "EVENT_UPDATE",
|
||||
[PERF_RECORD_TIME_CONV] = "TIME_CONV",
|
||||
[PERF_RECORD_HEADER_FEATURE] = "FEATURE",
|
||||
};
|
||||
|
||||
static const char *perf_ns__names[] = {
|
||||
|
@ -142,7 +142,8 @@ struct branch_flags {
|
||||
u64 in_tx:1;
|
||||
u64 abort:1;
|
||||
u64 cycles:16;
|
||||
u64 reserved:44;
|
||||
u64 type:4;
|
||||
u64 reserved:40;
|
||||
};
|
||||
|
||||
struct branch_entry {
|
||||
@ -244,6 +245,7 @@ enum perf_user_event_type { /* above any possible kernel type */
|
||||
PERF_RECORD_STAT_ROUND = 77,
|
||||
PERF_RECORD_EVENT_UPDATE = 78,
|
||||
PERF_RECORD_TIME_CONV = 79,
|
||||
PERF_RECORD_HEADER_FEATURE = 80,
|
||||
PERF_RECORD_HEADER_MAX
|
||||
};
|
||||
|
||||
@ -609,6 +611,12 @@ struct time_conv_event {
|
||||
u64 time_zero;
|
||||
};
|
||||
|
||||
struct feature_event {
|
||||
struct perf_event_header header;
|
||||
u64 feat_id;
|
||||
char data[];
|
||||
};
|
||||
|
||||
union perf_event {
|
||||
struct perf_event_header header;
|
||||
struct mmap_event mmap;
|
||||
@ -639,6 +647,7 @@ union perf_event {
|
||||
struct stat_event stat;
|
||||
struct stat_round_event stat_round;
|
||||
struct time_conv_event time_conv;
|
||||
struct feature_event feat;
|
||||
};
|
||||
|
||||
void perf_event__print_totals(void);
|
||||
|
@ -242,9 +242,9 @@ void perf_event_attr__set_max_precise_ip(struct perf_event_attr *attr)
|
||||
}
|
||||
}
|
||||
|
||||
int perf_evlist__add_default(struct perf_evlist *evlist)
|
||||
int __perf_evlist__add_default(struct perf_evlist *evlist, bool precise)
|
||||
{
|
||||
struct perf_evsel *evsel = perf_evsel__new_cycles();
|
||||
struct perf_evsel *evsel = perf_evsel__new_cycles(precise);
|
||||
|
||||
if (evsel == NULL)
|
||||
return -ENOMEM;
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user