diff options
Diffstat (limited to 'kernel/trace')
-rw-r--r-- | kernel/trace/trace.c | 10 | ||||
-rw-r--r-- | kernel/trace/trace_events.c | 55 | ||||
-rw-r--r-- | kernel/trace/trace_events_trigger.c | 2 | ||||
-rw-r--r-- | kernel/trace/trace_export.c | 6 | ||||
-rw-r--r-- | kernel/trace/trace_kprobe.c | 21 | ||||
-rw-r--r-- | kernel/trace/trace_output.c | 2 | ||||
-rw-r--r-- | kernel/trace/trace_uprobe.c | 20 |
7 files changed, 68 insertions, 48 deletions
diff --git a/kernel/trace/trace.c b/kernel/trace/trace.c index 9be67c5e5b0f..737b0efa1a62 100644 --- a/kernel/trace/trace.c +++ b/kernel/trace/trace.c | |||
@@ -3611,6 +3611,8 @@ static const char readme_msg[] = | |||
3611 | #ifdef CONFIG_TRACER_SNAPSHOT | 3611 | #ifdef CONFIG_TRACER_SNAPSHOT |
3612 | "\t\t snapshot\n" | 3612 | "\t\t snapshot\n" |
3613 | #endif | 3613 | #endif |
3614 | "\t\t dump\n" | ||
3615 | "\t\t cpudump\n" | ||
3614 | "\t example: echo do_fault:traceoff > set_ftrace_filter\n" | 3616 | "\t example: echo do_fault:traceoff > set_ftrace_filter\n" |
3615 | "\t echo do_trap:traceoff:3 > set_ftrace_filter\n" | 3617 | "\t echo do_trap:traceoff:3 > set_ftrace_filter\n" |
3616 | "\t The first one will disable tracing every time do_fault is hit\n" | 3618 | "\t The first one will disable tracing every time do_fault is hit\n" |
@@ -4390,8 +4392,6 @@ static void tracing_spd_release_pipe(struct splice_pipe_desc *spd, | |||
4390 | 4392 | ||
4391 | static const struct pipe_buf_operations tracing_pipe_buf_ops = { | 4393 | static const struct pipe_buf_operations tracing_pipe_buf_ops = { |
4392 | .can_merge = 0, | 4394 | .can_merge = 0, |
4393 | .map = generic_pipe_buf_map, | ||
4394 | .unmap = generic_pipe_buf_unmap, | ||
4395 | .confirm = generic_pipe_buf_confirm, | 4395 | .confirm = generic_pipe_buf_confirm, |
4396 | .release = generic_pipe_buf_release, | 4396 | .release = generic_pipe_buf_release, |
4397 | .steal = generic_pipe_buf_steal, | 4397 | .steal = generic_pipe_buf_steal, |
@@ -4486,7 +4486,7 @@ static ssize_t tracing_splice_read_pipe(struct file *filp, | |||
4486 | trace_access_lock(iter->cpu_file); | 4486 | trace_access_lock(iter->cpu_file); |
4487 | 4487 | ||
4488 | /* Fill as many pages as possible. */ | 4488 | /* Fill as many pages as possible. */ |
4489 | for (i = 0, rem = len; i < pipe->buffers && rem; i++) { | 4489 | for (i = 0, rem = len; i < spd.nr_pages_max && rem; i++) { |
4490 | spd.pages[i] = alloc_page(GFP_KERNEL); | 4490 | spd.pages[i] = alloc_page(GFP_KERNEL); |
4491 | if (!spd.pages[i]) | 4491 | if (!spd.pages[i]) |
4492 | break; | 4492 | break; |
@@ -5279,8 +5279,6 @@ static void buffer_pipe_buf_get(struct pipe_inode_info *pipe, | |||
5279 | /* Pipe buffer operations for a buffer. */ | 5279 | /* Pipe buffer operations for a buffer. */ |
5280 | static const struct pipe_buf_operations buffer_pipe_buf_ops = { | 5280 | static const struct pipe_buf_operations buffer_pipe_buf_ops = { |
5281 | .can_merge = 0, | 5281 | .can_merge = 0, |
5282 | .map = generic_pipe_buf_map, | ||
5283 | .unmap = generic_pipe_buf_unmap, | ||
5284 | .confirm = generic_pipe_buf_confirm, | 5282 | .confirm = generic_pipe_buf_confirm, |
5285 | .release = buffer_pipe_buf_release, | 5283 | .release = buffer_pipe_buf_release, |
5286 | .steal = generic_pipe_buf_steal, | 5284 | .steal = generic_pipe_buf_steal, |
@@ -5356,7 +5354,7 @@ tracing_buffers_splice_read(struct file *file, loff_t *ppos, | |||
5356 | trace_access_lock(iter->cpu_file); | 5354 | trace_access_lock(iter->cpu_file); |
5357 | entries = ring_buffer_entries_cpu(iter->trace_buffer->buffer, iter->cpu_file); | 5355 | entries = ring_buffer_entries_cpu(iter->trace_buffer->buffer, iter->cpu_file); |
5358 | 5356 | ||
5359 | for (i = 0; i < pipe->buffers && len && entries; i++, len -= PAGE_SIZE) { | 5357 | for (i = 0; i < spd.nr_pages_max && len && entries; i++, len -= PAGE_SIZE) { |
5360 | struct page *page; | 5358 | struct page *page; |
5361 | int r; | 5359 | int r; |
5362 | 5360 | ||
diff --git a/kernel/trace/trace_events.c b/kernel/trace/trace_events.c index 83a4378dc5e0..3ddfd8f62c05 100644 --- a/kernel/trace/trace_events.c +++ b/kernel/trace/trace_events.c | |||
@@ -223,24 +223,25 @@ int ftrace_event_reg(struct ftrace_event_call *call, | |||
223 | { | 223 | { |
224 | struct ftrace_event_file *file = data; | 224 | struct ftrace_event_file *file = data; |
225 | 225 | ||
226 | WARN_ON(!(call->flags & TRACE_EVENT_FL_TRACEPOINT)); | ||
226 | switch (type) { | 227 | switch (type) { |
227 | case TRACE_REG_REGISTER: | 228 | case TRACE_REG_REGISTER: |
228 | return tracepoint_probe_register(call->name, | 229 | return tracepoint_probe_register(call->tp, |
229 | call->class->probe, | 230 | call->class->probe, |
230 | file); | 231 | file); |
231 | case TRACE_REG_UNREGISTER: | 232 | case TRACE_REG_UNREGISTER: |
232 | tracepoint_probe_unregister(call->name, | 233 | tracepoint_probe_unregister(call->tp, |
233 | call->class->probe, | 234 | call->class->probe, |
234 | file); | 235 | file); |
235 | return 0; | 236 | return 0; |
236 | 237 | ||
237 | #ifdef CONFIG_PERF_EVENTS | 238 | #ifdef CONFIG_PERF_EVENTS |
238 | case TRACE_REG_PERF_REGISTER: | 239 | case TRACE_REG_PERF_REGISTER: |
239 | return tracepoint_probe_register(call->name, | 240 | return tracepoint_probe_register(call->tp, |
240 | call->class->perf_probe, | 241 | call->class->perf_probe, |
241 | call); | 242 | call); |
242 | case TRACE_REG_PERF_UNREGISTER: | 243 | case TRACE_REG_PERF_UNREGISTER: |
243 | tracepoint_probe_unregister(call->name, | 244 | tracepoint_probe_unregister(call->tp, |
244 | call->class->perf_probe, | 245 | call->class->perf_probe, |
245 | call); | 246 | call); |
246 | return 0; | 247 | return 0; |
@@ -352,7 +353,7 @@ static int __ftrace_event_enable_disable(struct ftrace_event_file *file, | |||
352 | if (ret) { | 353 | if (ret) { |
353 | tracing_stop_cmdline_record(); | 354 | tracing_stop_cmdline_record(); |
354 | pr_info("event trace: Could not enable event " | 355 | pr_info("event trace: Could not enable event " |
355 | "%s\n", call->name); | 356 | "%s\n", ftrace_event_name(call)); |
356 | break; | 357 | break; |
357 | } | 358 | } |
358 | set_bit(FTRACE_EVENT_FL_ENABLED_BIT, &file->flags); | 359 | set_bit(FTRACE_EVENT_FL_ENABLED_BIT, &file->flags); |
@@ -481,27 +482,29 @@ __ftrace_set_clr_event_nolock(struct trace_array *tr, const char *match, | |||
481 | { | 482 | { |
482 | struct ftrace_event_file *file; | 483 | struct ftrace_event_file *file; |
483 | struct ftrace_event_call *call; | 484 | struct ftrace_event_call *call; |
485 | const char *name; | ||
484 | int ret = -EINVAL; | 486 | int ret = -EINVAL; |
485 | 487 | ||
486 | list_for_each_entry(file, &tr->events, list) { | 488 | list_for_each_entry(file, &tr->events, list) { |
487 | 489 | ||
488 | call = file->event_call; | 490 | call = file->event_call; |
491 | name = ftrace_event_name(call); | ||
489 | 492 | ||
490 | if (!call->name || !call->class || !call->class->reg) | 493 | if (!name || !call->class || !call->class->reg) |
491 | continue; | 494 | continue; |
492 | 495 | ||
493 | if (call->flags & TRACE_EVENT_FL_IGNORE_ENABLE) | 496 | if (call->flags & TRACE_EVENT_FL_IGNORE_ENABLE) |
494 | continue; | 497 | continue; |
495 | 498 | ||
496 | if (match && | 499 | if (match && |
497 | strcmp(match, call->name) != 0 && | 500 | strcmp(match, name) != 0 && |
498 | strcmp(match, call->class->system) != 0) | 501 | strcmp(match, call->class->system) != 0) |
499 | continue; | 502 | continue; |
500 | 503 | ||
501 | if (sub && strcmp(sub, call->class->system) != 0) | 504 | if (sub && strcmp(sub, call->class->system) != 0) |
502 | continue; | 505 | continue; |
503 | 506 | ||
504 | if (event && strcmp(event, call->name) != 0) | 507 | if (event && strcmp(event, name) != 0) |
505 | continue; | 508 | continue; |
506 | 509 | ||
507 | ftrace_event_enable_disable(file, set); | 510 | ftrace_event_enable_disable(file, set); |
@@ -699,7 +702,7 @@ static int t_show(struct seq_file *m, void *v) | |||
699 | 702 | ||
700 | if (strcmp(call->class->system, TRACE_SYSTEM) != 0) | 703 | if (strcmp(call->class->system, TRACE_SYSTEM) != 0) |
701 | seq_printf(m, "%s:", call->class->system); | 704 | seq_printf(m, "%s:", call->class->system); |
702 | seq_printf(m, "%s\n", call->name); | 705 | seq_printf(m, "%s\n", ftrace_event_name(call)); |
703 | 706 | ||
704 | return 0; | 707 | return 0; |
705 | } | 708 | } |
@@ -792,7 +795,7 @@ system_enable_read(struct file *filp, char __user *ubuf, size_t cnt, | |||
792 | mutex_lock(&event_mutex); | 795 | mutex_lock(&event_mutex); |
793 | list_for_each_entry(file, &tr->events, list) { | 796 | list_for_each_entry(file, &tr->events, list) { |
794 | call = file->event_call; | 797 | call = file->event_call; |
795 | if (!call->name || !call->class || !call->class->reg) | 798 | if (!ftrace_event_name(call) || !call->class || !call->class->reg) |
796 | continue; | 799 | continue; |
797 | 800 | ||
798 | if (system && strcmp(call->class->system, system->name) != 0) | 801 | if (system && strcmp(call->class->system, system->name) != 0) |
@@ -907,7 +910,7 @@ static int f_show(struct seq_file *m, void *v) | |||
907 | 910 | ||
908 | switch ((unsigned long)v) { | 911 | switch ((unsigned long)v) { |
909 | case FORMAT_HEADER: | 912 | case FORMAT_HEADER: |
910 | seq_printf(m, "name: %s\n", call->name); | 913 | seq_printf(m, "name: %s\n", ftrace_event_name(call)); |
911 | seq_printf(m, "ID: %d\n", call->event.type); | 914 | seq_printf(m, "ID: %d\n", call->event.type); |
912 | seq_printf(m, "format:\n"); | 915 | seq_printf(m, "format:\n"); |
913 | return 0; | 916 | return 0; |
@@ -1527,6 +1530,7 @@ event_create_dir(struct dentry *parent, struct ftrace_event_file *file) | |||
1527 | struct trace_array *tr = file->tr; | 1530 | struct trace_array *tr = file->tr; |
1528 | struct list_head *head; | 1531 | struct list_head *head; |
1529 | struct dentry *d_events; | 1532 | struct dentry *d_events; |
1533 | const char *name; | ||
1530 | int ret; | 1534 | int ret; |
1531 | 1535 | ||
1532 | /* | 1536 | /* |
@@ -1540,10 +1544,11 @@ event_create_dir(struct dentry *parent, struct ftrace_event_file *file) | |||
1540 | } else | 1544 | } else |
1541 | d_events = parent; | 1545 | d_events = parent; |
1542 | 1546 | ||
1543 | file->dir = debugfs_create_dir(call->name, d_events); | 1547 | name = ftrace_event_name(call); |
1548 | file->dir = debugfs_create_dir(name, d_events); | ||
1544 | if (!file->dir) { | 1549 | if (!file->dir) { |
1545 | pr_warning("Could not create debugfs '%s' directory\n", | 1550 | pr_warning("Could not create debugfs '%s' directory\n", |
1546 | call->name); | 1551 | name); |
1547 | return -1; | 1552 | return -1; |
1548 | } | 1553 | } |
1549 | 1554 | ||
@@ -1567,7 +1572,7 @@ event_create_dir(struct dentry *parent, struct ftrace_event_file *file) | |||
1567 | ret = call->class->define_fields(call); | 1572 | ret = call->class->define_fields(call); |
1568 | if (ret < 0) { | 1573 | if (ret < 0) { |
1569 | pr_warning("Could not initialize trace point" | 1574 | pr_warning("Could not initialize trace point" |
1570 | " events/%s\n", call->name); | 1575 | " events/%s\n", name); |
1571 | return -1; | 1576 | return -1; |
1572 | } | 1577 | } |
1573 | } | 1578 | } |
@@ -1631,15 +1636,17 @@ static void event_remove(struct ftrace_event_call *call) | |||
1631 | static int event_init(struct ftrace_event_call *call) | 1636 | static int event_init(struct ftrace_event_call *call) |
1632 | { | 1637 | { |
1633 | int ret = 0; | 1638 | int ret = 0; |
1639 | const char *name; | ||
1634 | 1640 | ||
1635 | if (WARN_ON(!call->name)) | 1641 | name = ftrace_event_name(call); |
1642 | if (WARN_ON(!name)) | ||
1636 | return -EINVAL; | 1643 | return -EINVAL; |
1637 | 1644 | ||
1638 | if (call->class->raw_init) { | 1645 | if (call->class->raw_init) { |
1639 | ret = call->class->raw_init(call); | 1646 | ret = call->class->raw_init(call); |
1640 | if (ret < 0 && ret != -ENOSYS) | 1647 | if (ret < 0 && ret != -ENOSYS) |
1641 | pr_warn("Could not initialize trace events/%s\n", | 1648 | pr_warn("Could not initialize trace events/%s\n", |
1642 | call->name); | 1649 | name); |
1643 | } | 1650 | } |
1644 | 1651 | ||
1645 | return ret; | 1652 | return ret; |
@@ -1885,7 +1892,7 @@ __trace_add_event_dirs(struct trace_array *tr) | |||
1885 | ret = __trace_add_new_event(call, tr); | 1892 | ret = __trace_add_new_event(call, tr); |
1886 | if (ret < 0) | 1893 | if (ret < 0) |
1887 | pr_warning("Could not create directory for event %s\n", | 1894 | pr_warning("Could not create directory for event %s\n", |
1888 | call->name); | 1895 | ftrace_event_name(call)); |
1889 | } | 1896 | } |
1890 | } | 1897 | } |
1891 | 1898 | ||
@@ -1894,18 +1901,20 @@ find_event_file(struct trace_array *tr, const char *system, const char *event) | |||
1894 | { | 1901 | { |
1895 | struct ftrace_event_file *file; | 1902 | struct ftrace_event_file *file; |
1896 | struct ftrace_event_call *call; | 1903 | struct ftrace_event_call *call; |
1904 | const char *name; | ||
1897 | 1905 | ||
1898 | list_for_each_entry(file, &tr->events, list) { | 1906 | list_for_each_entry(file, &tr->events, list) { |
1899 | 1907 | ||
1900 | call = file->event_call; | 1908 | call = file->event_call; |
1909 | name = ftrace_event_name(call); | ||
1901 | 1910 | ||
1902 | if (!call->name || !call->class || !call->class->reg) | 1911 | if (!name || !call->class || !call->class->reg) |
1903 | continue; | 1912 | continue; |
1904 | 1913 | ||
1905 | if (call->flags & TRACE_EVENT_FL_IGNORE_ENABLE) | 1914 | if (call->flags & TRACE_EVENT_FL_IGNORE_ENABLE) |
1906 | continue; | 1915 | continue; |
1907 | 1916 | ||
1908 | if (strcmp(event, call->name) == 0 && | 1917 | if (strcmp(event, name) == 0 && |
1909 | strcmp(system, call->class->system) == 0) | 1918 | strcmp(system, call->class->system) == 0) |
1910 | return file; | 1919 | return file; |
1911 | } | 1920 | } |
@@ -1973,7 +1982,7 @@ event_enable_print(struct seq_file *m, unsigned long ip, | |||
1973 | seq_printf(m, "%s:%s:%s", | 1982 | seq_printf(m, "%s:%s:%s", |
1974 | data->enable ? ENABLE_EVENT_STR : DISABLE_EVENT_STR, | 1983 | data->enable ? ENABLE_EVENT_STR : DISABLE_EVENT_STR, |
1975 | data->file->event_call->class->system, | 1984 | data->file->event_call->class->system, |
1976 | data->file->event_call->name); | 1985 | ftrace_event_name(data->file->event_call)); |
1977 | 1986 | ||
1978 | if (data->count == -1) | 1987 | if (data->count == -1) |
1979 | seq_printf(m, ":unlimited\n"); | 1988 | seq_printf(m, ":unlimited\n"); |
@@ -2193,7 +2202,7 @@ __trace_early_add_event_dirs(struct trace_array *tr) | |||
2193 | ret = event_create_dir(tr->event_dir, file); | 2202 | ret = event_create_dir(tr->event_dir, file); |
2194 | if (ret < 0) | 2203 | if (ret < 0) |
2195 | pr_warning("Could not create directory for event %s\n", | 2204 | pr_warning("Could not create directory for event %s\n", |
2196 | file->event_call->name); | 2205 | ftrace_event_name(file->event_call)); |
2197 | } | 2206 | } |
2198 | } | 2207 | } |
2199 | 2208 | ||
@@ -2217,7 +2226,7 @@ __trace_early_add_events(struct trace_array *tr) | |||
2217 | ret = __trace_early_add_new_event(call, tr); | 2226 | ret = __trace_early_add_new_event(call, tr); |
2218 | if (ret < 0) | 2227 | if (ret < 0) |
2219 | pr_warning("Could not create early event %s\n", | 2228 | pr_warning("Could not create early event %s\n", |
2220 | call->name); | 2229 | ftrace_event_name(call)); |
2221 | } | 2230 | } |
2222 | } | 2231 | } |
2223 | 2232 | ||
@@ -2549,7 +2558,7 @@ static __init void event_trace_self_tests(void) | |||
2549 | continue; | 2558 | continue; |
2550 | #endif | 2559 | #endif |
2551 | 2560 | ||
2552 | pr_info("Testing event %s: ", call->name); | 2561 | pr_info("Testing event %s: ", ftrace_event_name(call)); |
2553 | 2562 | ||
2554 | /* | 2563 | /* |
2555 | * If an event is already enabled, someone is using | 2564 | * If an event is already enabled, someone is using |
diff --git a/kernel/trace/trace_events_trigger.c b/kernel/trace/trace_events_trigger.c index 8efbb69b04f0..925f537f07d1 100644 --- a/kernel/trace/trace_events_trigger.c +++ b/kernel/trace/trace_events_trigger.c | |||
@@ -1095,7 +1095,7 @@ event_enable_trigger_print(struct seq_file *m, struct event_trigger_ops *ops, | |||
1095 | seq_printf(m, "%s:%s:%s", | 1095 | seq_printf(m, "%s:%s:%s", |
1096 | enable_data->enable ? ENABLE_EVENT_STR : DISABLE_EVENT_STR, | 1096 | enable_data->enable ? ENABLE_EVENT_STR : DISABLE_EVENT_STR, |
1097 | enable_data->file->event_call->class->system, | 1097 | enable_data->file->event_call->class->system, |
1098 | enable_data->file->event_call->name); | 1098 | ftrace_event_name(enable_data->file->event_call)); |
1099 | 1099 | ||
1100 | if (data->count == -1) | 1100 | if (data->count == -1) |
1101 | seq_puts(m, ":unlimited"); | 1101 | seq_puts(m, ":unlimited"); |
diff --git a/kernel/trace/trace_export.c b/kernel/trace/trace_export.c index ee0a5098ac43..d4ddde28a81a 100644 --- a/kernel/trace/trace_export.c +++ b/kernel/trace/trace_export.c | |||
@@ -173,9 +173,11 @@ struct ftrace_event_class __refdata event_class_ftrace_##call = { \ | |||
173 | }; \ | 173 | }; \ |
174 | \ | 174 | \ |
175 | struct ftrace_event_call __used event_##call = { \ | 175 | struct ftrace_event_call __used event_##call = { \ |
176 | .name = #call, \ | ||
177 | .event.type = etype, \ | ||
178 | .class = &event_class_ftrace_##call, \ | 176 | .class = &event_class_ftrace_##call, \ |
177 | { \ | ||
178 | .name = #call, \ | ||
179 | }, \ | ||
180 | .event.type = etype, \ | ||
179 | .print_fmt = print, \ | 181 | .print_fmt = print, \ |
180 | .flags = TRACE_EVENT_FL_IGNORE_ENABLE | TRACE_EVENT_FL_USE_CALL_FILTER, \ | 182 | .flags = TRACE_EVENT_FL_IGNORE_ENABLE | TRACE_EVENT_FL_USE_CALL_FILTER, \ |
181 | }; \ | 183 | }; \ |
diff --git a/kernel/trace/trace_kprobe.c b/kernel/trace/trace_kprobe.c index d021d21dd150..903ae28962be 100644 --- a/kernel/trace/trace_kprobe.c +++ b/kernel/trace/trace_kprobe.c | |||
@@ -341,7 +341,7 @@ static struct trace_kprobe *find_trace_kprobe(const char *event, | |||
341 | struct trace_kprobe *tk; | 341 | struct trace_kprobe *tk; |
342 | 342 | ||
343 | list_for_each_entry(tk, &probe_list, list) | 343 | list_for_each_entry(tk, &probe_list, list) |
344 | if (strcmp(tk->tp.call.name, event) == 0 && | 344 | if (strcmp(ftrace_event_name(&tk->tp.call), event) == 0 && |
345 | strcmp(tk->tp.call.class->system, group) == 0) | 345 | strcmp(tk->tp.call.class->system, group) == 0) |
346 | return tk; | 346 | return tk; |
347 | return NULL; | 347 | return NULL; |
@@ -516,7 +516,8 @@ static int register_trace_kprobe(struct trace_kprobe *tk) | |||
516 | mutex_lock(&probe_lock); | 516 | mutex_lock(&probe_lock); |
517 | 517 | ||
518 | /* Delete old (same name) event if exist */ | 518 | /* Delete old (same name) event if exist */ |
519 | old_tk = find_trace_kprobe(tk->tp.call.name, tk->tp.call.class->system); | 519 | old_tk = find_trace_kprobe(ftrace_event_name(&tk->tp.call), |
520 | tk->tp.call.class->system); | ||
520 | if (old_tk) { | 521 | if (old_tk) { |
521 | ret = unregister_trace_kprobe(old_tk); | 522 | ret = unregister_trace_kprobe(old_tk); |
522 | if (ret < 0) | 523 | if (ret < 0) |
@@ -564,7 +565,8 @@ static int trace_kprobe_module_callback(struct notifier_block *nb, | |||
564 | if (ret) | 565 | if (ret) |
565 | pr_warning("Failed to re-register probe %s on" | 566 | pr_warning("Failed to re-register probe %s on" |
566 | "%s: %d\n", | 567 | "%s: %d\n", |
567 | tk->tp.call.name, mod->name, ret); | 568 | ftrace_event_name(&tk->tp.call), |
569 | mod->name, ret); | ||
568 | } | 570 | } |
569 | } | 571 | } |
570 | mutex_unlock(&probe_lock); | 572 | mutex_unlock(&probe_lock); |
@@ -818,7 +820,8 @@ static int probes_seq_show(struct seq_file *m, void *v) | |||
818 | int i; | 820 | int i; |
819 | 821 | ||
820 | seq_printf(m, "%c", trace_kprobe_is_return(tk) ? 'r' : 'p'); | 822 | seq_printf(m, "%c", trace_kprobe_is_return(tk) ? 'r' : 'p'); |
821 | seq_printf(m, ":%s/%s", tk->tp.call.class->system, tk->tp.call.name); | 823 | seq_printf(m, ":%s/%s", tk->tp.call.class->system, |
824 | ftrace_event_name(&tk->tp.call)); | ||
822 | 825 | ||
823 | if (!tk->symbol) | 826 | if (!tk->symbol) |
824 | seq_printf(m, " 0x%p", tk->rp.kp.addr); | 827 | seq_printf(m, " 0x%p", tk->rp.kp.addr); |
@@ -876,7 +879,8 @@ static int probes_profile_seq_show(struct seq_file *m, void *v) | |||
876 | { | 879 | { |
877 | struct trace_kprobe *tk = v; | 880 | struct trace_kprobe *tk = v; |
878 | 881 | ||
879 | seq_printf(m, " %-44s %15lu %15lu\n", tk->tp.call.name, tk->nhit, | 882 | seq_printf(m, " %-44s %15lu %15lu\n", |
883 | ftrace_event_name(&tk->tp.call), tk->nhit, | ||
880 | tk->rp.kp.nmissed); | 884 | tk->rp.kp.nmissed); |
881 | 885 | ||
882 | return 0; | 886 | return 0; |
@@ -1011,7 +1015,7 @@ print_kprobe_event(struct trace_iterator *iter, int flags, | |||
1011 | field = (struct kprobe_trace_entry_head *)iter->ent; | 1015 | field = (struct kprobe_trace_entry_head *)iter->ent; |
1012 | tp = container_of(event, struct trace_probe, call.event); | 1016 | tp = container_of(event, struct trace_probe, call.event); |
1013 | 1017 | ||
1014 | if (!trace_seq_printf(s, "%s: (", tp->call.name)) | 1018 | if (!trace_seq_printf(s, "%s: (", ftrace_event_name(&tp->call))) |
1015 | goto partial; | 1019 | goto partial; |
1016 | 1020 | ||
1017 | if (!seq_print_ip_sym(s, field->ip, flags | TRACE_ITER_SYM_OFFSET)) | 1021 | if (!seq_print_ip_sym(s, field->ip, flags | TRACE_ITER_SYM_OFFSET)) |
@@ -1047,7 +1051,7 @@ print_kretprobe_event(struct trace_iterator *iter, int flags, | |||
1047 | field = (struct kretprobe_trace_entry_head *)iter->ent; | 1051 | field = (struct kretprobe_trace_entry_head *)iter->ent; |
1048 | tp = container_of(event, struct trace_probe, call.event); | 1052 | tp = container_of(event, struct trace_probe, call.event); |
1049 | 1053 | ||
1050 | if (!trace_seq_printf(s, "%s: (", tp->call.name)) | 1054 | if (!trace_seq_printf(s, "%s: (", ftrace_event_name(&tp->call))) |
1051 | goto partial; | 1055 | goto partial; |
1052 | 1056 | ||
1053 | if (!seq_print_ip_sym(s, field->ret_ip, flags | TRACE_ITER_SYM_OFFSET)) | 1057 | if (!seq_print_ip_sym(s, field->ret_ip, flags | TRACE_ITER_SYM_OFFSET)) |
@@ -1286,7 +1290,8 @@ static int register_kprobe_event(struct trace_kprobe *tk) | |||
1286 | call->data = tk; | 1290 | call->data = tk; |
1287 | ret = trace_add_event_call(call); | 1291 | ret = trace_add_event_call(call); |
1288 | if (ret) { | 1292 | if (ret) { |
1289 | pr_info("Failed to register kprobe event: %s\n", call->name); | 1293 | pr_info("Failed to register kprobe event: %s\n", |
1294 | ftrace_event_name(call)); | ||
1290 | kfree(call->print_fmt); | 1295 | kfree(call->print_fmt); |
1291 | unregister_ftrace_event(&call->event); | 1296 | unregister_ftrace_event(&call->event); |
1292 | } | 1297 | } |
diff --git a/kernel/trace/trace_output.c b/kernel/trace/trace_output.c index ca0e79e2abaa..a436de18aa99 100644 --- a/kernel/trace/trace_output.c +++ b/kernel/trace/trace_output.c | |||
@@ -431,7 +431,7 @@ int ftrace_raw_output_prep(struct trace_iterator *iter, | |||
431 | } | 431 | } |
432 | 432 | ||
433 | trace_seq_init(p); | 433 | trace_seq_init(p); |
434 | ret = trace_seq_printf(s, "%s: ", event->name); | 434 | ret = trace_seq_printf(s, "%s: ", ftrace_event_name(event)); |
435 | if (!ret) | 435 | if (!ret) |
436 | return TRACE_TYPE_PARTIAL_LINE; | 436 | return TRACE_TYPE_PARTIAL_LINE; |
437 | 437 | ||
diff --git a/kernel/trace/trace_uprobe.c b/kernel/trace/trace_uprobe.c index e4473367e7a4..930e51462dc8 100644 --- a/kernel/trace/trace_uprobe.c +++ b/kernel/trace/trace_uprobe.c | |||
@@ -294,7 +294,7 @@ static struct trace_uprobe *find_probe_event(const char *event, const char *grou | |||
294 | struct trace_uprobe *tu; | 294 | struct trace_uprobe *tu; |
295 | 295 | ||
296 | list_for_each_entry(tu, &uprobe_list, list) | 296 | list_for_each_entry(tu, &uprobe_list, list) |
297 | if (strcmp(tu->tp.call.name, event) == 0 && | 297 | if (strcmp(ftrace_event_name(&tu->tp.call), event) == 0 && |
298 | strcmp(tu->tp.call.class->system, group) == 0) | 298 | strcmp(tu->tp.call.class->system, group) == 0) |
299 | return tu; | 299 | return tu; |
300 | 300 | ||
@@ -324,7 +324,8 @@ static int register_trace_uprobe(struct trace_uprobe *tu) | |||
324 | mutex_lock(&uprobe_lock); | 324 | mutex_lock(&uprobe_lock); |
325 | 325 | ||
326 | /* register as an event */ | 326 | /* register as an event */ |
327 | old_tu = find_probe_event(tu->tp.call.name, tu->tp.call.class->system); | 327 | old_tu = find_probe_event(ftrace_event_name(&tu->tp.call), |
328 | tu->tp.call.class->system); | ||
328 | if (old_tu) { | 329 | if (old_tu) { |
329 | /* delete old event */ | 330 | /* delete old event */ |
330 | ret = unregister_trace_uprobe(old_tu); | 331 | ret = unregister_trace_uprobe(old_tu); |
@@ -599,7 +600,8 @@ static int probes_seq_show(struct seq_file *m, void *v) | |||
599 | char c = is_ret_probe(tu) ? 'r' : 'p'; | 600 | char c = is_ret_probe(tu) ? 'r' : 'p'; |
600 | int i; | 601 | int i; |
601 | 602 | ||
602 | seq_printf(m, "%c:%s/%s", c, tu->tp.call.class->system, tu->tp.call.name); | 603 | seq_printf(m, "%c:%s/%s", c, tu->tp.call.class->system, |
604 | ftrace_event_name(&tu->tp.call)); | ||
603 | seq_printf(m, " %s:0x%p", tu->filename, (void *)tu->offset); | 605 | seq_printf(m, " %s:0x%p", tu->filename, (void *)tu->offset); |
604 | 606 | ||
605 | for (i = 0; i < tu->tp.nr_args; i++) | 607 | for (i = 0; i < tu->tp.nr_args; i++) |
@@ -649,7 +651,8 @@ static int probes_profile_seq_show(struct seq_file *m, void *v) | |||
649 | { | 651 | { |
650 | struct trace_uprobe *tu = v; | 652 | struct trace_uprobe *tu = v; |
651 | 653 | ||
652 | seq_printf(m, " %s %-44s %15lu\n", tu->filename, tu->tp.call.name, tu->nhit); | 654 | seq_printf(m, " %s %-44s %15lu\n", tu->filename, |
655 | ftrace_event_name(&tu->tp.call), tu->nhit); | ||
653 | return 0; | 656 | return 0; |
654 | } | 657 | } |
655 | 658 | ||
@@ -844,12 +847,14 @@ print_uprobe_event(struct trace_iterator *iter, int flags, struct trace_event *e | |||
844 | tu = container_of(event, struct trace_uprobe, tp.call.event); | 847 | tu = container_of(event, struct trace_uprobe, tp.call.event); |
845 | 848 | ||
846 | if (is_ret_probe(tu)) { | 849 | if (is_ret_probe(tu)) { |
847 | if (!trace_seq_printf(s, "%s: (0x%lx <- 0x%lx)", tu->tp.call.name, | 850 | if (!trace_seq_printf(s, "%s: (0x%lx <- 0x%lx)", |
851 | ftrace_event_name(&tu->tp.call), | ||
848 | entry->vaddr[1], entry->vaddr[0])) | 852 | entry->vaddr[1], entry->vaddr[0])) |
849 | goto partial; | 853 | goto partial; |
850 | data = DATAOF_TRACE_ENTRY(entry, true); | 854 | data = DATAOF_TRACE_ENTRY(entry, true); |
851 | } else { | 855 | } else { |
852 | if (!trace_seq_printf(s, "%s: (0x%lx)", tu->tp.call.name, | 856 | if (!trace_seq_printf(s, "%s: (0x%lx)", |
857 | ftrace_event_name(&tu->tp.call), | ||
853 | entry->vaddr[0])) | 858 | entry->vaddr[0])) |
854 | goto partial; | 859 | goto partial; |
855 | data = DATAOF_TRACE_ENTRY(entry, false); | 860 | data = DATAOF_TRACE_ENTRY(entry, false); |
@@ -1275,7 +1280,8 @@ static int register_uprobe_event(struct trace_uprobe *tu) | |||
1275 | ret = trace_add_event_call(call); | 1280 | ret = trace_add_event_call(call); |
1276 | 1281 | ||
1277 | if (ret) { | 1282 | if (ret) { |
1278 | pr_info("Failed to register uprobe event: %s\n", call->name); | 1283 | pr_info("Failed to register uprobe event: %s\n", |
1284 | ftrace_event_name(call)); | ||
1279 | kfree(call->print_fmt); | 1285 | kfree(call->print_fmt); |
1280 | unregister_ftrace_event(&call->event); | 1286 | unregister_ftrace_event(&call->event); |
1281 | } | 1287 | } |