/kernel/linux/linux-5.10/tools/perf/util/ |
H A D | event.c | 533 struct map *thread__find_map(struct thread *thread, u8 cpumode, u64 addr, in thread__find_map() argument 543 al->cpumode = cpumode; in thread__find_map() 551 if (cpumode == PERF_RECORD_MISC_KERNEL && perf_host) { in thread__find_map() 555 } else if (cpumode == PERF_RECORD_MISC_USER && perf_host) { in thread__find_map() 557 } else if (cpumode == PERF_RECORD_MISC_GUEST_KERNEL && perf_guest) { in thread__find_map() 561 } else if (cpumode == PERF_RECORD_MISC_GUEST_USER && perf_guest) { in thread__find_map() 567 if ((cpumode == PERF_RECORD_MISC_GUEST_USER || in thread__find_map() 568 cpumode == PERF_RECORD_MISC_GUEST_KERNEL) && in thread__find_map() 571 if ((cpumode in thread__find_map() 598 thread__find_map_fb(struct thread *thread, u8 cpumode, u64 addr, struct addr_location *al) thread__find_map_fb() argument 611 thread__find_symbol(struct thread *thread, u8 cpumode, u64 addr, struct addr_location *al) thread__find_symbol() argument 620 thread__find_symbol_fb(struct thread *thread, u8 cpumode, u64 addr, struct addr_location *al) thread__find_symbol_fb() argument [all...] |
H A D | thread.h | 112 struct map *thread__find_map(struct thread *thread, u8 cpumode, u64 addr, 114 struct map *thread__find_map_fb(struct thread *thread, u8 cpumode, u64 addr, 117 struct symbol *thread__find_symbol(struct thread *thread, u8 cpumode, 119 struct symbol *thread__find_symbol_fb(struct thread *thread, u8 cpumode,
|
H A D | machine.c | 824 u8 cpumode = event->header.misc & PERF_RECORD_MISC_CPUMODE_MASK; in machine__process_text_poke() local 832 if (cpumode != PERF_RECORD_MISC_KERNEL) { in machine__process_text_poke() 833 pr_debug("%s: unsupported cpumode - ignoring\n", __func__); in machine__process_text_poke() 1650 * The cpumode passed to is_kernel_module is not the in machine__process_kernel_mmap_event() 1651 * cpumode of *this* event. If we insist on passing in machine__process_kernel_mmap_event() 1652 * correct cpumode to is_kernel_module, we should in machine__process_kernel_mmap_event() 1653 * record the cpumode when we adding this dso to the in machine__process_kernel_mmap_event() 1657 * cpumode. We know the correct cpumode must be kernel in machine__process_kernel_mmap_event() 1662 * is_kernel_module() treats it as a kernel cpumode in machine__process_kernel_mmap_event() 2084 add_callchain_ip(struct thread *thread, struct callchain_cursor *cursor, struct symbol **parent, struct addr_location *root_al, u8 *cpumode, u64 ip, bool branch, struct branch_flags *flags, struct iterations *iter, u64 branch_from) add_callchain_ip() argument 2255 u8 cpumode = PERF_RECORD_MISC_USER; lbr_callchain_add_kernel_ip() local 2315 u8 cpumode = PERF_RECORD_MISC_USER; lbr_callchain_add_lbr_ip() local 2635 find_prev_cpumode(struct ip_callchain *chain, struct thread *thread, struct callchain_cursor *cursor, struct symbol **parent, struct addr_location *root_al, u8 *cpumode, int ent) find_prev_cpumode() argument 2668 u8 cpumode = PERF_RECORD_MISC_USER; thread__resolve_callchain_sample() local 3065 machine__addr_cpumode(struct machine *machine, u8 cpumode, u64 addr) machine__addr_cpumode() argument [all...] |
H A D | s390-cpumsf.c | 510 .cpumode = PERF_RECORD_MISC_CPUMODE_UNKNOWN, in s390_cpumsf_make_event() 518 sample.cpumode = basic->P ? PERF_RECORD_MISC_USER in s390_cpumsf_make_event() 521 sample.cpumode = basic->P ? PERF_RECORD_MISC_GUEST_USER in s390_cpumsf_make_event() 525 sample.cpumode = basic->P ? PERF_RECORD_MISC_GUEST_USER in s390_cpumsf_make_event() 528 sample.cpumode = basic->P ? PERF_RECORD_MISC_USER in s390_cpumsf_make_event() 532 event.sample.header.misc = sample.cpumode; in s390_cpumsf_make_event() 535 pr_debug4("%s pos:%#zx ip:%#" PRIx64 " P:%d CL:%d pid:%d.%d cpumode:%d cpu:%d\n", in s390_cpumsf_make_event() 537 sample.tid, sample.cpumode, sample.cpu); in s390_cpumsf_make_event()
|
H A D | dump-insn.h | 14 u8 cpumode; member
|
H A D | intel-pt.c | 571 u8 cpumode; in intel_pt_walk_next_insn() local 581 cpumode = intel_pt_cpumode(ptq->pt, *ip); in intel_pt_walk_next_insn() 585 if (cpumode != PERF_RECORD_MISC_KERNEL) in intel_pt_walk_next_insn() 591 if (!thread__find_map(thread, cpumode, *ip, &al) || !al.map->dso) in intel_pt_walk_next_insn() 734 u8 cpumode; in __intel_pt_pgd_ip() local 740 cpumode = PERF_RECORD_MISC_USER; in __intel_pt_pgd_ip() 746 if (!thread__find_map(thread, cpumode, ip, &al) || !al.map->dso) in __intel_pt_pgd_ip() 1320 sample->cpumode = intel_pt_cpumode(pt, sample->ip); in intel_pt_prep_b_sample() 1325 event->sample.header.misc = sample->cpumode; in intel_pt_prep_b_sample() 1790 u8 cpumode; in intel_pt_synth_pebs_sample() local 2648 intel_pt_find_map(struct thread *thread, u8 cpumode, u64 addr, struct addr_location *al) intel_pt_find_map() argument 2662 u8 cpumode = event->header.misc & PERF_RECORD_MISC_CPUMODE_MASK; intel_pt_text_poke() local [all...] |
/kernel/linux/linux-6.6/tools/perf/util/ |
H A D | event.c | 598 struct map *thread__find_map(struct thread *thread, u8 cpumode, u64 addr, in thread__find_map() argument 611 al->cpumode = cpumode; in thread__find_map() 617 if (cpumode == PERF_RECORD_MISC_KERNEL && perf_host) { in thread__find_map() 621 } else if (cpumode == PERF_RECORD_MISC_USER && perf_host) { in thread__find_map() 623 } else if (cpumode == PERF_RECORD_MISC_GUEST_KERNEL && perf_guest) { in thread__find_map() 627 } else if (cpumode == PERF_RECORD_MISC_GUEST_USER && perf_guest) { in thread__find_map() 632 if ((cpumode == PERF_RECORD_MISC_GUEST_USER || in thread__find_map() 633 cpumode == PERF_RECORD_MISC_GUEST_KERNEL) && in thread__find_map() 636 if ((cpumode in thread__find_map() 663 thread__find_map_fb(struct thread *thread, u8 cpumode, u64 addr, struct addr_location *al) thread__find_map_fb() argument 676 thread__find_symbol(struct thread *thread, u8 cpumode, u64 addr, struct addr_location *al) thread__find_symbol() argument 685 thread__find_symbol_fb(struct thread *thread, u8 cpumode, u64 addr, struct addr_location *al) thread__find_symbol_fb() argument [all...] |
H A D | thread.h | 111 struct map *thread__find_map(struct thread *thread, u8 cpumode, u64 addr, 113 struct map *thread__find_map_fb(struct thread *thread, u8 cpumode, u64 addr, 116 struct symbol *thread__find_symbol(struct thread *thread, u8 cpumode, 118 struct symbol *thread__find_symbol_fb(struct thread *thread, u8 cpumode,
|
H A D | machine.c | 1002 u8 cpumode = event->header.misc & PERF_RECORD_MISC_CPUMODE_MASK; in machine__process_text_poke() local 1011 if (cpumode != PERF_RECORD_MISC_KERNEL) { in machine__process_text_poke() 1012 pr_debug("%s: unsupported cpumode - ignoring\n", __func__); in machine__process_text_poke() 1851 * The cpumode passed to is_kernel_module is not the in machine__process_kernel_mmap_event() 1852 * cpumode of *this* event. If we insist on passing in machine__process_kernel_mmap_event() 1853 * correct cpumode to is_kernel_module, we should in machine__process_kernel_mmap_event() 1854 * record the cpumode when we adding this dso to the in machine__process_kernel_mmap_event() 1858 * cpumode. We know the correct cpumode must be kernel in machine__process_kernel_mmap_event() 1863 * is_kernel_module() treats it as a kernel cpumode in machine__process_kernel_mmap_event() 2314 add_callchain_ip(struct thread *thread, struct callchain_cursor *cursor, struct symbol **parent, struct addr_location *root_al, u8 *cpumode, u64 ip, bool branch, struct branch_flags *flags, struct iterations *iter, u64 branch_from) add_callchain_ip() argument 2492 u8 cpumode = PERF_RECORD_MISC_USER; lbr_callchain_add_kernel_ip() local 2552 u8 cpumode = PERF_RECORD_MISC_USER; lbr_callchain_add_lbr_ip() local 2874 find_prev_cpumode(struct ip_callchain *chain, struct thread *thread, struct callchain_cursor *cursor, struct symbol **parent, struct addr_location *root_al, u8 *cpumode, int ent) find_prev_cpumode() argument 2916 u8 cpumode = PERF_RECORD_MISC_USER; thread__resolve_callchain_sample() local 3337 machine__addr_cpumode(struct machine *machine, u8 cpumode, u64 addr) machine__addr_cpumode() argument [all...] |
H A D | data-convert-json.c | 159 u8 cpumode = PERF_RECORD_MISC_USER; in process_sample_event() local 200 cpumode = PERF_RECORD_MISC_HYPERVISOR; in process_sample_event() 203 cpumode = PERF_RECORD_MISC_KERNEL; in process_sample_event() 206 cpumode = PERF_RECORD_MISC_USER; in process_sample_event() 222 ok = thread__find_symbol(al.thread, cpumode, ip, &tal); in process_sample_event()
|
H A D | s390-cpumsf.c | 511 .cpumode = PERF_RECORD_MISC_CPUMODE_UNKNOWN, in s390_cpumsf_make_event() 519 sample.cpumode = basic->P ? PERF_RECORD_MISC_USER in s390_cpumsf_make_event() 522 sample.cpumode = basic->P ? PERF_RECORD_MISC_GUEST_USER in s390_cpumsf_make_event() 526 sample.cpumode = basic->P ? PERF_RECORD_MISC_GUEST_USER in s390_cpumsf_make_event() 529 sample.cpumode = basic->P ? PERF_RECORD_MISC_USER in s390_cpumsf_make_event() 533 event.sample.header.misc = sample.cpumode; in s390_cpumsf_make_event() 536 pr_debug4("%s pos:%#zx ip:%#" PRIx64 " P:%d CL:%d pid:%d.%d cpumode:%d cpu:%d\n", in s390_cpumsf_make_event() 538 sample.tid, sample.cpumode, sample.cpu); in s390_cpumsf_make_event()
|
H A D | dump-insn.h | 14 u8 cpumode; member
|
H A D | event.h | 383 static inline bool perf_event_header__cpumode_is_guest(u8 cpumode) in perf_event_header__cpumode_is_guest() argument 385 return cpumode == PERF_RECORD_MISC_GUEST_KERNEL || in perf_event_header__cpumode_is_guest() 386 cpumode == PERF_RECORD_MISC_GUEST_USER; in perf_event_header__cpumode_is_guest()
|
H A D | addr_location.h | 21 u8 cpumode; member
|
H A D | addr_location.c | 17 al->cpumode = 0; in addr_location__init()
|
/kernel/linux/linux-5.10/tools/perf/tests/ |
H A D | kmod-path.c | 35 static int test_is_kernel_module(const char *path, int cpumode, bool expect) in test_is_kernel_module() argument 38 (!!is_kernel_module(path, cpumode)) == (!!expect)); in test_is_kernel_module() 39 pr_debug("%s (cpumode: %d) - is_kernel_module: %s\n", in test_is_kernel_module() 40 path, cpumode, expect ? "true" : "false"); in test_is_kernel_module()
|
H A D | code-reading.c | 236 static int read_object_code(u64 addr, size_t len, u8 cpumode, in read_object_code() argument 251 if (!thread__find_map(thread, cpumode, addr, &al) || !al.map->dso) { in read_object_code() 252 if (cpumode == PERF_RECORD_MISC_HYPERVISOR) { in read_object_code() 336 if (cpumode == PERF_RECORD_MISC_KERNEL || in read_object_code() 337 cpumode == PERF_RECORD_MISC_GUEST_KERNEL) { in read_object_code() 392 ret = read_object_code(sample.ip, READLEN, sample.cpumode, thread, state); in process_sample_event()
|
/kernel/linux/linux-6.6/tools/perf/tests/ |
H A D | kmod-path.c | 35 static int test_is_kernel_module(const char *path, int cpumode, bool expect) in test_is_kernel_module() argument 38 (!!is_kernel_module(path, cpumode)) == (!!expect)); in test_is_kernel_module() 39 pr_debug("%s (cpumode: %d) - is_kernel_module: %s\n", in test_is_kernel_module() 40 path, cpumode, expect ? "true" : "false"); in test_is_kernel_module()
|
H A D | code-reading.c | 228 static int read_object_code(u64 addr, size_t len, u8 cpumode, in read_object_code() argument 245 if (!thread__find_map(thread, cpumode, addr, &al) || !map__dso(al.map)) { in read_object_code() 246 if (cpumode == PERF_RECORD_MISC_HYPERVISOR) { in read_object_code() 334 if (cpumode == PERF_RECORD_MISC_KERNEL || in read_object_code() 335 cpumode == PERF_RECORD_MISC_GUEST_KERNEL) { in read_object_code() 393 ret = read_object_code(sample.ip, READLEN, sample.cpumode, thread, state); in process_sample_event()
|
/kernel/linux/linux-5.10/tools/perf/ |
H A D | builtin-script.c | 836 thread__find_map_fb(thread, sample->cpumode, from, &alf); in perf_sample__fprintf_brstack() 837 thread__find_map_fb(thread, sample->cpumode, to, &alt); in perf_sample__fprintf_brstack() 884 thread__find_symbol_fb(thread, sample->cpumode, from, &alf); in perf_sample__fprintf_brstacksym() 885 thread__find_symbol_fb(thread, sample->cpumode, to, &alt); in perf_sample__fprintf_brstacksym() 930 if (thread__find_map_fb(thread, sample->cpumode, from, &alf) && in perf_sample__fprintf_brstackoff() 934 if (thread__find_map_fb(thread, sample->cpumode, to, &alt) && in perf_sample__fprintf_brstackoff() 963 bool *is64bit, u8 *cpumode, bool last) in grab_bb() 974 *cpumode = PERF_RECORD_MISC_KERNEL; in grab_bb() 976 *cpumode = PERF_RECORD_MISC_USER; in grab_bb() 998 if (!thread__find_map(thread, *cpumode, star in grab_bb() 961 grab_bb(u8 *buffer, u64 start, u64 end, struct machine *machine, struct thread *thread, bool *is64bit, u8 *cpumode, bool last) grab_bb() argument 1063 print_srccode(struct thread *thread, u8 cpumode, uint64_t addr) print_srccode() argument 1098 ip__fprintf_sym(uint64_t addr, struct thread *thread, u8 cpumode, int cpu, struct symbol **lastsym, struct perf_event_attr *attr, FILE *fp) ip__fprintf_sym() argument [all...] |
H A D | builtin-inject.c | 62 struct machine *machine, u8 cpumode, u32 flags); 383 dso__inject_build_id(dso, tool, machine, sample->cpumode, 0); in perf_event__repipe_buildid_mmap() 446 dso__inject_build_id(dso, tool, machine, sample->cpumode, in perf_event__repipe_buildid_mmap2() 534 struct machine *machine, u8 cpumode, u32 flags) in dso__inject_build_id() 548 err = perf_event__synthesize_build_id(tool, dso, cpumode, in dso__inject_build_id() 573 if (thread__find_map(thread, sample->cpumode, sample->ip, &al)) { in perf_event__inject_buildid() 577 sample->cpumode, al.map->flags); in perf_event__inject_buildid() 533 dso__inject_build_id(struct dso *dso, struct perf_tool *tool, struct machine *machine, u8 cpumode, u32 flags) dso__inject_build_id() argument
|
/kernel/linux/linux-6.6/tools/perf/dlfilters/ |
H A D | dlfilter-test-api-v2.c | 66 __u8 cpumode; /* Refer CPUMODE_MASK etc in <linux/perf_event.h> */ member 212 .cpumode = PERF_RECORD_MISC_USER, in check_sample() 228 CHECK_SAMPLE(cpumode); in check_sample()
|
H A D | dlfilter-test-api-v0.c | 60 __u8 cpumode; /* Refer CPUMODE_MASK etc in <linux/perf_event.h> */ member 197 .cpumode = PERF_RECORD_MISC_USER, in check_sample() 213 CHECK_SAMPLE(cpumode); in check_sample()
|
/kernel/linux/linux-6.6/tools/perf/ |
H A D | builtin-inject.c | 138 struct machine *machine, u8 cpumode, u32 flags); 471 dso__inject_build_id(dso, tool, machine, sample->cpumode, 0); in perf_event__repipe_buildid_mmap() 559 dso__inject_build_id(dso, tool, machine, sample->cpumode, in perf_event__repipe_buildid_mmap2() 717 struct machine *machine, u8 cpumode, u32 flags) in dso__inject_build_id() 737 err = perf_event__synthesize_build_id(tool, dso, cpumode, in dso__inject_build_id() 763 if (thread__find_map(thread, sample->cpumode, sample->ip, &al)) { in perf_event__inject_buildid() 769 sample->cpumode, map__flags(al.map)); in perf_event__inject_buildid() 1177 u8 cpumode = dso__is_in_kernel_space(dso) ? in synthesize_build_id() local 1186 return perf_event__synthesize_build_id(&inject->tool, dso, cpumode, in synthesize_build_id() 1473 u8 cpumode; in guest_session__inject_events() local 716 dso__inject_build_id(struct dso *dso, struct perf_tool *tool, struct machine *machine, u8 cpumode, u32 flags) dso__inject_build_id() argument [all...] |
H A D | builtin-script.c | 938 thread__find_map_fb(thread, sample->cpumode, from, &alf); in perf_sample__fprintf_brstack() 939 thread__find_map_fb(thread, sample->cpumode, to, &alt); in perf_sample__fprintf_brstack() 975 thread__find_symbol_fb(thread, sample->cpumode, from, &alf); in perf_sample__fprintf_brstacksym() 976 thread__find_symbol_fb(thread, sample->cpumode, to, &alt); in perf_sample__fprintf_brstacksym() 1013 if (thread__find_map_fb(thread, sample->cpumode, from, &alf) && in perf_sample__fprintf_brstackoff() 1017 if (thread__find_map_fb(thread, sample->cpumode, to, &alt) && in perf_sample__fprintf_brstackoff() 1038 bool *is64bit, u8 *cpumode, bool last) in grab_bb() 1051 *cpumode = PERF_RECORD_MISC_KERNEL; in grab_bb() 1053 *cpumode = PERF_RECORD_MISC_USER; in grab_bb() 1075 if (!thread__find_map(thread, *cpumode, star in grab_bb() 1036 grab_bb(u8 *buffer, u64 start, u64 end, struct machine *machine, struct thread *thread, bool *is64bit, u8 *cpumode, bool last) grab_bb() argument 1144 print_srccode(struct thread *thread, u8 cpumode, uint64_t addr) print_srccode() argument 1188 ip__fprintf_sym(uint64_t addr, struct thread *thread, u8 cpumode, int cpu, struct symbol **lastsym, struct perf_event_attr *attr, FILE *fp) ip__fprintf_sym() argument [all...] |