summaryrefslogtreecommitdiffstats
path: root/tools/perf/util/bpf_map.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@kernel.org>2019-02-28 08:27:30 +0100
committerIngo Molnar <mingo@kernel.org>2019-02-28 08:27:30 +0100
commit0a1571243d3f150fa99c6f41f1b8e17a307a2b8b (patch)
treea38a137f96eace69709bf4b44cd7d7b548d0d9cf /tools/perf/util/bpf_map.h
parent9ed8f1a6e7670aadd5aef30456a90b456ed1b185 (diff)
parentb4409ae112caa6315f6ee678e953b9fc93e6919c (diff)
downloadlinux-stable-0a1571243d3f150fa99c6f41f1b8e17a307a2b8b.tar.gz
linux-stable-0a1571243d3f150fa99c6f41f1b8e17a307a2b8b.tar.bz2
linux-stable-0a1571243d3f150fa99c6f41f1b8e17a307a2b8b.zip
Merge tag 'perf-core-for-mingo-5.1-20190220' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: perf report: He Kuang: - Don't shadow inlined symbol with different addr range. perf script: Jiri Olsa: - Allow +- operator to ask for -F to add/remove fields to the default set, for instance to ask for the removal of the 'cpu' field in tracepoint events, adding 'period' to that kind of events, etc. perf test: Thomas Richter: - Fix scheduler tracepoint signedness of COMM fields failure of 'evsel-tp-sched' test on s390 and other arches. Tommi Rantala: - Skip trace+probe_vfs_getname.sh when 'perf trace' is not built. perf trace: Arnaldo Carvalho de Melo: - Add initial BPF map dumper, initially just for the current, minimal needs of the augmented_raw_syscalls BPF example used to collect pointer args payloads that uses BPF maps for pid and syscall filtering, but will in time have features similar to 'perf stat' --interval-print, --interval-clear, ways to signal from a BPF event that a specific map (or range of that map) should be printed, optionally as a histogram, etc. General: Jiri Olsa: - Add CPU and NUMA topologies classes for further reuse, fixing some issues in the process. - Fixup some warnings and debug levels. - Make rm_rf() remove single file, not just directories. Documentation: Jonas Rabenstein: - Fix HEADER_CMDLINE description in perf.data documentation. - Fix documentation of the Flags section in perf.data. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'tools/perf/util/bpf_map.h')
-rw-r--r--tools/perf/util/bpf_map.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/tools/perf/util/bpf_map.h b/tools/perf/util/bpf_map.h
new file mode 100644
index 000000000000..d6abd5e47af8
--- /dev/null
+++ b/tools/perf/util/bpf_map.h
@@ -0,0 +1,22 @@
+// 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