tools lib traceevent, perf tools: Split trace-seq related APIs in a separate header file
PATCH 1/1 tools lib traceevent, perf tools: Split trace-seq related APIs in a separate header file
From: "Tzvetomir Stoyanov (VMware)" <[email protected]>
In order to make libtraceevent into a proper library, all its APIs should be defined in corresponding header files. This patch splits trace-seq related APIs in a separate header file: trace-seq.h
--- tools/lib/traceevent/event-parse.c | 1 + tools/lib/traceevent/event-parse.h | 46 ++----------------------- tools/lib/traceevent/event-plugin.c | 1 + tools/lib/traceevent/plugin_function.c | 1 + tools/lib/traceevent/plugin_hrtimer.c | 1 + tools/lib/traceevent/plugin_jbd2.c | 1 + tools/lib/traceevent/plugin_kmem.c | 1 + tools/lib/traceevent/plugin_kvm.c | 1 + tools/lib/traceevent/plugin_mac80211.c | 1 + tools/lib/traceevent/plugin_sched_switch.c | 1 + tools/lib/traceevent/plugin_scsi.c | 1 + tools/lib/traceevent/plugin_xen.c | 1 + tools/lib/traceevent/trace-seq.c | 2 ++ tools/lib/traceevent/trace-seq.h | 55 ++++++++++++++++++++++++++++++ tools/perf/util/trace-event.h | 1 + 15 files changed, 71 insertions(+), 44 deletions(-) create mode 100644 tools/lib/traceevent/trace-seq.h
tools/lib/traceevent/event-parse.c +1 -0
@@ -24,6 +24,7 @@#include <netinet/in.h> #include "event-parse.h" #include "event-utils.h" +#include "trace-seq.h" static const char *input_buf;static unsigned long long input_buf_ptr;
tools/lib/traceevent/event-parse.h +2 -44
62 lines not on this page · raw message
tools/lib/traceevent/event-plugin.c +1 -0
@@ -15,6 +15,7 @@#include <dirent.h> #include "event-parse.h" #include "event-utils.h" +#include "trace-seq.h" #define LOCAL_PLUGIN_DIR ".traceevent/plugins"
tools/lib/traceevent/plugin_function.c +1 -0
@@ -23,6 +23,7 @@#include "event-parse.h" #include "event-utils.h" +#include "trace-seq.h" static struct func_stack { int size;
tools/lib/traceevent/plugin_hrtimer.c +1 -0
@@ -23,6 +23,7 @@#include <string.h> #include "event-parse.h" +#include "trace-seq.h" static int timer_expire_handler(struct trace_seq *s, struct tep_record *record,
tools/lib/traceevent/plugin_jbd2.c +1 -0
@@ -22,6 +22,7 @@#include <string.h> #include "event-parse.h" +#include "trace-seq.h" #define MINORBITS 20#define MINORMASK ((1U << MINORBITS) - 1)
tools/lib/traceevent/plugin_kmem.c +1 -0
@@ -22,6 +22,7 @@#include <string.h> #include "event-parse.h" +#include "trace-seq.h" static int call_site_handler (struct trace_seq *s,struct tep_record *record,struct event_format *event,void *context)
tools/lib/traceevent/plugin_kvm.c +1 -0
@@ -23,6 +23,7 @@#include <stdint.h> #include "event-parse.h" +#include "trace-seq.h" #ifdef HAVE_UDIS86
tools/lib/traceevent/plugin_mac80211.c +1 -0
@@ -22,6 +22,7 @@#include <string.h> #include "event-parse.h" +#include "trace-seq.h" #define INDENT 65
tools/lib/traceevent/plugin_sched_switch.c +1 -0
@@ -22,6 +22,7 @@#include <string.h> #include "event-parse.h" +#include "trace-seq.h" static void write_state (struct trace_seq *s,int val) {
tools/lib/traceevent/plugin_scsi.c +1 -0
@@ -3,6 +3,7 @@#include <string.h> #include <inttypes.h> #include "event-parse.h" +#include "trace-seq.h" typedef unsigned long sector_t ;typedef uint64_t u64 ;
tools/lib/traceevent/plugin_xen.c +1 -0
@@ -3,6 +3,7 @@#include <stdlib.h> #include <string.h> #include "event-parse.h" +#include "trace-seq.h" #define __HYPERVISOR_set_trap_table 0#define __HYPERVISOR_mmu_update 1
tools/lib/traceevent/trace-seq.c +2 -0
@@ -3,6 +3,8 @@* Copyright (C) 2009 Red Hat Inc, Steven Rostedt <[email protected]> * */ +#include "trace-seq.h" +#include <stdio.h> #include <stdlib.h> #include <string.h>
tools/lib/traceevent/trace-seq.h new file +55 -0
55 lines not on this page · raw message
tools/perf/util/trace-event.h +1 -0
@@ -3,6 +3,7 @@#define _PERF_UTIL_TRACE_EVENT_H#include <traceevent/event-parse.h> +#include <traceevent/trace-seq.h> #include "parse-events.h" struct machine ;
Signature · 1 line
2.13.6
tip-bot for Tzvetomir Stoyanov (VMware)
merge bottools lib traceevent, perf tools: Split trace-seq related APIs in a separate header file
Commit-ID: 266b851cc2874774a59f04a7b3b059ca0f26569b Gitweb: https://git.kernel.org/tip/266b851cc2874774a59f04a7b3b059ca0f26569b Author: Tzvetomir Stoyanov (VMware) <[email protected]> AuthorDate: Tue, 28 Aug 2018 18:50:38 -0400 Committer: Arnaldo Carvalho de Melo <[email protected]> CommitDate: Thu, 30 Aug 2018 15:52:20 -0300
tools lib traceevent, perf tools: Split trace-seq related APIs in a separate header file
In order to make libtraceevent into a proper library, all its APIs should be defined in corresponding header files. This patch splits trace-seq related APIs in a separate header file: trace-seq.h
--- tools/lib/traceevent/event-parse.c | 1 + tools/lib/traceevent/event-parse.h | 46 ++----------------------- tools/lib/traceevent/event-plugin.c | 1 + tools/lib/traceevent/plugin_function.c | 1 + tools/lib/traceevent/plugin_hrtimer.c | 1 + tools/lib/traceevent/plugin_jbd2.c | 1 + tools/lib/traceevent/plugin_kmem.c | 1 + tools/lib/traceevent/plugin_kvm.c | 1 + tools/lib/traceevent/plugin_mac80211.c | 1 + tools/lib/traceevent/plugin_sched_switch.c | 1 + tools/lib/traceevent/plugin_scsi.c | 1 + tools/lib/traceevent/plugin_xen.c | 1 + tools/lib/traceevent/trace-seq.c | 2 ++ tools/lib/traceevent/trace-seq.h | 55 ++++++++++++++++++++++++++++++ tools/perf/util/trace-event.h | 1 + 15 files changed, 71 insertions(+), 44 deletions(-)
tools/lib/traceevent/event-parse.c +1 -0
@@ -24,6 +24,7 @@#include <netinet/in.h> #include "event-parse.h" #include "event-utils.h" +#include "trace-seq.h" static const char *input_buf;static unsigned long long input_buf_ptr;
tools/lib/traceevent/event-parse.h +2 -44
62 lines not on this page · raw message
tools/lib/traceevent/event-plugin.c +1 -0
@@ -15,6 +15,7 @@#include <dirent.h> #include "event-parse.h" #include "event-utils.h" +#include "trace-seq.h" #define LOCAL_PLUGIN_DIR ".traceevent/plugins"
tools/lib/traceevent/plugin_function.c +1 -0
@@ -23,6 +23,7 @@#include "event-parse.h" #include "event-utils.h" +#include "trace-seq.h" static struct func_stack { int size;
tools/lib/traceevent/plugin_hrtimer.c +1 -0
@@ -23,6 +23,7 @@#include <string.h> #include "event-parse.h" +#include "trace-seq.h" static int timer_expire_handler(struct trace_seq *s, struct tep_record *record,
tools/lib/traceevent/plugin_jbd2.c +1 -0
@@ -22,6 +22,7 @@#include <string.h> #include "event-parse.h" +#include "trace-seq.h" #define MINORBITS 20#define MINORMASK ((1U << MINORBITS) - 1)
tools/lib/traceevent/plugin_kmem.c +1 -0
@@ -22,6 +22,7 @@#include <string.h> #include "event-parse.h" +#include "trace-seq.h" static int call_site_handler (struct trace_seq *s,struct tep_record *record,struct event_format *event,void *context)
tools/lib/traceevent/plugin_kvm.c +1 -0
@@ -23,6 +23,7 @@#include <stdint.h> #include "event-parse.h" +#include "trace-seq.h" #ifdef HAVE_UDIS86
tools/lib/traceevent/plugin_mac80211.c +1 -0
@@ -22,6 +22,7 @@#include <string.h> #include "event-parse.h" +#include "trace-seq.h" #define INDENT 65
tools/lib/traceevent/plugin_sched_switch.c +1 -0
@@ -22,6 +22,7 @@#include <string.h> #include "event-parse.h" +#include "trace-seq.h" static void write_state (struct trace_seq *s,int val) {
tools/lib/traceevent/plugin_scsi.c +1 -0
@@ -3,6 +3,7 @@#include <string.h> #include <inttypes.h> #include "event-parse.h" +#include "trace-seq.h" typedef unsigned long sector_t ;typedef uint64_t u64 ;
tools/lib/traceevent/plugin_xen.c +1 -0
@@ -3,6 +3,7 @@#include <stdlib.h> #include <string.h> #include "event-parse.h" +#include "trace-seq.h" #define __HYPERVISOR_set_trap_table 0#define __HYPERVISOR_mmu_update 1
tools/lib/traceevent/trace-seq.c +2 -0
@@ -3,6 +3,8 @@* Copyright (C) 2009 Red Hat Inc, Steven Rostedt <[email protected]> * */ +#include "trace-seq.h" +#include <stdio.h> #include <stdlib.h> #include <string.h>
tools/lib/traceevent/trace-seq.h new file +55 -0
55 lines not on this page · raw message
tools/perf/util/trace-event.h +1 -0
@@ -3,6 +3,7 @@#define _PERF_UTIL_TRACE_EVENT_H#include <traceevent/event-parse.h> +#include <traceevent/trace-seq.h> #include "parse-events.h" struct machine ;