summaryrefslogtreecommitdiff
path: root/tools/perf/util/probe-file.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/probe-file.h')
-rw-r--r--tools/perf/util/probe-file.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/perf/util/probe-file.h b/tools/perf/util/probe-file.h
index cafbe1d3f3bf..9577b5c0b487 100644
--- a/tools/perf/util/probe-file.h
+++ b/tools/perf/util/probe-file.h
@@ -24,6 +24,8 @@ struct probe_cache {
#define for_each_probe_cache_entry(entry, pcache) \
list_for_each_entry(entry, &pcache->entries, node)
+/* probe-file.c depends on libelf */
+#ifdef HAVE_LIBELF_SUPPORT
int probe_file__open(int flag);
int probe_file__open_both(int *kfd, int *ufd, int flag);
struct strlist *probe_file__get_namelist(int fd);
@@ -52,4 +54,11 @@ struct probe_cache_entry *probe_cache__find(struct probe_cache *pcache,
struct probe_cache_entry *probe_cache__find_by_name(struct probe_cache *pcache,
const char *group, const char *event);
int probe_cache__show_all_caches(struct strfilter *filter);
+#else /* ! HAVE_LIBELF_SUPPORT */
+static inline struct probe_cache *probe_cache__new(const char *tgt __maybe_unused)
+{
+ return NULL;
+}
+#define probe_cache__delete(pcache) do {} while (0)
+#endif
#endif