summaryrefslogtreecommitdiff
path: root/tools/perf/scripts/python/export-to-sqlite.py
diff options
context:
space:
mode:
authorAndrii Nakryiko <andrii@kernel.org>2025-04-22 17:13:38 -0700
committerAndrii Nakryiko <andrii@kernel.org>2025-04-22 17:13:38 -0700
commit5cffad0a5c8f0cc53ce9fe7cff7bc67c3a97c406 (patch)
tree720686e1fcfa71ea8ffbb26acdc0d2e56f9260e5 /tools/perf/scripts/python/export-to-sqlite.py
parentbe2fea9c07d40a0a897580166e3d43c53ef3b75b (diff)
parent9b72f3e5b76007d8ef9c7743561d4c9298a086ab (diff)
Merge branch 'libbpf-fix-event-name-too-long-error-and-add-tests'
Feng Yang says: ==================== libbpf: Fix event name too long error and add tests From: Feng Yang <yangfeng@kylinos.cn> Hi everyone, This series tries to fix event name too long error and add tests. When the binary path is excessively long, the generated probe_name in libbpf exceeds the kernel's MAX_EVENT_NAME_LEN limit (64 bytes). This causes legacy uprobe event attachment to fail with error code -22. The fix reorders the fields to place the unique ID before the name. This ensures that even if truncation occurs via snprintf, the unique ID remains intact, preserving event name uniqueness. Additionally, explicit checks with MAX_EVENT_NAME_LEN are added to enforce length constraints. Acked-by: Jiri Olsa <jolsa@kernel.org> --- Changes in v5: - use strrchr instead of basename. - kprobe_test add __weak. Thanks, Andrii Nakryiko! - Link to v4: https://lore.kernel.org/all/20250415093907.280501-1-yangfeng59949@163.com/ Changes in v4: - add changelog. - gen_uprobe_legacy_event_name and gen_kprobe_legacy_event_name are combined into a function - kprobe_test use normal module function. Thanks, Jiri Olsa! - Link to v3: https://lore.kernel.org/bpf/20250414093402.384872-1-yangfeng59949@163.com/ Changes in v3: - add __sync_fetch_and_add(&index) and let snprintf() do the trimming. Thanks, Andrii Nakryiko! - add selftests. - Link to v2: https://lore.kernel.org/all/20250411080545.319865-1-yangfeng59949@163.com/ Changes in v2: - Use basename() and %.32s to fix. Thanks, Hengqi Chen! - Link to v1: https://lore.kernel.org/all/20250410052712.206785-1-yangfeng59949@163.com/ ==================== Link: https://patch.msgid.link/20250417014848.59321-1-yangfeng59949@163.com Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions