Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'trace-v5.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace

Pull tracing fixes from Steven Rostedt:
"Four small fixes:

- Fix a ringbuffer bug for nested events having time go backwards

- Fix a config dependency for boot time tracing to depend on
synthetic events instead of histograms.

- Fix trigger format parsing to handle multiple spaces

- Fix bootconfig to handle failures in multiple events"

* tag 'trace-v5.8-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-trace:
tracing/boottime: Fix kprobe multiple events
tracing: Fix event trigger to accept redundant spaces
tracing/boot: Fix config dependency for synthedic event
ring-buffer: Zero out time extend if it is nested and not absolute

+27 -6
+1 -1
kernel/trace/ring_buffer.c
··· 2427 2427 if (unlikely(info->add_timestamp)) { 2428 2428 bool abs = ring_buffer_time_stamp_abs(cpu_buffer->buffer); 2429 2429 2430 - event = rb_add_time_stamp(event, info->delta, abs); 2430 + event = rb_add_time_stamp(event, abs ? info->delta : delta, abs); 2431 2431 length -= RB_LEN_TIME_EXTEND; 2432 2432 delta = 0; 2433 2433 }
+7 -3
kernel/trace/trace_boot.c
··· 101 101 kprobe_event_cmd_init(&cmd, buf, MAX_BUF_LEN); 102 102 103 103 ret = kprobe_event_gen_cmd_start(&cmd, event, val); 104 - if (ret) 104 + if (ret) { 105 + pr_err("Failed to generate probe: %s\n", buf); 105 106 break; 107 + } 106 108 107 109 ret = kprobe_event_gen_cmd_end(&cmd); 108 - if (ret) 110 + if (ret) { 109 111 pr_err("Failed to add probe: %s\n", buf); 112 + break; 113 + } 110 114 } 111 115 112 116 return ret; ··· 124 120 } 125 121 #endif 126 122 127 - #ifdef CONFIG_HIST_TRIGGERS 123 + #ifdef CONFIG_SYNTH_EVENTS 128 124 static int __init 129 125 trace_boot_add_synth_event(struct xbc_node *node, const char *event) 130 126 {
+19 -2
kernel/trace/trace_events_trigger.c
··· 216 216 217 217 int trigger_process_regex(struct trace_event_file *file, char *buff) 218 218 { 219 - char *command, *next = buff; 219 + char *command, *next; 220 220 struct event_command *p; 221 221 int ret = -EINVAL; 222 222 223 + next = buff = skip_spaces(buff); 223 224 command = strsep(&next, ": \t"); 225 + if (next) { 226 + next = skip_spaces(next); 227 + if (!*next) 228 + next = NULL; 229 + } 224 230 command = (command[0] != '!') ? command : command + 1; 225 231 226 232 mutex_lock(&trigger_cmd_mutex); ··· 636 630 int ret; 637 631 638 632 /* separate the trigger from the filter (t:n [if filter]) */ 639 - if (param && isdigit(param[0])) 633 + if (param && isdigit(param[0])) { 640 634 trigger = strsep(&param, " \t"); 635 + if (param) { 636 + param = skip_spaces(param); 637 + if (!*param) 638 + param = NULL; 639 + } 640 + } 641 641 642 642 trigger_ops = cmd_ops->get_trigger_ops(cmd, trigger); 643 643 ··· 1380 1368 trigger = strsep(&param, " \t"); 1381 1369 if (!trigger) 1382 1370 return -EINVAL; 1371 + if (param) { 1372 + param = skip_spaces(param); 1373 + if (!*param) 1374 + param = NULL; 1375 + } 1383 1376 1384 1377 system = strsep(&trigger, ":"); 1385 1378 if (!trigger)