aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util
diff options
context:
space:
mode:
Diffstat (limited to 'tools/perf/util')
-rw-r--r--tools/perf/util/trace-event-parse.c15
-rw-r--r--tools/perf/util/trace-event-perl.c27
-rw-r--r--tools/perf/util/trace-event-perl.h8
-rw-r--r--tools/perf/util/trace-event.h9
4 files changed, 23 insertions, 36 deletions
diff --git a/tools/perf/util/trace-event-parse.c b/tools/perf/util/trace-event-parse.c
index c4b3cb8a02b..9b3c20f42f9 100644
--- a/tools/perf/util/trace-event-parse.c
+++ b/tools/perf/util/trace-event-parse.c
@@ -3286,3 +3286,18 @@ void parse_set_info(int nr_cpus, int long_sz)
cpus = nr_cpus;
long_size = long_sz;
}
+
+int common_pc(struct scripting_context *context)
+{
+ return parse_common_pc(context->event_data);
+}
+
+int common_flags(struct scripting_context *context)
+{
+ return parse_common_flags(context->event_data);
+}
+
+int common_lock_depth(struct scripting_context *context)
+{
+ return parse_common_lock_depth(context->event_data);
+}
diff --git a/tools/perf/util/trace-event-perl.c b/tools/perf/util/trace-event-perl.c
index 6d6d76b8a21..5b49df067df 100644
--- a/tools/perf/util/trace-event-perl.c
+++ b/tools/perf/util/trace-event-perl.c
@@ -239,33 +239,6 @@ static inline struct event *find_cache_event(int type)
return event;
}
-int common_pc(struct scripting_context *context)
-{
- int pc;
-
- pc = parse_common_pc(context->event_data);
-
- return pc;
-}
-
-int common_flags(struct scripting_context *context)
-{
- int flags;
-
- flags = parse_common_flags(context->event_data);
-
- return flags;
-}
-
-int common_lock_depth(struct scripting_context *context)
-{
- int lock_depth;
-
- lock_depth = parse_common_lock_depth(context->event_data);
-
- return lock_depth;
-}
-
static void perl_process_event(int cpu, void *data,
int size __unused,
unsigned long long nsecs, char *comm)
diff --git a/tools/perf/util/trace-event-perl.h b/tools/perf/util/trace-event-perl.h
index e88fb26137b..01efcc9564f 100644
--- a/tools/perf/util/trace-event-perl.h
+++ b/tools/perf/util/trace-event-perl.h
@@ -44,12 +44,4 @@ void boot_DynaLoader(pTHX_ CV *cv);
typedef PerlInterpreter * INTERP;
#endif
-struct scripting_context {
- void *event_data;
-};
-
-int common_pc(struct scripting_context *context);
-int common_flags(struct scripting_context *context);
-int common_lock_depth(struct scripting_context *context);
-
#endif /* __PERF_TRACE_EVENT_PERL_H */
diff --git a/tools/perf/util/trace-event.h b/tools/perf/util/trace-event.h
index 6ad405620c9..aaf2da2d21e 100644
--- a/tools/perf/util/trace-event.h
+++ b/tools/perf/util/trace-event.h
@@ -279,7 +279,14 @@ struct scripting_ops {
int script_spec_register(const char *spec, struct scripting_ops *ops);
-extern struct scripting_ops perl_scripting_ops;
void setup_perl_scripting(void);
+struct scripting_context {
+ void *event_data;
+};
+
+int common_pc(struct scripting_context *context);
+int common_flags(struct scripting_context *context);
+int common_lock_depth(struct scripting_context *context);
+
#endif /* __PERF_TRACE_EVENTS_H */