This is a note to let you know that I've just added the patch titled

    ftrace: Only update the function code on write to filter files

to the 2.6.33-longterm tree which can be found at:
    
http://www.kernel.org/git/?p=linux/kernel/git/longterm/longterm-queue-2.6.33.git;a=summary

The filename of the patch is:
     ftrace-only-update-the-function-code-on-write-to-filter-files.patch
and it can be found in the queue-2.6.33 subdirectory.

If you, or anyone else, feels it should not be added to the 2.6.33 longterm 
tree,
please let <[email protected]> know about it.


>From 058e297d34a404caaa5ed277de15698d8dc43000 Mon Sep 17 00:00:00 2001
From: Steven Rostedt <[email protected]>
Date: Fri, 29 Apr 2011 22:35:33 -0400
Subject: ftrace: Only update the function code on write to filter files

From: Steven Rostedt <[email protected]>

commit 058e297d34a404caaa5ed277de15698d8dc43000 upstream.

If function tracing is enabled, a read of the filter files will
cause the call to stop_machine to update the function trace sites.
It should only call stop_machine on write.

Signed-off-by: Steven Rostedt <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>

---
 kernel/trace/ftrace.c |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -2367,14 +2367,16 @@ ftrace_regex_release(struct inode *inode
                ftrace_match_records(parser->buffer, parser->idx, enable);
        }
 
-       mutex_lock(&ftrace_lock);
-       if (ftrace_start_up && ftrace_enabled)
-               ftrace_run_update_code(FTRACE_ENABLE_CALLS);
-       mutex_unlock(&ftrace_lock);
-
        trace_parser_put(parser);
        kfree(iter);
 
+       if (file->f_mode & FMODE_WRITE) {
+               mutex_lock(&ftrace_lock);
+               if (ftrace_start_up && ftrace_enabled)
+                       ftrace_run_update_code(FTRACE_ENABLE_CALLS);
+               mutex_unlock(&ftrace_lock);
+       }
+
        mutex_unlock(&ftrace_regex_lock);
        return 0;
 }


Patches currently in longterm-queue-2.6.33 which might be from 
[email protected] are

_______________________________________________
stable mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/stable

Reply via email to