Home
last modified time | relevance | path

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

12

/linux/kernel/events/
H A Duprobes.c62 struct uprobe { struct
93 struct uprobe *uprobe; argument
226 delayed_uprobe_check(struct uprobe *uprobe, struct mm_struct *mm) in delayed_uprobe_check() argument
231 if (du->uprobe == uprobe && du->mm == mm) in delayed_uprobe_check()
236 static int delayed_uprobe_add(struct uprobe *uprobe, struct mm_struct *mm) in delayed_uprobe_add() argument
240 if (delayed_uprobe_check(uprobe, mm)) in delayed_uprobe_add()
247 du->uprobe = uprobe; in delayed_uprobe_add()
261 static void delayed_uprobe_remove(struct uprobe *uprobe, struct mm_struct *mm) in delayed_uprobe_remove() argument
266 if (!uprobe && !mm) in delayed_uprobe_remove()
272 if (uprobe && du->uprobe != uprobe) in delayed_uprobe_remove()
[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/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/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/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.c3817 * This also blocks the combination of uprobe+freplace, because it is in bpf_tracing_prog_attach()
3818 * unable to recognize the use of the tgt_prog as an uprobe or a kprobe in bpf_tracing_prog_attach()
3819 * by tgt_prog itself. At attach time, uprobe/kprobe is recognized by in bpf_tracing_prog_attach()
4077 uname = u64_to_user_ptr(info->perf_event.uprobe.file_name);
4078 ulen = info->perf_event.uprobe.name_len; in bpf_perf_link_fdinfo_uprobe()
4088 info->perf_event.uprobe.name_len = ulen; in bpf_perf_link_fdinfo_uprobe()
4089 info->perf_event.uprobe.offset = offset; in bpf_perf_link_fdinfo_uprobe()
4090 info->perf_event.uprobe.cookie = event->bpf_cookie; in bpf_perf_link_fdinfo_uprobe()
4091 info->perf_event.uprobe.ref_ctr_offset = ref_ctr_offset; in bpf_perf_link_fdinfo_uprobe()
4116 type == BPF_FD_TYPE_URETPROBE ? "uretprobe" : "uprobe", in bpf_perf_link_fill_probe()
[all...]
/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