Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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@vmware.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Jiri Olsa <jolsa@redhat.com>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Patrick McLean <chutzpah@gentoo.org>
Cc: linux-trace-devel@vger.kernel.org
Link: http://lore.kernel.org/linux-trace-devel/20190801074959.22023-3-tz.stoyanov@gmail.com
Link: http://lore.kernel.org/lkml/20190805204355.195042846@goodmis.org
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Tzvetomir Stoyanov and committed by
Arnaldo Carvalho de Melo
5d6552ab 38847db9

-14
-2
tools/lib/traceevent/event-parse-local.h
··· 81 81 82 82 /* cache */ 83 83 struct tep_event *last_event; 84 - 85 - char *trace_clock; 86 84 }; 87 85 88 86 void tep_free_event(struct tep_event *event);
-11
tools/lib/traceevent/event-parse.c
··· 393 393 return _tep_register_comm(tep, comm, pid, true); 394 394 } 395 395 396 - int tep_register_trace_clock(struct tep_handle *tep, const char *trace_clock) 397 - { 398 - tep->trace_clock = strdup(trace_clock); 399 - if (!tep->trace_clock) { 400 - errno = ENOMEM; 401 - return -1; 402 - } 403 - return 0; 404 - } 405 - 406 396 struct func_map { 407 397 unsigned long long addr; 408 398 char *func; ··· 7047 7057 free_handler(handle); 7048 7058 } 7049 7059 7050 - free(tep->trace_clock); 7051 7060 free(tep->events); 7052 7061 free(tep->sort_events); 7053 7062 free(tep->func_resolver);
-1
tools/lib/traceevent/event-parse.h
··· 435 435 void tep_reset_function_resolver(struct tep_handle *tep); 436 436 int tep_register_comm(struct tep_handle *tep, const char *comm, int pid); 437 437 int tep_override_comm(struct tep_handle *tep, const char *comm, int pid); 438 - int tep_register_trace_clock(struct tep_handle *tep, const char *trace_clock); 439 438 int tep_register_function(struct tep_handle *tep, char *name, 440 439 unsigned long long addr, char *mod); 441 440 int tep_register_print_string(struct tep_handle *tep, const char *fmt,