summaryrefslogtreecommitdiff
path: root/tools/lib/traceevent/plugin_function.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-08-26 11:25:21 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2018-08-26 11:25:21 -0700
commitd207ea8e74ff45be0838afa12bdd2492fa9dc8bc (patch)
tree97cfb3ed5c1bb42790e98e62b823526f61000b9f /tools/lib/traceevent/plugin_function.c
parent2a8a2b7c49d6eb5f3348892c4676267376cfd40b (diff)
parent66e5db4a1ccc64f278653bc69dc406d184dc750a (diff)
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf updates from Thomas Gleixner: "Kernel: - Improve kallsyms coverage - Add x86 entry trampolines to kcore - Fix ARM SPE handling - Correct PPC event post processing Tools: - Make the build system more robust - Small fixes and enhancements all over the place - Update kernel ABI header copies - Preparatory work for converting libtraceevnt to a shared library - License cleanups" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (100 commits) tools arch: Update arch/x86/lib/memcpy_64.S copy used in 'perf bench mem memcpy' tools arch x86: Update tools's copy of cpufeatures.h perf python: Fix pyrf_evlist__read_on_cpu() interface perf mmap: Store real cpu number in 'struct perf_mmap' perf tools: Remove ext from struct kmod_path perf tools: Add gzip_is_compressed function perf tools: Add lzma_is_compressed function perf tools: Add is_compressed callback to compressions array perf tools: Move the temp file processing into decompress_kmodule perf tools: Use compression id in decompress_kmodule() perf tools: Store compression id into struct dso perf tools: Add compression id into 'struct kmod_path' perf tools: Make is_supported_compression() static perf tools: Make decompress_to_file() function static perf tools: Get rid of dso__needs_decompress() call in __open_dso() perf tools: Get rid of dso__needs_decompress() call in symbol__disassemble() perf tools: Get rid of dso__needs_decompress() call in read_object_code() tools lib traceevent: Change to SPDX License format perf llvm: Allow passing options to llc in addition to clang perf parser: Improve error message for PMU address filters ...
Diffstat (limited to 'tools/lib/traceevent/plugin_function.c')
-rw-r--r--tools/lib/traceevent/plugin_function.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/tools/lib/traceevent/plugin_function.c b/tools/lib/traceevent/plugin_function.c
index 42dbf73758f3..424747475d37 100644
--- a/tools/lib/traceevent/plugin_function.c
+++ b/tools/lib/traceevent/plugin_function.c
@@ -33,7 +33,7 @@ static int cpus = -1;
#define STK_BLK 10
-struct pevent_plugin_option plugin_options[] =
+struct tep_plugin_option plugin_options[] =
{
{
.name = "parent",
@@ -53,8 +53,8 @@ struct pevent_plugin_option plugin_options[] =
}
};
-static struct pevent_plugin_option *ftrace_parent = &plugin_options[0];
-static struct pevent_plugin_option *ftrace_indent = &plugin_options[1];
+static struct tep_plugin_option *ftrace_parent = &plugin_options[0];
+static struct tep_plugin_option *ftrace_indent = &plugin_options[1];
static void add_child(struct func_stack *stack, const char *child, int pos)
{
@@ -122,25 +122,25 @@ static int add_and_get_index(const char *parent, const char *child, int cpu)
return 0;
}
-static int function_handler(struct trace_seq *s, struct pevent_record *record,
+static int function_handler(struct trace_seq *s, struct tep_record *record,
struct event_format *event, void *context)
{
- struct pevent *pevent = event->pevent;
+ struct tep_handle *pevent = event->pevent;
unsigned long long function;
unsigned long long pfunction;
const char *func;
const char *parent;
int index = 0;
- if (pevent_get_field_val(s, event, "ip", record, &function, 1))
+ if (tep_get_field_val(s, event, "ip", record, &function, 1))
return trace_seq_putc(s, '!');
- func = pevent_find_function(pevent, function);
+ func = tep_find_function(pevent, function);
- if (pevent_get_field_val(s, event, "parent_ip", record, &pfunction, 1))
+ if (tep_get_field_val(s, event, "parent_ip", record, &pfunction, 1))
return trace_seq_putc(s, '!');
- parent = pevent_find_function(pevent, pfunction);
+ parent = tep_find_function(pevent, pfunction);
if (parent && ftrace_indent->set)
index = add_and_get_index(parent, func, record->cpu);
@@ -163,22 +163,22 @@ static int function_handler(struct trace_seq *s, struct pevent_record *record,
return 0;
}
-int PEVENT_PLUGIN_LOADER(struct pevent *pevent)
+int TEP_PLUGIN_LOADER(struct tep_handle *pevent)
{
- pevent_register_event_handler(pevent, -1, "ftrace", "function",
- function_handler, NULL);
+ tep_register_event_handler(pevent, -1, "ftrace", "function",
+ function_handler, NULL);
- traceevent_plugin_add_options("ftrace", plugin_options);
+ tep_plugin_add_options("ftrace", plugin_options);
return 0;
}
-void PEVENT_PLUGIN_UNLOADER(struct pevent *pevent)
+void TEP_PLUGIN_UNLOADER(struct tep_handle *pevent)
{
int i, x;
- pevent_unregister_event_handler(pevent, -1, "ftrace", "function",
- function_handler, NULL);
+ tep_unregister_event_handler(pevent, -1, "ftrace", "function",
+ function_handler, NULL);
for (i = 0; i <= cpus; i++) {
for (x = 0; x < fstack[i].size && fstack[i].stack[x]; x++)
@@ -186,7 +186,7 @@ void PEVENT_PLUGIN_UNLOADER(struct pevent *pevent)
free(fstack[i].stack);
}
- traceevent_plugin_remove_options(plugin_options);
+ tep_plugin_remove_options(plugin_options);
free(fstack);
fstack = NULL;