aboutsummaryrefslogtreecommitdiffstats
path: root/tools/lib/traceevent
diff options
context:
space:
mode:
authorTzvetomir Stoyanov (VMware) <tz.stoyanov@gmail.com>2018-08-08 14:03:06 -0400
committerArnaldo Carvalho de Melo <acme@redhat.com>2018-08-13 14:35:02 -0400
commit413af01c8d9d5d688df3244401cbddfe98bafe2a (patch)
tree7eb354b28a4de95665cca2a84cd72c2e151bff3a /tools/lib/traceevent
parent610e1e4ff0431b3a86a0ebfcdb47828b8e082329 (diff)
tools lib traceevent: Rename various pevent get/set/is 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 "pevent_". This changes APIs: pevent_pid_is_registered, pevent_get_cpus, pevent_set_cpus, pevent_is_file_bigendian, pevent_is_host_bigendian, pevent_is_latency_format, pevent_set_latency_format 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/20180808180703.114110715@goodmis.org Signed-off-by: Steven Rostedt <rostedt@goodmis.org> Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/lib/traceevent')
-rw-r--r--tools/lib/traceevent/event-parse.c4
-rw-r--r--tools/lib/traceevent/event-parse.h14
-rw-r--r--tools/lib/traceevent/plugin_kvm.c4
3 files changed, 11 insertions, 11 deletions
diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
index 53d866434478..d367f7f2f2fc 100644
--- a/tools/lib/traceevent/event-parse.c
+++ b/tools/lib/traceevent/event-parse.c
@@ -211,14 +211,14 @@ static const char *find_cmdline(struct tep_handle *pevent, int pid)
211} 211}
212 212
213/** 213/**
214 * pevent_pid_is_registered - return if a pid has a cmdline registered 214 * tep_pid_is_registered - return if a pid has a cmdline registered
215 * @pevent: handle for the pevent 215 * @pevent: handle for the pevent
216 * @pid: The pid to check if it has a cmdline registered with. 216 * @pid: The pid to check if it has a cmdline registered with.
217 * 217 *
218 * Returns 1 if the pid has a cmdline mapped to it 218 * Returns 1 if the pid has a cmdline mapped to it
219 * 0 otherwise. 219 * 0 otherwise.
220 */ 220 */
221int pevent_pid_is_registered(struct tep_handle *pevent, int pid) 221int tep_pid_is_registered(struct tep_handle *pevent, int pid)
222{ 222{
223 const struct cmdline *comm; 223 const struct cmdline *comm;
224 struct cmdline key; 224 struct cmdline key;
diff --git a/tools/lib/traceevent/event-parse.h b/tools/lib/traceevent/event-parse.h
index 63ec6d419219..7f8921431cf1 100644
--- a/tools/lib/traceevent/event-parse.h
+++ b/tools/lib/traceevent/event-parse.h
@@ -624,7 +624,7 @@ int tep_register_function(struct tep_handle *pevent, char *name,
624 unsigned long long addr, char *mod); 624 unsigned long long addr, char *mod);
625int tep_register_print_string(struct tep_handle *pevent, const char *fmt, 625int tep_register_print_string(struct tep_handle *pevent, const char *fmt,
626 unsigned long long addr); 626 unsigned long long addr);
627int pevent_pid_is_registered(struct tep_handle *pevent, int pid); 627int tep_pid_is_registered(struct tep_handle *pevent, int pid);
628 628
629void tep_print_event_task(struct tep_handle *pevent, struct trace_seq *s, 629void tep_print_event_task(struct tep_handle *pevent, struct trace_seq *s,
630 struct event_format *event, 630 struct event_format *event,
@@ -731,12 +731,12 @@ struct event_format **pevent_list_events(struct tep_handle *pevent, enum event_s
731struct format_field **pevent_event_common_fields(struct event_format *event); 731struct format_field **pevent_event_common_fields(struct event_format *event);
732struct format_field **pevent_event_fields(struct event_format *event); 732struct format_field **pevent_event_fields(struct event_format *event);
733 733
734static inline int pevent_get_cpus(struct tep_handle *pevent) 734static inline int tep_get_cpus(struct tep_handle *pevent)
735{ 735{
736 return pevent->cpus; 736 return pevent->cpus;
737} 737}
738 738
739static inline void pevent_set_cpus(struct tep_handle *pevent, int cpus) 739static inline void tep_set_cpus(struct tep_handle *pevent, int cpus)
740{ 740{
741 pevent->cpus = cpus; 741 pevent->cpus = cpus;
742} 742}
@@ -761,7 +761,7 @@ static inline void tep_set_page_size(struct tep_handle *pevent, int _page_size)
761 pevent->page_size = _page_size; 761 pevent->page_size = _page_size;
762} 762}
763 763
764static inline int pevent_is_file_bigendian(struct tep_handle *pevent) 764static inline int tep_is_file_bigendian(struct tep_handle *pevent)
765{ 765{
766 return pevent->file_bigendian; 766 return pevent->file_bigendian;
767} 767}
@@ -771,7 +771,7 @@ static inline void tep_set_file_bigendian(struct tep_handle *pevent, int endian)
771 pevent->file_bigendian = endian; 771 pevent->file_bigendian = endian;
772} 772}
773 773
774static inline int pevent_is_host_bigendian(struct tep_handle *pevent) 774static inline int tep_is_host_bigendian(struct tep_handle *pevent)
775{ 775{
776 return pevent->host_bigendian; 776 return pevent->host_bigendian;
777} 777}
@@ -781,12 +781,12 @@ static inline void tep_set_host_bigendian(struct tep_handle *pevent, int endian)
781 pevent->host_bigendian = endian; 781 pevent->host_bigendian = endian;
782} 782}
783 783
784static inline int pevent_is_latency_format(struct tep_handle *pevent) 784static inline int tep_is_latency_format(struct tep_handle *pevent)
785{ 785{
786 return pevent->latency_format; 786 return pevent->latency_format;
787} 787}
788 788
789static inline void pevent_set_latency_format(struct tep_handle *pevent, int lat) 789static inline void tep_set_latency_format(struct tep_handle *pevent, int lat)
790{ 790{
791 pevent->latency_format = lat; 791 pevent->latency_format = lat;
792} 792}
diff --git a/tools/lib/traceevent/plugin_kvm.c b/tools/lib/traceevent/plugin_kvm.c
index 7ebe82bf19ce..1d0d15906225 100644
--- a/tools/lib/traceevent/plugin_kvm.c
+++ b/tools/lib/traceevent/plugin_kvm.c
@@ -388,8 +388,8 @@ static int kvm_mmu_print_role(struct trace_seq *s, struct tep_record *record,
388 * We can only use the structure if file is of the same 388 * We can only use the structure if file is of the same
389 * endianess. 389 * endianess.
390 */ 390 */
391 if (pevent_is_file_bigendian(event->pevent) == 391 if (tep_is_file_bigendian(event->pevent) ==
392 pevent_is_host_bigendian(event->pevent)) { 392 tep_is_host_bigendian(event->pevent)) {
393 393
394 trace_seq_printf(s, "%u q%u%s %s%s %spae %snxe %swp%s%s%s", 394 trace_seq_printf(s, "%u q%u%s %s%s %spae %snxe %swp%s%s%s",
395 role.level, 395 role.level,