• Home
  • Raw
  • Download

Lines Matching refs:op

56 static int update_option_value(struct tep_plugin_option *op, const char *val)  in update_option_value()  argument
62 if (op->value) in update_option_value()
65 op->set ^= 1; in update_option_value()
73 if (op->value) { in update_option_value()
74 op->value = val; in update_option_value()
86 op->set = 1; in update_option_value()
88 op->set = 0; in update_option_value()
109 struct tep_plugin_option *op; in tep_plugin_list_options() local
115 for (op = reg->options; op->name; op++) { in tep_plugin_list_options()
116 char *alias = op->plugin_alias ? op->plugin_alias : op->file; in tep_plugin_list_options()
120 ret = asprintf(&name, "%s:%s", alias, op->name); in tep_plugin_list_options()
163 struct trace_plugin_options *op; in update_option() local
182 for (op = trace_plugin_options; op; op = op->next) { in update_option()
183 if (!op->plugin) in update_option()
185 if (strcmp(op->plugin, plugin) != 0) in update_option()
187 if (strcmp(op->option, option->name) != 0) in update_option()
190 ret = update_option_value(option, op->value); in update_option()
197 for (op = trace_plugin_options; op; op = op->next) { in update_option()
198 if (op->plugin) in update_option()
200 if (strcmp(op->option, option->name) != 0) in update_option()
203 ret = update_option_value(option, op->value); in update_option()
277 struct tep_plugin_option *op; in find_registered_option() local
281 for (op = reg->options; op->name; op++) { in find_registered_option()
282 if (op->plugin_alias) in find_registered_option()
283 op_plugin = op->plugin_alias; in find_registered_option()
285 op_plugin = op->file; in find_registered_option()
289 if (strcmp(option, op->name) != 0) in find_registered_option()
292 return op; in find_registered_option()
301 struct tep_plugin_option *op; in process_option() local
303 op = find_registered_option(plugin, option); in process_option()
304 if (!op) in process_option()
307 return update_option_value(op, val); in process_option()
321 struct trace_plugin_options *op; in tep_plugin_add_option() local
333 for (op = trace_plugin_options; op; op = op->next) { 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()
339 if (strcmp(op->option, option_str) != 0) in tep_plugin_add_option()
343 free(op->value); in tep_plugin_add_option()
345 op->value = strdup(val); in tep_plugin_add_option()
346 if (!op->value) in tep_plugin_add_option()
349 op->value = NULL; in tep_plugin_add_option()
355 plugin = op->plugin; in tep_plugin_add_option()
356 option_str = op->option; in tep_plugin_add_option()
361 if (!op) { in tep_plugin_add_option()
362 op = malloc(sizeof(*op)); in tep_plugin_add_option()
363 if (!op) in tep_plugin_add_option()
365 memset(op, 0, sizeof(*op)); in tep_plugin_add_option()
366 op->plugin = plugin; in tep_plugin_add_option()
367 op->option = option_str; in tep_plugin_add_option()
369 op->value = strdup(val); in tep_plugin_add_option()
370 if (!op->value) { in tep_plugin_add_option()
371 free(op); in tep_plugin_add_option()
375 op->next = trace_plugin_options; in tep_plugin_add_option()
376 trace_plugin_options = op; in tep_plugin_add_option()
388 const char *op) in print_op_data() argument
390 if (op) in print_op_data()
391 trace_seq_printf(s, "%8s:\t%s\n", name, op); in print_op_data()
403 struct tep_plugin_option *op; in tep_plugin_print_options() local
408 for (op = reg->options; op->name; op++) { in tep_plugin_print_options()
409 if (op != reg->options) in tep_plugin_print_options()
411 print_op_data(s, "file", op->file); in tep_plugin_print_options()
412 print_op_data(s, "plugin", op->plugin_alias); in tep_plugin_print_options()
413 print_op_data(s, "option", op->name); in tep_plugin_print_options()
414 print_op_data(s, "desc", op->description); in tep_plugin_print_options()
415 print_op_data(s, "value", op->value); in tep_plugin_print_options()
416 trace_seq_printf(s, "%8s:\t%d\n", "set", op->set); in tep_plugin_print_options()