linux/tools/perf/util/bpf_skel/perf_version.h
Blake Jones edf2cadf01 perf test: add test for BPF metadata collection
This is an end-to-end test for the PERF_RECORD_BPF_METADATA support.
It adds a new "bpf_metadata_perf_version" variable to perf's BPF programs,
so that when they are loaded, there will be at least one BPF program with
some metadata to parse. The test invokes "perf record" in a way that loads
one of those BPF programs, and then sifts through the output to find its
BPF metadata.

Signed-off-by: Blake Jones <blakejones@google.com>
Link: https://lore.kernel.org/r/20250612194939.162730-6-blakejones@google.com
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
2025-06-20 14:55:24 -07:00

17 lines
445 B
C

/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
#ifndef __PERF_VERSION_H__
#define __PERF_VERSION_H__
#include "vmlinux.h"
#include <bpf/bpf_helpers.h>
/*
* This is used by tests/shell/record_bpf_metadata.sh
* to verify that BPF metadata generation works.
*
* PERF_VERSION is defined by a build rule at compile time.
*/
const char bpf_metadata_perf_version[] SEC(".rodata") = PERF_VERSION;
#endif /* __PERF_VERSION_H__ */