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

tools lib traceevent, perf tools: Rename traceevent_* APIs

In order to make libtraceevent into a proper library, variables, data
structures and functions require a unique prefix to prevent name space
conflicts. That prefix will be "tep_" and not "traceevent_". This
changes APIs: traceevent_host_bigendian, traceevent_load_plugins and
traceevent_unload_plugins

Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Cc: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
Cc: linux-trace-devel@vger.kernel.org
Link: http://lkml.kernel.org/r/20180808180701.484691639@goodmis.org
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

authored by

Tzvetomir Stoyanov (VMware) and committed by
Arnaldo Carvalho de Melo
fc9b6971 ece2a4f4

+11 -11
+4 -4
tools/lib/traceevent/event-parse.h
··· 435 435 436 436 #define INVALID_PLUGIN_LIST_OPTION ((char **)((unsigned long)-1)) 437 437 438 - struct plugin_list *traceevent_load_plugins(struct tep_handle *pevent); 439 - void traceevent_unload_plugins(struct plugin_list *plugin_list, 440 - struct tep_handle *pevent); 438 + struct plugin_list *tep_load_plugins(struct tep_handle *pevent); 439 + void tep_unload_plugins(struct plugin_list *plugin_list, 440 + struct tep_handle *pevent); 441 441 char **traceevent_plugin_list_options(void); 442 442 void traceevent_plugin_free_options_list(char **list); 443 443 int traceevent_plugin_add_options(const char *name, ··· 597 597 __data2host8(pevent, __val); \ 598 598 }) 599 599 600 - static inline int traceevent_host_bigendian(void) 600 + static inline int tep_host_bigendian(void) 601 601 { 602 602 unsigned char str[] = { 0x1, 0x2, 0x3, 0x4 }; 603 603 unsigned int val;
+4 -4
tools/lib/traceevent/event-plugin.c
··· 264 264 * @s: the trace_seq descripter to write to 265 265 * @prefix: The prefix string to add before listing the option name 266 266 * @suffix: The suffix string ot append after the option name 267 - * @list: The list of plugins (usually returned by traceevent_load_plugins() 267 + * @list: The list of plugins (usually returned by tep_load_plugins() 268 268 * 269 269 * Writes to the trace_seq @s the list of plugins (files) that is 270 - * returned by traceevent_load_plugins(). Use @prefix and @suffix for formating: 270 + * returned by tep_load_plugins(). Use @prefix and @suffix for formating: 271 271 * @prefix = " ", @suffix = "\n". 272 272 */ 273 273 void traceevent_print_plugins(struct trace_seq *s, ··· 431 431 } 432 432 433 433 struct plugin_list* 434 - traceevent_load_plugins(struct tep_handle *pevent) 434 + tep_load_plugins(struct tep_handle *pevent) 435 435 { 436 436 struct plugin_list *list = NULL; 437 437 ··· 440 440 } 441 441 442 442 void 443 - traceevent_unload_plugins(struct plugin_list *plugin_list, struct tep_handle *pevent) 443 + tep_unload_plugins(struct plugin_list *plugin_list, struct tep_handle *pevent) 444 444 { 445 445 tep_plugin_unload_func func; 446 446 struct plugin_list *list;
+3 -3
tools/perf/util/trace-event.c
··· 31 31 struct tep_handle *pevent = tep_alloc(); 32 32 33 33 if (pevent) { 34 - t->plugin_list = traceevent_load_plugins(pevent); 34 + t->plugin_list = tep_load_plugins(pevent); 35 35 t->pevent = pevent; 36 36 } 37 37 ··· 40 40 41 41 static int trace_event__init2(void) 42 42 { 43 - int be = traceevent_host_bigendian(); 43 + int be = tep_host_bigendian(); 44 44 struct tep_handle *pevent; 45 45 46 46 if (trace_event__init(&tevent)) ··· 65 65 66 66 void trace_event__cleanup(struct trace_event *t) 67 67 { 68 - traceevent_unload_plugins(t->plugin_list, t->pevent); 68 + tep_unload_plugins(t->plugin_list, t->pevent); 69 69 tep_free(t->pevent); 70 70 } 71 71