aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/perf/util/trace-event-scripting.c
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2023-06-27 22:37:24 +0200
committerJiri Kosina <jkosina@suse.cz>2023-06-27 22:37:24 +0200
commite80b500370e71b8cd7dd64be4080cee0a3e5068f (patch)
tree130b5288bf5f8420482a1aaf021f2054b5687f04 /tools/perf/util/trace-event-scripting.c
parentMerge branch 'for-6.5/amd-sfh' into for-linus (diff)
parentHID: apple: Option to swap only left side mod keys (diff)
downloadwireguard-linux-e80b500370e71b8cd7dd64be4080cee0a3e5068f.tar.xz
wireguard-linux-e80b500370e71b8cd7dd64be4080cee0a3e5068f.zip
Merge branch 'for-6.5/apple' into for-linus
- improved support for Keychron K8 keyboard (Lasse Brun)
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
-rw-r--r--tools/perf/util/trace-event-scripting.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/tools/perf/util/trace-event-scripting.c b/tools/perf/util/trace-event-scripting.c
index 56175c53f9af..bd0000300c77 100644
--- a/tools/perf/util/trace-event-scripting.c
+++ b/tools/perf/util/trace-event-scripting.c
@@ -9,7 +9,9 @@
#include <stdlib.h>
#include <string.h>
#include <errno.h>
+#ifdef HAVE_LIBTRACEEVENT
#include <traceevent/event-parse.h>
+#endif
#include "debug.h"
#include "trace-event.h"
@@ -27,10 +29,11 @@ void scripting_context__update(struct scripting_context *c,
struct addr_location *addr_al)
{
c->event_data = sample->raw_data;
+ c->pevent = NULL;
+#ifdef HAVE_LIBTRACEEVENT
if (evsel->tp_format)
c->pevent = evsel->tp_format->tep;
- else
- c->pevent = NULL;
+#endif
c->event = event;
c->sample = sample;
c->evsel = evsel;
@@ -122,6 +125,7 @@ void setup_python_scripting(void)
}
#endif
+#ifdef HAVE_LIBTRACEEVENT
static void print_perl_unsupported_msg(void)
{
fprintf(stderr, "Perl scripting not supported."
@@ -186,3 +190,4 @@ void setup_perl_scripting(void)
register_perl_scripting(&perl_scripting_ops);
}
#endif
+#endif