mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
	Peter Zijlstra <peterz@infradead.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	David Miller <davem@davemloft.net>,
	Mathieu Desnoyers <mathieu.desnoyers@polymtl.ca>,
	Gregory Haskins <ghaskins@novell.com>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	"Luis Claudio R. Goncalves" <lclaudio@uudg.org>,
	Clark Williams <williams@redhat.com>,
	srostedt@redhat.com, Abhishek Sagar <sagar.abhishek@gmail.com>
Subject: [PATCH 1/3] ftrace: do not show freed records in available_filter_functions
Date: Thu, 14 Aug 2008 22:47:17 -0400	[thread overview]
Message-ID: <20080815030047.164606620@goodmis.org> (raw)
In-Reply-To: <20080815024716.480118113@goodmis.org>

[-- Attachment #1: ftrace-dont-print-freed-recs.patch --]
[-- Type: text/plain, Size: 1243 bytes --]

Seems that freed records can appear in the available_filter_functions list.
This patch fixes that.

CC: Abhishek Sagar <sagar.abhishek@gmail.com>
Signed-off-by: Steven Rostedt <srostedt@redhat.com>
---
 kernel/trace/ftrace.c |   10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

Index: linux-tip.git/kernel/trace/ftrace.c
===================================================================
--- linux-tip.git.orig/kernel/trace/ftrace.c	2008-08-14 22:43:01.000000000 -0400
+++ linux-tip.git/kernel/trace/ftrace.c	2008-08-14 22:43:03.000000000 -0400
@@ -879,15 +879,13 @@ t_next(struct seq_file *m, void *v, loff
 		}
 	} else {
 		rec = &iter->pg->records[iter->idx++];
-		if ((!(iter->flags & FTRACE_ITER_FAILURES) &&
+		if ((rec->flags & FTRACE_FL_FREE) ||
+
+		    (!(iter->flags & FTRACE_ITER_FAILURES) &&
 		     (rec->flags & FTRACE_FL_FAILED)) ||
 
 		    ((iter->flags & FTRACE_ITER_FAILURES) &&
-		     (!(rec->flags & FTRACE_FL_FAILED) ||
-		      (rec->flags & FTRACE_FL_FREE))) ||
-
-		    ((iter->flags & FTRACE_ITER_FILTER) &&
-		     !(rec->flags & FTRACE_FL_FILTER)) ||
+		     !(rec->flags & FTRACE_FL_FAILED)) ||
 
 		    ((iter->flags & FTRACE_ITER_NOTRACE) &&
 		     !(rec->flags & FTRACE_FL_NOTRACE))) {

-- 

  reply	other threads:[~2008-08-15  3:01 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-15  2:47 [PATCH 0/3] ftrace: handle kernel code remove Steven Rostedt
2008-08-15  2:47 ` Steven Rostedt [this message]
2008-08-15  2:47 ` [PATCH 2/3] ftrace: move notrace to compiler.h Steven Rostedt
2008-08-15  2:47 ` [PATCH 3/3] ftrace: remove old pointers to mcount Steven Rostedt
2008-08-15  9:28 ` [PATCH 0/3] ftrace: handle kernel code remove Ingo Molnar
2008-08-15  9:38   ` Ingo Molnar
2008-08-15  9:48     ` Ingo Molnar
2008-08-15 10:06       ` Ingo Molnar
2008-08-15 10:14         ` Ingo Molnar
2008-08-15 20:02         ` Sam Ravnborg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080815030047.164606620@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=acme@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=ghaskins@novell.com \
    --cc=lclaudio@uudg.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mathieu.desnoyers@polymtl.ca \
    --cc=mingo@elte.hu \
    --cc=peterz@infradead.org \
    --cc=sagar.abhishek@gmail.com \
    --cc=srostedt@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    --cc=williams@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome