diff options
| author | Ingo Molnar <mingo@kernel.org> | 2018-08-18 07:11:51 -0400 |
|---|---|---|
| committer | Ingo Molnar <mingo@kernel.org> | 2018-08-18 07:11:51 -0400 |
| commit | 5804b11034a21e4287daaf017c5ad60ad7af8d67 (patch) | |
| tree | 79dd4998b58e3124bc2e5749914e4046afe5d0fd /tools/lib/traceevent/plugin_function.c | |
| parent | 13e091b6dd0e78a518a7d8756607d3acb8215768 (diff) | |
| parent | 6855dc41b24619c3d1de3dbd27dd0546b0e45272 (diff) | |
Merge tag 'perf-core-for-mingo-4.19-20180815' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/urgent
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo:
kernel:
- kallsyms, x86: Export addresses of PTI entry trampolines (Alexander Shishkin)
- kallsyms: Simplify update_iter_mod() (Adrian Hunter)
- x86: Add entry trampolines to kcore (Adrian Hunter)
Hardware tracing:
- Fix auxtrace queue resize (Adrian Hunter)
Arch specific:
- Fix uninitialized ARM SPE record error variable (Kim Phillips)
- Fix trace event post-processing in powerpc (Sandipan Das)
Build:
- Fix check-headers.sh AND list path of execution (Alexander Kapshuk)
- Remove -mcet and -fcf-protection when building the python binding
with older clang versions (Arnaldo Carvalho de Melo)
- Make check-headers.sh check based on kernel dir (Jiri Olsa)
- Move syscall_64.tbl check into check-headers.sh (Jiri Olsa)
Infrastructure:
- Check for null when copying nsinfo. (Benno Evers)
Libraries:
- Rename libtraceevent prefixes, prep work for making it a shared
library generaly available (Tzvetomir Stoyanov (VMware))
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/lib/traceevent/plugin_function.c')
| -rw-r--r-- | tools/lib/traceevent/plugin_function.c | 34 |
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; | |||
| 33 | 33 | ||
| 34 | #define STK_BLK 10 | 34 | #define STK_BLK 10 |
| 35 | 35 | ||
| 36 | struct pevent_plugin_option plugin_options[] = | 36 | struct tep_plugin_option plugin_options[] = |
| 37 | { | 37 | { |
| 38 | { | 38 | { |
| 39 | .name = "parent", | 39 | .name = "parent", |
| @@ -53,8 +53,8 @@ struct pevent_plugin_option plugin_options[] = | |||
| 53 | } | 53 | } |
| 54 | }; | 54 | }; |
| 55 | 55 | ||
| 56 | static struct pevent_plugin_option *ftrace_parent = &plugin_options[0]; | 56 | static struct tep_plugin_option *ftrace_parent = &plugin_options[0]; |
| 57 | static struct pevent_plugin_option *ftrace_indent = &plugin_options[1]; | 57 | static struct tep_plugin_option *ftrace_indent = &plugin_options[1]; |
| 58 | 58 | ||
| 59 | static void add_child(struct func_stack *stack, const char *child, int pos) | 59 | static void add_child(struct func_stack *stack, const char *child, int pos) |
| 60 | { | 60 | { |
| @@ -122,25 +122,25 @@ static int add_and_get_index(const char *parent, const char *child, int cpu) | |||
| 122 | return 0; | 122 | return 0; |
| 123 | } | 123 | } |
| 124 | 124 | ||
| 125 | static int function_handler(struct trace_seq *s, struct pevent_record *record, | 125 | static int function_handler(struct trace_seq *s, struct tep_record *record, |
| 126 | struct event_format *event, void *context) | 126 | struct event_format *event, void *context) |
| 127 | { | 127 | { |
| 128 | struct pevent *pevent = event->pevent; | 128 | struct tep_handle *pevent = event->pevent; |
| 129 | unsigned long long function; | 129 | unsigned long long function; |
| 130 | unsigned long long pfunction; | 130 | unsigned long long pfunction; |
| 131 | const char *func; | 131 | const char *func; |
| 132 | const char *parent; | 132 | const char *parent; |
| 133 | int index = 0; | 133 | int index = 0; |
| 134 | 134 | ||
| 135 | if (pevent_get_field_val(s, event, "ip", record, &function, 1)) | 135 | if (tep_get_field_val(s, event, "ip", record, &function, 1)) |
| 136 | return trace_seq_putc(s, '!'); | 136 | return trace_seq_putc(s, '!'); |
| 137 | 137 | ||
| 138 | func = pevent_find_function(pevent, function); | 138 | func = tep_find_function(pevent, function); |
| 139 | 139 | ||
| 140 | if (pevent_get_field_val(s, event, "parent_ip", record, &pfunction, 1)) | 140 | if (tep_get_field_val(s, event, "parent_ip", record, &pfunction, 1)) |
| 141 | return trace_seq_putc(s, '!'); | 141 | return trace_seq_putc(s, '!'); |
| 142 | 142 | ||
| 143 | parent = pevent_find_function(pevent, pfunction); | 143 | parent = tep_find_function(pevent, pfunction); |
| 144 | 144 | ||
| 145 | if (parent && ftrace_indent->set) | 145 | if (parent && ftrace_indent->set) |
| 146 | index = add_and_get_index(parent, func, record->cpu); | 146 | 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, | |||
| 163 | return 0; | 163 | return 0; |
| 164 | } | 164 | } |
| 165 | 165 | ||
| 166 | int PEVENT_PLUGIN_LOADER(struct pevent *pevent) | 166 | int TEP_PLUGIN_LOADER(struct tep_handle *pevent) |
| 167 | { | 167 | { |
| 168 | pevent_register_event_handler(pevent, -1, "ftrace", "function", | 168 | tep_register_event_handler(pevent, -1, "ftrace", "function", |
| 169 | function_handler, NULL); | 169 | function_handler, NULL); |
| 170 | 170 | ||
| 171 | traceevent_plugin_add_options("ftrace", plugin_options); | 171 | tep_plugin_add_options("ftrace", plugin_options); |
| 172 | 172 | ||
| 173 | return 0; | 173 | return 0; |
| 174 | } | 174 | } |
| 175 | 175 | ||
| 176 | void PEVENT_PLUGIN_UNLOADER(struct pevent *pevent) | 176 | void TEP_PLUGIN_UNLOADER(struct tep_handle *pevent) |
| 177 | { | 177 | { |
| 178 | int i, x; | 178 | int i, x; |
| 179 | 179 | ||
| 180 | pevent_unregister_event_handler(pevent, -1, "ftrace", "function", | 180 | tep_unregister_event_handler(pevent, -1, "ftrace", "function", |
| 181 | function_handler, NULL); | 181 | function_handler, NULL); |
| 182 | 182 | ||
| 183 | for (i = 0; i <= cpus; i++) { | 183 | for (i = 0; i <= cpus; i++) { |
| 184 | for (x = 0; x < fstack[i].size && fstack[i].stack[x]; x++) | 184 | for (x = 0; x < fstack[i].size && fstack[i].stack[x]; x++) |
| @@ -186,7 +186,7 @@ void PEVENT_PLUGIN_UNLOADER(struct pevent *pevent) | |||
| 186 | free(fstack[i].stack); | 186 | free(fstack[i].stack); |
| 187 | } | 187 | } |
| 188 | 188 | ||
| 189 | traceevent_plugin_remove_options(plugin_options); | 189 | tep_plugin_remove_options(plugin_options); |
| 190 | 190 | ||
| 191 | free(fstack); | 191 | free(fstack); |
| 192 | fstack = NULL; | 192 | fstack = NULL; |
