summaryrefslogtreecommitdiff
path: root/tools/perf/util/llvm-c-helpers.h
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/llvm-c-helpers.h')
-rw-r--r--tools/perf/util/llvm-c-helpers.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/perf/util/llvm-c-helpers.h b/tools/perf/util/llvm-c-helpers.h
index 19332dd98e14..d2b99637a28a 100644
--- a/tools/perf/util/llvm-c-helpers.h
+++ b/tools/perf/util/llvm-c-helpers.h
@@ -13,6 +13,8 @@
extern "C" {
#endif
+struct dso;
+
struct llvm_a2l_frame {
char* filename;
char* funcname;
@@ -42,6 +44,15 @@ int llvm_addr2line(const char* dso_name,
bool unwind_inlines,
struct llvm_a2l_frame** inline_frames);
+/*
+ * Simple symbolizers for addresses; will convert something like
+ * 0x12345 to "func+0x123". Will return NULL if no symbol was found.
+ *
+ * The returned value must be freed by the caller, with free().
+ */
+char *llvm_name_for_code(struct dso *dso, const char *dso_name, u64 addr);
+char *llvm_name_for_data(struct dso *dso, const char *dso_name, u64 addr);
+
#ifdef __cplusplus
}
#endif