Home
last modified time | relevance | path

Searched refs:uprobe (Results 1 – 25 of 27) sorted by relevance

12

/linux/kernel/events/
H A Duprobes.c41 * allows us to skip the uprobe_mmap if there are no uprobe events active
50 /* serialize uprobe->pending_list */
56 /* Covers return_instance's uprobe lifetime. */
62 struct uprobe { struct
93 struct uprobe *uprobe; member
124 pr_warn("uprobe: %s:%d failed to %s\n", t->comm, t->pid, msg); in uprobe_warn()
226 delayed_uprobe_check(struct uprobe *uprobe, struct mm_struct *mm) in delayed_uprobe_check()
231 if (du->uprobe in delayed_uprobe_check()
83 inodeuprobe global() argument
88 archuprobe global() argument
224 delayed_uprobe_check(struct uprobe * uprobe,struct mm_struct * mm) delayed_uprobe_check() argument
234 delayed_uprobe_add(struct uprobe * uprobe,struct mm_struct * mm) delayed_uprobe_add() argument
259 delayed_uprobe_remove(struct uprobe * uprobe,struct mm_struct * mm) delayed_uprobe_remove() argument
279 valid_ref_ctr_vma(struct uprobe * uprobe,struct vm_area_struct * vma) valid_ref_ctr_vma() argument
293 find_ref_ctr_vma(struct uprobe * uprobe,struct mm_struct * mm) find_ref_ctr_vma() argument
344 update_ref_ctr_warn(struct uprobe * uprobe,struct mm_struct * mm,short d) update_ref_ctr_warn() argument
354 update_ref_ctr(struct uprobe * uprobe,struct mm_struct * mm,short d) update_ref_ctr() argument
504 struct uprobe *uprobe; uprobe_write() local
635 get_uprobe(struct uprobe * uprobe) get_uprobe() argument
647 try_get_uprobe(struct uprobe * uprobe) try_get_uprobe() argument
654 uprobe_is_active(struct uprobe * uprobe) uprobe_is_active() argument
661 struct uprobe *uprobe = container_of(rcu, struct uprobe, rcu); uprobe_free_rcu_tasks_trace() local
668 struct uprobe *uprobe = container_of(rcu, struct uprobe, rcu); uprobe_free_srcu() local
675 struct uprobe *uprobe = container_of(work, struct uprobe, work); uprobe_free_deferred() local
700 put_uprobe(struct uprobe * uprobe) put_uprobe() argument
710 hprobe_init_leased(struct hprobe * hprobe,struct uprobe * uprobe,struct srcu_ctr __percpu * srcu_scp) hprobe_init_leased() argument
720 hprobe_init_stable(struct hprobe * hprobe,struct uprobe * uprobe) hprobe_init_stable() argument
823 struct uprobe *uprobe = try_get_uprobe(hprobe->uprobe); hprobe_expire() local
946 __insert_uprobe(struct uprobe * uprobe) __insert_uprobe() argument
970 insert_uprobe(struct uprobe * uprobe) insert_uprobe() argument
984 ref_ctr_mismatch_warn(struct uprobe * cur_uprobe,struct uprobe * uprobe) ref_ctr_mismatch_warn() argument
996 struct uprobe *uprobe, *cur_uprobe; alloc_uprobe() local
1028 consumer_add(struct uprobe * uprobe,struct uprobe_consumer * uc) consumer_add() argument
1042 consumer_del(struct uprobe * uprobe,struct uprobe_consumer * uc) consumer_del() argument
1071 copy_insn(struct uprobe * uprobe,struct file * filp) copy_insn() argument
1097 prepare_uprobe(struct uprobe * uprobe,struct file * file,struct mm_struct * mm,unsigned long vaddr) prepare_uprobe() argument
1136 filter_chain(struct uprobe * uprobe,struct mm_struct * mm) filter_chain() argument
1152 install_breakpoint(struct uprobe * uprobe,struct vm_area_struct * vma,unsigned long vaddr) install_breakpoint() argument
1180 remove_breakpoint(struct uprobe * uprobe,struct vm_area_struct * vma,unsigned long vaddr) remove_breakpoint() argument
1273 register_for_each_vma(struct uprobe * uprobe,struct uprobe_consumer * new) register_for_each_vma() argument
1338 uprobe_unregister_nosync(struct uprobe * uprobe,struct uprobe_consumer * uc) uprobe_unregister_nosync() argument
1395 struct uprobe *uprobe; uprobe_register() local
1450 uprobe_apply(struct uprobe * uprobe,struct uprobe_consumer * uc,bool add) uprobe_apply() argument
1471 unapply_uprobe(struct uprobe * uprobe,struct mm_struct * mm) unapply_uprobe() argument
1601 struct uprobe *uprobe, *u; uprobe_mmap() local
1864 xol_get_insn_slot(struct uprobe * uprobe,struct uprobe_task * utask) xol_get_insn_slot() argument
2128 struct uprobe *uprobe; dup_utask() local
2243 prepare_uretprobe(struct uprobe * uprobe,struct pt_regs * regs,struct return_instance * ri) prepare_uretprobe() argument
2314 pre_ssout(struct uprobe * uprobe,struct pt_regs * regs,unsigned long bp_vaddr) pre_ssout() argument
2425 struct uprobe *uprobe = NULL; find_active_uprobe_speculative() local
2467 struct uprobe *uprobe = NULL; find_active_uprobe_rcu() local
2544 handler_chain(struct uprobe * uprobe,struct pt_regs * regs) handler_chain() argument
2595 handle_uretprobe_chain(struct return_instance * ri,struct uprobe * uprobe,struct pt_regs * regs) handle_uretprobe_chain() argument
2634 struct uprobe *uprobe; uprobe_handle_trampoline() local
2709 struct uprobe *uprobe; handle_swbp() local
2790 struct uprobe *uprobe; handle_syscall_uprobe() local
2811 struct uprobe *uprobe; handle_singlestep() local
[all...]
/linux/Documentation/trace/
H A Duprobetracer.rst18 However unlike kprobe-event tracer, the uprobe event interface expects the
29 p[:[GRP/][EVENT]] PATH:OFFSET [FETCHARGS] : Set a uprobe
30 r[:[GRP/][EVENT]] PATH:OFFSET [FETCHARGS] : Set a return uprobe (uretprobe)
31 p[:[GRP/][EVENT]] PATH:OFFSET%return [FETCHARGS] : Set a return uprobe (uretprobe)
32 -:[GRP/][EVENT] : Clear uprobe or uretprobe event
58 (\*3) Unlike kprobe event, "u" prefix will just be ignored, because uprobe
87 * Add a probe as a new uprobe event, write a new definition to uprobe_events
88 as below (sets a uprobe at an offset of 0x4245c0 in the executable /bin/bash)::
118 0x00400000. Hence the command to uprobe would be::
184 Output shows us uprobe was triggered for a pid 24842 with ip being 0x446420
/linux/tools/testing/selftests/bpf/test_kmods/
H A Dbpf_testmod.c742 struct uprobe *uprobe; member
748 static struct testmod_uprobe uprobe = { variable
757 if (uprobe.uprobe) in testmod_register_uprobe()
762 if (uprobe.uprobe) in testmod_register_uprobe()
765 err = kern_path("/proc/self/exe", LOOKUP_FOLLOW, &uprobe.path); in testmod_register_uprobe()
769 uprobe.uprobe = uprobe_register(d_real_inode(uprobe.path.dentry), in testmod_register_uprobe()
770 offset, 0, &uprobe.consumer); in testmod_register_uprobe()
771 if (IS_ERR(uprobe.uprobe)) { in testmod_register_uprobe()
772 err = PTR_ERR(uprobe.uprobe); in testmod_register_uprobe()
773 path_put(&uprobe.path); in testmod_register_uprobe()
[all …]
/linux/tools/perf/tests/shell/
H A Dtest_uprobe_from_different_cu.sh19 temp_dir=$(mktemp -d /tmp/perf-uprobe-different-cu-sh.XXXXXXXXXX)
24 if [[ "${temp_dir}" =~ ^/tmp/perf-uprobe-different-cu-sh.*$ ]]; then
/linux/tools/bpf/bpftool/
H A Dlink.c488 u64_to_ptr(info->perf_event.uprobe.file_name)); in show_perf_event_uprobe_json()
489 jsonw_uint_field(wtr, "offset", info->perf_event.uprobe.offset); in show_perf_event_uprobe_json()
490 jsonw_uint_field(wtr, "cookie", info->perf_event.uprobe.cookie); in show_perf_event_uprobe_json()
491 jsonw_uint_field(wtr, "ref_ctr_offset", info->perf_event.uprobe.ref_ctr_offset); in show_perf_event_uprobe_json()
972 buf = u64_to_ptr(info->perf_event.uprobe.file_name); in show_perf_event_uprobe_plain()
980 printf("%s+%#x ", buf, info->perf_event.uprobe.offset); in show_perf_event_uprobe_plain()
981 if (info->perf_event.uprobe.cookie) in show_perf_event_uprobe_plain()
982 printf("cookie %llu ", info->perf_event.uprobe.cookie); in show_perf_event_uprobe_plain()
983 if (info->perf_event.uprobe.ref_ctr_offset) in show_perf_event_uprobe_plain()
984 printf("ref_ctr_offset 0x%llx ", info->perf_event.uprobe.ref_ctr_offset); in show_perf_event_uprobe_plain()
[all …]
/linux/kernel/trace/
H A Dtrace_uprobe.c65 struct uprobe *uprobe; member
1109 struct uprobe *uprobe; in trace_uprobe_enable() local
1112 uprobe = uprobe_register(inode, tu->offset, tu->ref_ctr_offset, &tu->consumer); in trace_uprobe_enable()
1113 if (IS_ERR(uprobe)) in trace_uprobe_enable()
1114 return PTR_ERR(uprobe); in trace_uprobe_enable()
1116 tu->uprobe = uprobe; in trace_uprobe_enable()
1129 if (!tu->uprobe) in __probe_event_disable()
1132 uprobe_unregister_nosync(tu->uprobe, &tu->consumer); in __probe_event_disable()
1134 tu->uprobe = NULL; in __probe_event_disable()
1333 ret = uprobe_apply(tu->uprobe, &tu->consumer, false); in uprobe_perf_close()
[all …]
H A Dbpf_trace.c2958 struct uprobe *uprobe; member
2974 struct bpf_uprobe *uprobe; member
2982 uprobe_unregister_nosync(uprobes[i].uprobe, &uprobes[i].consumer); in bpf_uprobe_unregister()
3125 static int uprobe_prog_run(struct bpf_uprobe *uprobe, in uprobe_prog_run() argument
3130 struct bpf_uprobe_multi_link *link = uprobe->link; in uprobe_prog_run()
3137 .uprobe = uprobe, in uprobe_prog_run()
3170 struct bpf_uprobe *uprobe; in uprobe_multi_link_filter() local
3172 uprobe = container_of(con, struct bpf_uprobe, consumer); in uprobe_multi_link_filter()
3173 return uprobe->link->task->mm == mm; in uprobe_multi_link_filter()
3180 struct bpf_uprobe *uprobe; in uprobe_multi_link_handler() local
[all …]
/linux/tools/bpf/bpftool/Documentation/
H A Dbpftool-perf.rst59 pid 21800 fd 5: prog_id 9 uprobe filename /home/yhs/a.out offset 1159
69 {"pid":21800,"fd":5,"prog_id":9,"fd_type":"uprobe","filename":"/home/yhs/a.out","offset":1159}]
/linux/tools/testing/selftests/bpf/prog_tests/
H A Dfill_link_info.c117 ASSERT_EQ(info.perf_event.uprobe.offset, offset, "uprobe_offset"); in verify_perf_link_info()
118 ASSERT_EQ(info.perf_event.uprobe.ref_ctr_offset, ref_ctr_offset, "uprobe_ref_ctr_offset"); in verify_perf_link_info()
120 ASSERT_EQ(info.perf_event.uprobe.name_len, strlen(UPROBE_FILE) + 1, in verify_perf_link_info()
122 if (!info.perf_event.uprobe.file_name) { in verify_perf_link_info()
123 info.perf_event.uprobe.file_name = ptr_to_u64(&buf); in verify_perf_link_info()
124 info.perf_event.uprobe.name_len = sizeof(buf); in verify_perf_link_info()
128 ASSERT_EQ(info.perf_event.uprobe.cookie, PERF_EVENT_COOKIE, "uprobe_cookie"); in verify_perf_link_info()
130 err = strncmp(u64_to_ptr(info.perf_event.uprobe.file_name), UPROBE_FILE, in verify_perf_link_info()
H A Duprobe_multi_test.c281 skel->links.uprobe = bpf_program__attach_uprobe_multi(skel->progs.uprobe, pid, in __test_attach_api()
283 if (!ASSERT_OK_PTR(skel->links.uprobe, "bpf_program__attach_uprobe_multi")) in __test_attach_api()
310 /* Attach (uprobe-backed) USDTs */ in __test_attach_api()
594 * Attaching uprobe on uprobe_multi_error_func results in error in attach_uprobe_fail_refctr()
610 skel->links.uprobe = bpf_program__attach_uprobe_multi(skel->progs.uprobe, -1, in attach_uprobe_fail_refctr()
612 if (!ASSERT_ERR_PTR(skel->links.uprobe, "bpf_program__attach_uprobe_multi")) { in attach_uprobe_fail_refctr()
613 bpf_link__destroy(skel->links.uprobe); in attach_uprobe_fail_refctr()
614 skel->links.uprobe in attach_uprobe_fail_refctr()
[all...]
H A Dbpf_cookie.c17 /* uprobe attach point */ in trigger_func()
256 * Weak uprobe target stubs. noinline is required because in uprobe_multi_test_run()
313 link1 = bpf_program__attach_uprobe_multi(skel->progs.uprobe, -1, in uprobe_multi_attach_api_subtest()
377 /* trigger uprobe && uretprobe */ in tp_subtest()
764 if (test__start_subtest("uprobe")) in test_bpf_cookie()
/linux/tools/testing/selftests/bpf/benchs/
H A Drun_bench_uprobes.sh5 for i in usermode-count syscall-count {uprobe,uretprobe}-{nop,push,ret,nop10} usdt-nop usdt-nop10
/linux/tools/testing/selftests/bpf/
H A Duprobe_multi.c19 int __attribute__((weak)) uprobe(void) in uprobe() function
127 (void)uprobe(); in main()
141 if (!strcmp("uprobe-paged-out", argv[1]))
143 if (!strcmp("uprobe-paged-in", argv[1]))
148 "usage: %s <bench|usdt|uprobe-paged-out|uprobe-paged-in>\n",
/linux/tools/testing/selftests/bpf/progs/
H A Duprobe_multi.c84 SEC("uprobe.multi//proc/self/exe:uprobe_multi_func_*") in uprobe_sleep()
85 int uprobe(struct pt_regs *ctx) in uprobe_sleep()
98 SEC("uprobe.multi.s//proc/self/exe:uprobe_multi_func_*") in uprobe_extra()
112 SEC("uprobe.multi//proc/self/exe:uprobe_multi_func_*")
70 int uprobe(struct pt_regs *ctx) uprobe() function
/linux/tools/perf/bench/
H A DBuild21 perf-bench-y += uprobe.o
31 $(OUTPUT)bench/uprobe.o: $(SKEL_OUT)/bench_uprobe.skel.h
/linux/tools/perf/util/
H A Dprobe-file.c3 * probe-file.c : operate ftrace k/uprobe events files
75 static void print_open_warning(int err, bool uprobe, bool readwrite) in print_open_warning() argument
82 if (print_configure_probe_event(uprobe ? 0 : err, uprobe ? err : 0)) in print_open_warning()
86 tracing_path_mount(), uprobe ? 'u' : 'k', in print_open_warning()
746 * this will be an index to get suffix of the uprobe name (defining
H A Dprobe-event.c906 bool uprobe, struct debuginfo *dinfo) in post_process_probe_trace_events()
910 if (uprobe) in post_process_probe_trace_events()
2222 * absolute address uprobe. in synthesize_uprobe_trace_def()
2865 /* Warn if the current kernel's uprobe implementation is old */
2878 /* Old uprobe event doesn't support memory dereference */ in warn_uprobe_event_compat()
2962 static int __open_probe_file_and_namelist(bool uprobe,
2967 fd = probe_file__open(PF_FL_RW | (uprobe ? PF_FL_UPROBE : 0)); in __open_probe_file_and_namelist()
907 post_process_probe_trace_events(struct perf_probe_event * pev,struct probe_trace_event * tevs,int ntevs,const char * module,bool uprobe,struct debuginfo * dinfo) post_process_probe_trace_events() argument
2963 __open_probe_file_and_namelist(bool uprobe,struct strlist ** namelist) __open_probe_file_and_namelist() argument
/linux/tools/perf/Documentation/
H A Dperf-bench.txt70 'uprobe'::
71 Benchmark overhead of uprobe + BPF.
H A Dperf-buildid-cache.txt74 used when creating a uprobe for a process that resides in a
H A Dperf-probe.txt141 used when creating a uprobe for a process that resides in a
179 'EVENT' specifies the name of new event, if omitted, it will be set the name of the probed function, and for return probes, a "\_\_return" suffix is automatically added to the function name. You can also specify a group name by 'GROUP', if omitted, set 'probe' is used for kprobe and 'probe_<bin>' is used for uprobe.
287 Add a uprobe to a target process running in a different mount namespace
/linux/tools/perf/arch/x86/entry/syscalls/
H A Dsyscall_64.tbl348 336 common uprobe sys_uprobe
/linux/kernel/bpf/
H A Dsyscall.c4060 uname = u64_to_user_ptr(info->perf_event.uprobe.file_name); in bpf_perf_link_fill_uprobe()
4061 ulen = info->perf_event.uprobe.name_len; in bpf_perf_link_fill_uprobe()
4071 info->perf_event.uprobe.name_len = ulen; in bpf_perf_link_fill_uprobe()
4072 info->perf_event.uprobe.offset = offset; in bpf_perf_link_fill_uprobe()
4073 info->perf_event.uprobe.cookie = event->bpf_cookie; in bpf_perf_link_fill_uprobe()
4074 info->perf_event.uprobe.ref_ctr_offset = ref_ctr_offset; in bpf_perf_link_fill_uprobe()
/linux/arch/x86/kernel/
H A Duprobes.c762 SYSCALL_DEFINE0(uprobe) in SYSCALL_DEFINE0() argument
/linux/tools/include/uapi/linux/
H A Dbpf.h6936 } uprobe; /* BPF_PERF_EVENT_UPROBE, BPF_PERF_EVENT_URETPROBE */ member
/linux/include/uapi/linux/
H A Dbpf.h6936 } uprobe; /* BPF_PERF_EVENT_UPROBE, BPF_PERF_EVENT_URETPROBE */ member

12