[tip: perf/core] libtraceevent: Remove tep_register_trace_clock()

From: tip-bot2 for Tzvetomir Stoyanov
Date: Mon Sep 02 2019 - 04:16:55 EST


The following commit has been merged into the perf/core branch of tip:

Commit-ID: 5d6552ab3b71fac48a9c7452c7014d37ca80b17f
Gitweb: https://git.kernel.org/tip/5d6552ab3b71fac48a9c7452c7014d37ca80b17f
Author: Tzvetomir Stoyanov <tstoyanov@xxxxxxxxxx>
AuthorDate: Mon, 05 Aug 2019 16:43:14 -04:00
Committer: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
CommitterDate: Sat, 31 Aug 2019 22:19:28 -03:00

libtraceevent: Remove tep_register_trace_clock()

The tep_register_trace_clock() API is used to instruct the traceevent
library how to print the event time stamps. As event print interface if
redesigned, this API is not needed any more. The new event print API is
flexible and the user can specify how the time stamps are printed.

Signed-off-by: Tzvetomir Stoyanov <tstoyanov@xxxxxxxxxx>
Cc: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Cc: Jiri Olsa <jolsa@xxxxxxxxxx>
Cc: Namhyung Kim <namhyung@xxxxxxxxxx>
Cc: Patrick McLean <chutzpah@xxxxxxxxxx>
Cc: linux-trace-devel@xxxxxxxxxxxxxxx
Link: http://lore.kernel.org/linux-trace-devel/20190801074959.22023-3-tz.stoyanov@xxxxxxxxx
Link: http://lore.kernel.org/lkml/20190805204355.195042846@xxxxxxxxxxx
Signed-off-by: Steven Rostedt (VMware) <rostedt@xxxxxxxxxxx>
Signed-off-by: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
---
tools/lib/traceevent/event-parse-local.h | 2 --
tools/lib/traceevent/event-parse.c | 11 -----------
tools/lib/traceevent/event-parse.h | 1 -
3 files changed, 14 deletions(-)

diff --git a/tools/lib/traceevent/event-parse-local.h b/tools/lib/traceevent/event-parse-local.h
index 6e58ee1..cee4698 100644
--- a/tools/lib/traceevent/event-parse-local.h
+++ b/tools/lib/traceevent/event-parse-local.h
@@ -81,8 +81,6 @@ struct tep_handle {

/* cache */
struct tep_event *last_event;
-
- char *trace_clock;
};

void tep_free_event(struct tep_event *event);
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index d1085aa..bb22238 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -393,16 +393,6 @@ int tep_override_comm(struct tep_handle *tep, const char *comm, int pid)
return _tep_register_comm(tep, comm, pid, true);
}

-int tep_register_trace_clock(struct tep_handle *tep, const char *trace_clock)
-{
- tep->trace_clock = strdup(trace_clock);
- if (!tep->trace_clock) {
- errno = ENOMEM;
- return -1;
- }
- return 0;
-}
-
struct func_map {
unsigned long long addr;
char *func;
@@ -7057,7 +7047,6 @@ void tep_free(struct tep_handle *tep)
free_handler(handle);
}

- free(tep->trace_clock);
free(tep->events);
free(tep->sort_events);
free(tep->func_resolver);
diff --git a/tools/lib/traceevent/event-parse.h b/tools/lib/traceevent/event-parse.h
index cf7f302..d438ee4 100644
--- a/tools/lib/traceevent/event-parse.h
+++ b/tools/lib/traceevent/event-parse.h
@@ -435,7 +435,6 @@ int tep_set_function_resolver(struct tep_handle *tep,
void tep_reset_function_resolver(struct tep_handle *tep);
int tep_register_comm(struct tep_handle *tep, const char *comm, int pid);
int tep_override_comm(struct tep_handle *tep, const char *comm, int pid);
-int tep_register_trace_clock(struct tep_handle *tep, const char *trace_clock);
int tep_register_function(struct tep_handle *tep, char *name,
unsigned long long addr, char *mod);
int tep_register_print_string(struct tep_handle *tep, const char *fmt,