summaryrefslogtreecommitdiff
path: root/tools/perf/util/trace-event-scripting.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
-rw-r--r--tools/perf/util/trace-event-scripting.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/tools/perf/util/trace-event-scripting.c b/tools/perf/util/trace-event-scripting.c
index d8f4b5bce4ad..62ba1af79936 100644
--- a/tools/perf/util/trace-event-scripting.c
+++ b/tools/perf/util/trace-event-scripting.c
@@ -13,6 +13,7 @@
#include <event-parse.h>
#endif
+#include "archinsn.h"
#include "debug.h"
#include "trace-event.h"
#include "evsel.h"
@@ -271,3 +272,16 @@ void setup_perl_scripting(void)
}
#endif
#endif
+
+__weak void arch_fetch_insn(struct perf_sample *sample __maybe_unused,
+ struct thread *thread __maybe_unused,
+ struct machine *machine __maybe_unused)
+{
+}
+
+void script_fetch_insn(struct perf_sample *sample, struct thread *thread,
+ struct machine *machine, bool native_arch)
+{
+ if (sample->insn_len == 0 && native_arch)
+ arch_fetch_insn(sample, thread, machine);
+}