Lines Matching full:plugin
31 char *plugin; member
95 * tep_plugin_list_options - get list of plugin options
98 * plugin options in the format of <plugin>:<option>. This list can be
164 char *plugin; in update_option() local
168 plugin = strdup(option->plugin_alias); in update_option()
169 if (!plugin) in update_option()
173 plugin = strdup(file); in update_option()
174 if (!plugin) in update_option()
176 p = strstr(plugin, "."); in update_option()
183 if (!op->plugin) in update_option()
185 if (strcmp(op->plugin, plugin) != 0) in update_option()
198 if (op->plugin) in update_option()
208 free(plugin); in update_option()
213 * tep_plugin_add_options - Add a set of options by a plugin
214 * @name: The name of the plugin adding the options
239 * tep_plugin_remove_options - remove plugin options that were registered
257 static int parse_option_name(char **option, char **plugin) in parse_option_name() argument
261 *plugin = NULL; in parse_option_name()
264 *plugin = *option; in parse_option_name()
274 find_registered_option(const char *plugin, const char *option) in find_registered_option() argument
287 if (plugin && strcmp(plugin, op_plugin) != 0) in find_registered_option()
299 static int process_option(const char *plugin, const char *option, const char *val) in process_option() argument
303 op = find_registered_option(plugin, option); in process_option()
311 * tep_plugin_add_option - add an option/val pair to set plugin options
312 * @name: The name of the option (format: <plugin>:<option> or just <option>)
315 * Modify a plugin option. If @val is given than the value of the option
323 char *plugin; in tep_plugin_add_option() local
329 if (parse_option_name(&option_str, &plugin) < 0) in tep_plugin_add_option()
335 if ((!plugin || !op->plugin) && plugin != op->plugin) in tep_plugin_add_option()
337 if (plugin && strcmp(plugin, op->plugin) != 0) in tep_plugin_add_option()
351 /* plugin and option_str don't get freed at the end */ in tep_plugin_add_option()
352 free(plugin); in tep_plugin_add_option()
355 plugin = op->plugin; in tep_plugin_add_option()
366 op->plugin = plugin; in tep_plugin_add_option()
379 return process_option(plugin, option_str, val); in tep_plugin_add_option()
382 free(plugin); in tep_plugin_add_option()
395 * tep_plugin_print_options - print out the registered plugin options
396 * @s: The trace_seq descriptor to write the plugin options into
412 print_op_data(s, "plugin", op->plugin_alias); in tep_plugin_print_options()
451 char *plugin; in load_plugin() local
455 ret = asprintf(&plugin, "%s/%s", path, file); in load_plugin()
457 warning("could not allocate plugin memory\n"); in load_plugin()
461 handle = dlopen(plugin, RTLD_NOW | RTLD_GLOBAL); in load_plugin()
463 warning("could not load plugin '%s'\n%s\n", in load_plugin()
464 plugin, dlerror()); in load_plugin()
484 warning("could not find func '%s' in plugin '%s'\n%s\n", in load_plugin()
485 TEP_PLUGIN_LOADER_NAME, plugin, dlerror()); in load_plugin()
491 warning("could not allocate plugin memory\n"); in load_plugin()
497 list->name = plugin; in load_plugin()
500 pr_stat("registering plugin: %s", plugin); in load_plugin()
505 free(plugin); in load_plugin()
551 * tep_load_plugins_hook - call a user specified callback to load a plugin
553 * @suffix: filter only plugin files with given suffix
554 * @load_plugin: user specified callback, called for each plugin file
557 * Searches for traceevent plugin files and calls @load_plugin for each
592 * If a system plugin directory was defined, in tep_load_plugins_hook()
602 * Next let the environment-set plugin directory in tep_load_plugins_hook()
619 warning("could not allocate plugin memory\n"); in tep_load_plugins_hook()
647 * tep_add_plugin_path - Add a new plugin directory.
649 * @path: Path to a directory. All plugin files in that