Home
last modified time | relevance | path

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

/linux/tools/testing/selftests/bpf/test_kmods/
H A Dbpf_testmod.c623 struct uprobe *uprobe;
629 static struct testmod_uprobe uprobe = { in testmod_register_uprobe()
638 if (uprobe.uprobe) in testmod_register_uprobe()
643 if (uprobe.uprobe) in testmod_register_uprobe()
646 err = kern_path("/proc/self/exe", LOOKUP_FOLLOW, &uprobe.path); in testmod_register_uprobe()
650 uprobe.uprobe in testmod_register_uprobe()
616 struct uprobe *uprobe; global() member
622 static struct testmod_uprobe uprobe = { global() variable
[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/kernel/trace/
H A Dtrace_uprobe.c58 * uprobe event core functions
65 struct uprobe *uprobe; member
476 * then we allow same uprobe with new reference counter as far
540 * - Add uprobe: p|r[:[GRP/][EVENT]] PATH:OFFSET[%return][(REF)] [FETCHARGS] in DEFINE_FREE()
645 /* Parse uprobe offset. */ in DEFINE_FREE()
1030 /* uprobe handler */ in uprobe_trace_func()
1106 struct uprobe *uprobe; in trace_uprobe_enable()
1109 uprobe in trace_uprobe_enable()
1105 struct uprobe *uprobe; trace_uprobe_enable() local
[all...]
H A Dbpf_trace.c165 * RCU flavor selection, following the uprobe pattern.
2242 /* kprobe/uprobe */ in bpf_event_notify()
2957 struct uprobe *uprobe; in bpf_uprobe_multi_link_dealloc()
2973 struct bpf_uprobe *uprobe; in bpf_uprobe_multi_link_fill_link_info()
2981 uprobe_unregister_nosync(uprobes[i].uprobe, &uprobes[i].consumer); in bpf_uprobe_multi_link_fill_link_info()
3124 static int uprobe_prog_run(struct bpf_uprobe *uprobe, in uprobe_multi_link_filter() local
3129 struct bpf_uprobe_multi_link *link = uprobe->link;
3136 .uprobe = uprobe, in uprobe_multi_link_handler()
2912 struct uprobe *uprobe; global() member
2928 struct bpf_uprobe *uprobe; global() member
3079 uprobe_prog_run(struct bpf_uprobe * uprobe,unsigned long entry_ip,struct pt_regs * regs,bool is_return,void * data) uprobe_prog_run() argument
3134 struct bpf_uprobe *uprobe; uprobe_multi_link_handler() local
3148 struct bpf_uprobe *uprobe; uprobe_multi_link_ret_handler() local
[all...]
/linux/tools/testing/selftests/bpf/prog_tests/
H A Dfill_link_info.c29 /* uprobe attach point */
100 ASSERT_EQ(info.perf_event.uprobe.offset, offset, "uprobe_offset"); in verify_perf_link_info()
101 ASSERT_EQ(info.perf_event.uprobe.ref_ctr_offset, ref_ctr_offset, "uprobe_ref_ctr_offset"); in verify_perf_link_info()
103 ASSERT_EQ(info.perf_event.uprobe.name_len, strlen(UPROBE_FILE) + 1, in verify_perf_link_info()
105 if (!info.perf_event.uprobe.file_name) { in verify_perf_link_info()
106 info.perf_event.uprobe.file_name = ptr_to_u64(&buf); in verify_perf_link_info()
107 info.perf_event.uprobe.name_len = sizeof(buf); in verify_perf_link_info()
111 ASSERT_EQ(info.perf_event.uprobe.cookie, PERF_EVENT_COOKIE, "uprobe_cookie"); in verify_perf_link_info()
113 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/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/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/benchs/
H A Drun_bench_uprobes.sh5 for i in usermode-count syscall-count {uprobe,uretprobe}-{nop,push,ret,nop5} usdt-nop usdt-nop5
/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()
744 * 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.c3855 * This also blocks the combination of uprobe+freplace, because it is in bpf_raw_tp_link_fill_link_info()
3856 * unable to recognize the use of the tgt_prog as an uprobe or a kprobe in bpf_raw_tp_link_fill_link_info()
3857 * by tgt_prog itself. At attach time, uprobe/kprobe is recognized by in bpf_raw_tp_link_fill_link_info()
4115 uname = u64_to_user_ptr(info->perf_event.uprobe.file_name);
4116 ulen = info->perf_event.uprobe.name_len; in bpf_perf_event_link_show_fdinfo()
4126 info->perf_event.uprobe.name_len = ulen; in bpf_perf_event_link_show_fdinfo()
4127 info->perf_event.uprobe.offset = offset;
4128 info->perf_event.uprobe.cookie = event->bpf_cookie; in bpf_tracepoint_link_show_fdinfo()
4129 info->perf_event.uprobe.ref_ctr_offset = ref_ctr_offset; in bpf_tracepoint_link_show_fdinfo()
4154 type == BPF_FD_TYPE_URETPROBE ? "uretprobe" : "uprobe", in bpf_probe_link_show_fdinfo()
[all...]
/linux/arch/x86/kernel/
H A Duprobes.c804 SYSCALL_DEFINE0(uprobe) in SYSCALL_DEFINE0() argument
/linux/tools/include/uapi/linux/
H A Dbpf.h569 * or uprobe perf event, then the *prog_id* and *fd_type* will
572 * uprobe, the *probe_offset* and *probe_addr* will also be
575 * the tracepoint, kprobe or uprobe.
1330 /* Get return uprobe. */
1802 * filename for uprobe
5397 * When called for kprobe program attached as uprobe it returns
5398 * probe address for both entry and return uprobe.
5403 * Address of the probe for uprobe and return uprobe.
5413 * - kprobe/uprobe;
6787 } uprobe; /* BPF_PERF_EVENT_UPROBE, BPF_PERF_EVENT_URETPROBE */ global() member
[all...]
/linux/tools/lib/bpf/
H A Dlibbpf.c10081 SEC_DEF("uprobe+", KPROBE, 0, SEC_NONE, attach_uprobe), in libbpf_get_type_names()
10082 SEC_DEF("uprobe.s+", KPROBE, 0, SEC_SLEEPABLE, attach_uprobe), in libbpf_get_type_names()
10089 SEC_DEF("uprobe.multi+", KPROBE, BPF_TRACE_UPROBE_MULTI, SEC_NONE, attach_uprobe_multi), in libbpf_get_type_names()
10091 SEC_DEF("uprobe.session+", KPROBE, BPF_TRACE_UPROBE_SESSION, SEC_NONE, attach_uprobe_multi), in libbpf_get_type_names()
10092 SEC_DEF("uprobe.multi.s+", KPROBE, BPF_TRACE_UPROBE_MULTI, SEC_SLEEPABLE, attach_uprobe_multi), in libbpf_get_type_names()
10094 SEC_DEF("uprobe.session.s+", KPROBE, BPF_TRACE_UPROBE_SESSION, SEC_SLEEPABLE, attach_uprobe_multi), in libbpf_get_type_names()
11498 /* legacy uprobe/kprobe needs to be removed after perf event fd closure */
11639 const char *file = "/sys/bus/event_source/devices/uprobe/type"; in probe_kern_syscall_wrapper()
11653 const char *file = "/sys/bus/event_source/devices/uprobe/format/retprobe";
11661 static int perf_event_open_probe(bool uprobe, boo in bpf_program__attach_kprobe_opts()
11401 perf_event_open_probe(bool uprobe,bool retprobe,const char * name,uint64_t offset,int pid,size_t ref_ctr_off) perf_event_open_probe() argument
[all...]