Lines Matching defs:plugin

31 	char				*plugin;
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;
168 plugin = strdup(option->plugin_alias);
169 if (!plugin)
173 plugin = strdup(file);
174 if (!plugin)
176 p = strstr(plugin, ".");
183 if (!op->plugin)
185 if (strcmp(op->plugin, plugin) != 0)
198 if (op->plugin)
208 free(plugin);
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)
261 *plugin = NULL;
264 *plugin = *option;
274 find_registered_option(const char *plugin, const char *option)
287 if (plugin && strcmp(plugin, op_plugin) != 0)
299 static int process_option(const char *plugin, const char *option, const char *val)
303 op = find_registered_option(plugin, 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;
329 if (parse_option_name(&option_str, &plugin) < 0)
335 if ((!plugin || !op->plugin) && plugin != op->plugin)
337 if (plugin && strcmp(plugin, op->plugin) != 0)
351 /* plugin and option_str don't get freed at the end */
352 free(plugin);
355 plugin = op->plugin;
366 op->plugin = plugin;
379 return process_option(plugin, option_str, val);
382 free(plugin);
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);
451 char *plugin;
455 ret = asprintf(&plugin, "%s/%s", path, file);
457 warning("could not allocate plugin memory\n");
461 handle = dlopen(plugin, RTLD_NOW | RTLD_GLOBAL);
463 warning("could not load plugin '%s'\n%s\n",
464 plugin, dlerror());
484 warning("could not find func '%s' in plugin '%s'\n%s\n",
485 TEP_PLUGIN_LOADER_NAME, plugin, dlerror());
491 warning("could not allocate plugin memory\n");
497 list->name = plugin;
500 pr_stat("registering plugin: %s", plugin);
505 free(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,
602 * Next let the environment-set plugin directory
619 warning("could not allocate plugin memory\n");
647 * tep_add_plugin_path - Add a new plugin directory.
649 * @path: Path to a directory. All plugin files in that