mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 18:51:56 -04:00
tools lib traceevent: Make plugin unload function receive pevent
The PEVENT_PLUGIN_UNLOADER function might need some cleanup using pevent like unregister some handlers. So pass pevent as argument. Signed-off-by: Namhyung Kim <[email protected]> Reviewed-by: Jiri Olsa <[email protected]> Acked-by: Steven Rostedt <[email protected]> Cc: Frederic Weisbecker <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Jiri Olsa <[email protected]> Cc: Namhyung Kim <[email protected]> Cc: Peter Zijlstra <[email protected]> Cc: Steven Rostedt <[email protected]> Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Arnaldo Carvalho de Melo <[email protected]>
This commit is contained in:
parent
e825e756f8
commit
8d0c2224ca
4 changed files with 8 additions and 7 deletions
|
|
@ -105,7 +105,7 @@ typedef int (*pevent_event_handler_func)(struct trace_seq *s,
|
|||
void *context);
|
||||
|
||||
typedef int (*pevent_plugin_load_func)(struct pevent *pevent);
|
||||
typedef int (*pevent_plugin_unload_func)(void);
|
||||
typedef int (*pevent_plugin_unload_func)(struct pevent *pevent);
|
||||
|
||||
struct plugin_option {
|
||||
struct plugin_option *next;
|
||||
|
|
@ -130,7 +130,7 @@ struct plugin_option {
|
|||
* PEVENT_PLUGIN_UNLOADER: (optional)
|
||||
* The function called just before unloading
|
||||
*
|
||||
* int PEVENT_PLUGIN_UNLOADER(void)
|
||||
* int PEVENT_PLUGIN_UNLOADER(struct pevent *pevent)
|
||||
*
|
||||
* PEVENT_PLUGIN_OPTIONS: (optional)
|
||||
* Plugin options that can be set before loading
|
||||
|
|
@ -411,7 +411,8 @@ enum pevent_errno {
|
|||
struct plugin_list;
|
||||
|
||||
struct plugin_list *traceevent_load_plugins(struct pevent *pevent);
|
||||
void traceevent_unload_plugins(struct plugin_list *plugin_list);
|
||||
void traceevent_unload_plugins(struct plugin_list *plugin_list,
|
||||
struct pevent *pevent);
|
||||
|
||||
struct cmdline;
|
||||
struct cmdline_list;
|
||||
|
|
|
|||
|
|
@ -197,7 +197,7 @@ traceevent_load_plugins(struct pevent *pevent)
|
|||
}
|
||||
|
||||
void
|
||||
traceevent_unload_plugins(struct plugin_list *plugin_list)
|
||||
traceevent_unload_plugins(struct plugin_list *plugin_list, struct pevent *pevent)
|
||||
{
|
||||
pevent_plugin_unload_func func;
|
||||
struct plugin_list *list;
|
||||
|
|
@ -207,7 +207,7 @@ traceevent_unload_plugins(struct plugin_list *plugin_list)
|
|||
plugin_list = list->next;
|
||||
func = dlsym(list->handle, PEVENT_PLUGIN_UNLOADER_NAME);
|
||||
if (func)
|
||||
func();
|
||||
func(pevent);
|
||||
dlclose(list->handle);
|
||||
free(list->name);
|
||||
free(list);
|
||||
|
|
|
|||
|
|
@ -144,7 +144,7 @@ int PEVENT_PLUGIN_LOADER(struct pevent *pevent)
|
|||
return 0;
|
||||
}
|
||||
|
||||
void PEVENT_PLUGIN_UNLOADER(void)
|
||||
void PEVENT_PLUGIN_UNLOADER(struct pevent *pevent)
|
||||
{
|
||||
int i, x;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue