Re: [PATCH 03/24] tools/lib/traceevent, tools/perf: Rename pevent plugin related APIs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed,  1 Aug 2018 15:41:35 +0300
"Tzvetomir Stoyanov (VMware)" <tz.stoyanov@xxxxxxxxx> wrote:

> 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
> the pevent plugin related API.
> 
> Signed-off-by: Tzvetomir Stoyanov (VMware) <tz.stoyanov@xxxxxxxxx>
> ---
>  tools/lib/traceevent/event-parse.c         |  8 ++--
>  tools/lib/traceevent/event-parse.h         | 50 +++++++++++-----------
>  tools/lib/traceevent/event-plugin.c        | 24 +++++------
>  tools/lib/traceevent/plugin_cfg80211.c     |  4 +-
>  tools/lib/traceevent/plugin_function.c     | 10 ++---
>  tools/lib/traceevent/plugin_hrtimer.c      |  4 +-
>  tools/lib/traceevent/plugin_jbd2.c         |  4 +-
>  tools/lib/traceevent/plugin_kmem.c         |  4 +-
>  tools/lib/traceevent/plugin_kvm.c          |  4 +-
>  tools/lib/traceevent/plugin_mac80211.c     |  4 +-
>  tools/lib/traceevent/plugin_sched_switch.c |  4 +-
>  tools/lib/traceevent/plugin_scsi.c         |  4 +-
>  tools/lib/traceevent/plugin_xen.c          |  4 +-
>  13 files changed, 64 insertions(+), 64 deletions(-)
> 
> diff --git a/tools/lib/traceevent/event-parse.c b/tools/lib/traceevent/event-parse.c
> index 90f30f9dde14..5f8019773673 100644
> --- a/tools/lib/traceevent/event-parse.c
> +++ b/tools/lib/traceevent/event-parse.c
> @@ -88,7 +88,7 @@ struct event_handler {
>  	int				id;
>  	const char			*sys_name;
>  	const char			*event_name;
> -	pevent_event_handler_func	func;
> +	tep_event_handler_func	func;

You want to make sure that when things change, you keep the formatting
in sync. This makes it a bit more tedious, as you need to scan the
code. The above causes "func" to no longer be in line with the rest of
the data structure. Note, this is a common error with changes like
this, especially when they affect a lot of files like this change set
does.

You may want to scan all the code that was changed to make sure that
there's no other modifications of formats caused by name changes.

Thanks!

-- Steve



>  	void				*context;
>  };
>  
> @@ -6633,7 +6633,7 @@ static struct event_format *pevent_search_event(struct tep_handle *pevent, int i



[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux