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 'enum pevent_flag' to 'enum tep_flag'

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 "pevent_". This changes
pevent_get_page_size API and enum pevent_flag to enum tep_flag

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.623942406@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
6fed932e fc9b6971

+11 -11
+1 -1
tools/lib/traceevent/event-parse.c
··· 5515 5515 } 5516 5516 5517 5517 if (use_usec_format) { 5518 - if (pevent->flags & PEVENT_NSEC_OUTPUT) { 5518 + if (pevent->flags & TEP_NSEC_OUTPUT) { 5519 5519 usecs = nsecs; 5520 5520 p = 9; 5521 5521 } else {
+5 -5
tools/lib/traceevent/event-parse.h
··· 373 373 PEVENT_FUNC_ARG_MAX_TYPES 374 374 }; 375 375 376 - enum pevent_flag { 377 - PEVENT_NSEC_OUTPUT = 1, /* output in NSECS */ 378 - PEVENT_DISABLE_SYS_PLUGINS = 1 << 1, 379 - PEVENT_DISABLE_PLUGINS = 1 << 2, 376 + enum tep_flag { 377 + TEP_NSEC_OUTPUT = 1, /* output in NSECS */ 378 + TEP_DISABLE_SYS_PLUGINS = 1 << 1, 379 + TEP_DISABLE_PLUGINS = 1 << 2, 380 380 }; 381 381 382 382 #define PEVENT_ERRORS \ ··· 751 751 pevent->long_size = long_size; 752 752 } 753 753 754 - static inline int pevent_get_page_size(struct tep_handle *pevent) 754 + static inline int tep_get_page_size(struct tep_handle *pevent) 755 755 { 756 756 return pevent->page_size; 757 757 }
+2 -2
tools/lib/traceevent/event-plugin.c
··· 390 390 char *envdir; 391 391 int ret; 392 392 393 - if (pevent->flags & PEVENT_DISABLE_PLUGINS) 393 + if (pevent->flags & TEP_DISABLE_PLUGINS) 394 394 return; 395 395 396 396 /* ··· 398 398 * check that first. 399 399 */ 400 400 #ifdef PLUGIN_DIR 401 - if (!(pevent->flags & PEVENT_DISABLE_SYS_PLUGINS)) 401 + if (!(pevent->flags & TEP_DISABLE_SYS_PLUGINS)) 402 402 load_plugins_dir(pevent, suffix, PLUGIN_DIR, 403 403 load_plugin, data); 404 404 #endif
+1 -1
tools/perf/builtin-kmem.c
··· 1974 1974 goto out_delete; 1975 1975 } 1976 1976 1977 - kmem_page_size = pevent_get_page_size(evsel->tp_format->pevent); 1977 + kmem_page_size = tep_get_page_size(evsel->tp_format->pevent); 1978 1978 symbol_conf.use_callchain = true; 1979 1979 } 1980 1980
+1 -1
tools/perf/util/trace-event-read.c
··· 439 439 440 440 pevent = tevent->pevent; 441 441 442 - tep_set_flag(pevent, PEVENT_NSEC_OUTPUT); 442 + tep_set_flag(pevent, TEP_NSEC_OUTPUT); 443 443 tep_set_file_bigendian(pevent, file_bigendian); 444 444 tep_set_host_bigendian(pevent, host_bigendian); 445 445
+1 -1
tools/perf/util/trace-event.c
··· 47 47 return -1; 48 48 49 49 pevent = tevent.pevent; 50 - tep_set_flag(pevent, PEVENT_NSEC_OUTPUT); 50 + tep_set_flag(pevent, TEP_NSEC_OUTPUT); 51 51 tep_set_file_bigendian(pevent, be); 52 52 tep_set_host_bigendian(pevent, be); 53 53 tevent_initialized = true;