linux/tools/bpf/bpftool
Jiri Olsa 54258324b9 bpftool: Display cookie for perf event link probes
Displaying cookie for perf event link probes, in plain mode:

  # bpftool link
  17: perf_event  prog 90
          kprobe ffffffff82b1c2b0 bpf_fentry_test1  cookie 3735928559
  18: perf_event  prog 90
          kretprobe ffffffff82b1c2b0 bpf_fentry_test1  cookie 3735928559
  20: perf_event  prog 92
          tracepoint sched_switch  cookie 3735928559
  21: perf_event  prog 93
          event software:page-faults  cookie 3735928559
  22: perf_event  prog 91
          uprobe /proc/self/exe+0xd703c  cookie 3735928559

And in json mode:

  # bpftool link -j | jq

  {
    "id": 30,
    "type": "perf_event",
    "prog_id": 160,
    "retprobe": false,
    "addr": 18446744071607272112,
    "func": "bpf_fentry_test1",
    "offset": 0,
    "missed": 0,
    "cookie": 3735928559
  }

  {
    "id": 33,
    "type": "perf_event",
    "prog_id": 162,
    "tracepoint": "sched_switch",
    "cookie": 3735928559
  }

  {
    "id": 34,
    "type": "perf_event",
    "prog_id": 163,
    "event_type": "software",
    "event_config": "page-faults",
    "cookie": 3735928559
  }

  {
    "id": 35,
    "type": "perf_event",
    "prog_id": 161,
    "retprobe": false,
    "file": "/proc/self/exe",
    "offset": 880700,
    "cookie": 3735928559
  }

Reviewed-by: Quentin Monnet <quentin@isovalent.com>
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Acked-by: Song Liu <song@kernel.org>
Link: https://lore.kernel.org/r/20240119110505.400573-8-jolsa@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
2024-01-23 16:05:28 -08:00
..
bash-completion bpftool: Add support for cgroup unix socket address hooks 2023-10-11 17:27:55 -07:00
Documentation bpftool: Fix prog object type in manpage 2023-11-09 19:07:38 -08:00
skeleton bpftool: Use a local bpf_perf_event_value to fix accessing its fields 2023-07-10 15:29:21 -07:00
.gitignore bpftool: Fix SPDX tag for Makefiles and .gitignore 2021-11-10 09:00:52 -08:00
btf_dumper.c bpftool: Fix printing of pointer value 2023-10-19 16:29:36 +02:00
btf.c bpftool: Use bpf_{btf,link,map,prog}_get_info_by_fd() 2023-02-16 15:32:45 -08:00
cfg.c bpftool: Support printing opcodes and source file references in CFG 2023-04-05 21:27:27 -07:00
cfg.h bpftool: Support printing opcodes and source file references in CFG 2023-04-05 21:27:27 -07:00
cgroup.c bpftool: Add support for cgroup unix socket address hooks 2023-10-11 17:27:55 -07:00
common.c bpftool: Support bpffs mountpoint as pin path for prog loadall 2023-05-17 15:58:18 +02:00
feature.c bpfilter: remove bpfilter 2024-01-04 10:23:10 -08:00
gen.c bpftool: Align bpf_load_and_run_opts insns and data 2023-10-09 09:36:51 -07:00
iter.c bpftool: Support bpffs mountpoint as pin path for prog loadall 2023-05-17 15:58:18 +02:00
jit_disasm.c bpftool: Fix spelling mistake "disasembler" -> "disassembler" 2022-10-26 18:20:22 -07:00
json_writer.c tools: bpftool: json: Fix backslash escape typo in jsonw_puts 2023-03-29 09:48:45 -07:00
json_writer.h tools: bpftool: json: Fix backslash escape typo in jsonw_puts 2023-03-29 09:48:45 -07:00
link.c bpftool: Display cookie for perf event link probes 2024-01-23 16:05:28 -08:00
main.c bpftool: clean-up usage of libbpf_get_error() 2022-11-20 16:17:46 -08:00
main.h bpftool: Support bpffs mountpoint as pin path for prog loadall 2023-05-17 15:58:18 +02:00
Makefile bpf: Replace deprecated -target with --target= for Clang 2023-06-29 15:46:17 +02:00
map_perf_ring.c bpftool: Fix error message of strerror 2022-09-30 15:40:46 -07:00
map.c bpftool: Specify XDP Hints ifname when loading program 2023-05-23 16:55:06 +02:00
net.c bpftool: Extend net dump with netkit progs 2023-10-24 16:07:32 -07:00
netlink_dumper.c bpftool: Use consistent include paths for libbpf 2020-01-20 16:37:45 -08:00
netlink_dumper.h bpftool: Extend net dump with tcx progs 2023-07-19 10:07:28 -07:00
perf.c bpftool: fix perf help message 2023-08-11 20:54:29 -07:00
pids.c libbpf: Hashmap interface update to allow both long and void* keys/values 2022-11-09 20:45:14 -08:00
prog.c bpftool: Silence build warning about calloc() 2024-01-23 14:40:23 -08:00
struct_ops.c bpftool: Wrap struct_ops dump in an array 2023-10-19 16:30:15 +02:00
tracelog.c bpftool, musl compat: Replace sys/fcntl.h by fcntl.h 2022-04-25 23:24:28 +02:00
xlated_dumper.c bpftool: Dump the kernel symbol's module name 2023-07-11 20:07:50 -07:00
xlated_dumper.h bpftool: Dump the kernel symbol's module name 2023-07-11 20:07:50 -07:00