mirror of
https://github.com/torvalds/linux.git
synced 2026-10-07 22:37:45 -04:00
At some point I'll suggest moving this to libbpf, for now I'll experiment with ways to dump BPF maps set by events in 'perf trace', starting with a very basic dumper for the current very limited needs of the augmented_raw_syscalls code: dumping booleans. Having functions that apply to the map keys and values and do table lookup in things like syscall id to string tables should come next. Cc: Adrian Hunter <[email protected]> Cc: Alexei Starovoitov <[email protected]> Cc: Daniel Borkmann <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Martin KaFai Lau <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Yonghong Song <[email protected]> Link: https://lkml.kernel.org/n/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
23 lines
431 B
C
23 lines
431 B
C
// SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
|
|
#ifndef __PERF_BPF_MAP_H
|
|
#define __PERF_BPF_MAP_H 1
|
|
|
|
#include <stdio.h>
|
|
#include <linux/compiler.h>
|
|
struct bpf_map;
|
|
|
|
#ifdef HAVE_LIBBPF_SUPPORT
|
|
|
|
int bpf_map__fprintf(struct bpf_map *map, FILE *fp);
|
|
|
|
#else
|
|
|
|
static inline int bpf_map__fprintf(struct bpf_map *map __maybe_unused, FILE *fp __maybe_unused)
|
|
{
|
|
return 0;
|
|
}
|
|
|
|
#endif // HAVE_LIBBPF_SUPPORT
|
|
|
|
#endif // __PERF_BPF_MAP_H
|