Commit 42e9c85f authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
parents 52366a10 20dc3847
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -2427,7 +2427,7 @@ rb_update_event(struct ring_buffer_per_cpu *cpu_buffer,
	if (unlikely(info->add_timestamp)) {
	if (unlikely(info->add_timestamp)) {
		bool abs = ring_buffer_time_stamp_abs(cpu_buffer->buffer);
		bool abs = ring_buffer_time_stamp_abs(cpu_buffer->buffer);


		event = rb_add_time_stamp(event, info->delta, abs);
		event = rb_add_time_stamp(event, abs ? info->delta : delta, abs);
		length -= RB_LEN_TIME_EXTEND;
		length -= RB_LEN_TIME_EXTEND;
		delta = 0;
		delta = 0;
	}
	}
+7 −3
Original line number Original line Diff line number Diff line
@@ -101,12 +101,16 @@ trace_boot_add_kprobe_event(struct xbc_node *node, const char *event)
		kprobe_event_cmd_init(&cmd, buf, MAX_BUF_LEN);
		kprobe_event_cmd_init(&cmd, buf, MAX_BUF_LEN);


		ret = kprobe_event_gen_cmd_start(&cmd, event, val);
		ret = kprobe_event_gen_cmd_start(&cmd, event, val);
		if (ret)
		if (ret) {
			pr_err("Failed to generate probe: %s\n", buf);
			break;
			break;
		}


		ret = kprobe_event_gen_cmd_end(&cmd);
		ret = kprobe_event_gen_cmd_end(&cmd);
		if (ret)
		if (ret) {
			pr_err("Failed to add probe: %s\n", buf);
			pr_err("Failed to add probe: %s\n", buf);
			break;
		}
	}
	}


	return ret;
	return ret;
@@ -120,7 +124,7 @@ trace_boot_add_kprobe_event(struct xbc_node *node, const char *event)
}
}
#endif
#endif


#ifdef CONFIG_HIST_TRIGGERS
#ifdef CONFIG_SYNTH_EVENTS
static int __init
static int __init
trace_boot_add_synth_event(struct xbc_node *node, const char *event)
trace_boot_add_synth_event(struct xbc_node *node, const char *event)
{
{
+19 −2
Original line number Original line Diff line number Diff line
@@ -216,11 +216,17 @@ static int event_trigger_regex_open(struct inode *inode, struct file *file)


int trigger_process_regex(struct trace_event_file *file, char *buff)
int trigger_process_regex(struct trace_event_file *file, char *buff)
{
{
	char *command, *next = buff;
	char *command, *next;
	struct event_command *p;
	struct event_command *p;
	int ret = -EINVAL;
	int ret = -EINVAL;


	next = buff = skip_spaces(buff);
	command = strsep(&next, ": \t");
	command = strsep(&next, ": \t");
	if (next) {
		next = skip_spaces(next);
		if (!*next)
			next = NULL;
	}
	command = (command[0] != '!') ? command : command + 1;
	command = (command[0] != '!') ? command : command + 1;


	mutex_lock(&trigger_cmd_mutex);
	mutex_lock(&trigger_cmd_mutex);
@@ -630,8 +636,14 @@ event_trigger_callback(struct event_command *cmd_ops,
	int ret;
	int ret;


	/* separate the trigger from the filter (t:n [if filter]) */
	/* separate the trigger from the filter (t:n [if filter]) */
	if (param && isdigit(param[0]))
	if (param && isdigit(param[0])) {
		trigger = strsep(&param, " \t");
		trigger = strsep(&param, " \t");
		if (param) {
			param = skip_spaces(param);
			if (!*param)
				param = NULL;
		}
	}


	trigger_ops = cmd_ops->get_trigger_ops(cmd, trigger);
	trigger_ops = cmd_ops->get_trigger_ops(cmd, trigger);


@@ -1368,6 +1380,11 @@ int event_enable_trigger_func(struct event_command *cmd_ops,
	trigger = strsep(&param, " \t");
	trigger = strsep(&param, " \t");
	if (!trigger)
	if (!trigger)
		return -EINVAL;
		return -EINVAL;
	if (param) {
		param = skip_spaces(param);
		if (!*param)
			param = NULL;
	}


	system = strsep(&trigger, ":");
	system = strsep(&trigger, ":");
	if (!trigger)
	if (!trigger)