Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 9c66812b authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'tracing-fixes-for-linus' of...

Merge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip

* 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
  tracing: Fix missing function_graph events when we splice_read from trace_pipe
  tracing: Fix invalid function_graph entry
  trace: stop tracer in oops_enter()
  ftrace: Only update $offset when we update $ref_func
  ftrace: Fix the conditional that updates $ref_func
  tracing: only truncate ftrace files when O_TRUNC is set
  tracing: show proper address for trace-printk format
parents b5a7c9a0 e16852cf
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -301,6 +301,7 @@ int oops_may_print(void)
 */
void oops_enter(void)
{
	tracing_off();
	/* can't trust the integrity of the kernel anymore: */
	debug_locks_off();
	do_oops_enter_exit();
+2 −2
Original line number Diff line number Diff line
@@ -1662,7 +1662,7 @@ ftrace_regex_open(struct inode *inode, struct file *file, int enable)

	mutex_lock(&ftrace_regex_lock);
	if ((file->f_mode & FMODE_WRITE) &&
	    !(file->f_flags & O_APPEND))
	    (file->f_flags & O_TRUNC))
		ftrace_filter_reset(enable);

	if (file->f_mode & FMODE_READ) {
@@ -2577,7 +2577,7 @@ ftrace_graph_open(struct inode *inode, struct file *file)

	mutex_lock(&graph_lock);
	if ((file->f_mode & FMODE_WRITE) &&
	    !(file->f_flags & O_APPEND)) {
	    (file->f_flags & O_TRUNC)) {
		ftrace_graph_count = 0;
		memset(ftrace_graph_funcs, 0, sizeof(ftrace_graph_funcs));
	}
+8 −4
Original line number Diff line number Diff line
@@ -2031,7 +2031,7 @@ static int tracing_open(struct inode *inode, struct file *file)

	/* If this file was open for write, then erase contents */
	if ((file->f_mode & FMODE_WRITE) &&
	    !(file->f_flags & O_APPEND)) {
	    (file->f_flags & O_TRUNC)) {
		long cpu = (long) inode->i_private;

		if (cpu == TRACE_PIPE_ALL_CPU)
@@ -3085,6 +3085,7 @@ tracing_fill_pipe_page(size_t rem, struct trace_iterator *iter)
			break;
		}

		if (ret != TRACE_TYPE_NO_CONSUME)
			trace_consume(iter);
		rem -= count;
		if (!find_next_entry_inc(iter))	{
@@ -4233,7 +4234,10 @@ static void __ftrace_dump(bool disable_tracing)
		iter.pos = -1;

		if (find_next_entry_inc(&iter) != NULL) {
			print_trace_line(&iter);
			int ret;

			ret = print_trace_line(&iter);
			if (ret != TRACE_TYPE_NO_CONSUME)
				trace_consume(&iter);
		}

+1 −1
Original line number Diff line number Diff line
@@ -376,7 +376,7 @@ ftrace_event_seq_open(struct inode *inode, struct file *file)
	const struct seq_operations *seq_ops;

	if ((file->f_mode & FMODE_WRITE) &&
	    !(file->f_flags & O_APPEND))
	    (file->f_flags & O_TRUNC))
		ftrace_clear_events();

	seq_ops = inode->i_private;
+9 −2
Original line number Diff line number Diff line
@@ -843,9 +843,16 @@ print_graph_function(struct trace_iterator *iter)

	switch (entry->type) {
	case TRACE_GRAPH_ENT: {
		struct ftrace_graph_ent_entry *field;
		/*
		 * print_graph_entry() may consume the current event,
		 * thus @field may become invalid, so we need to save it.
		 * sizeof(struct ftrace_graph_ent_entry) is very small,
		 * it can be safely saved at the stack.
		 */
		struct ftrace_graph_ent_entry *field, saved;
		trace_assign_type(field, entry);
		return print_graph_entry(field, s, iter);
		saved = *field;
		return print_graph_entry(&saved, s, iter);
	}
	case TRACE_GRAPH_RET: {
		struct ftrace_graph_ret_entry *field;
Loading