Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 100576
b: refs/heads/master
c: a4500b8
h: refs/heads/master
v: v3
  • Loading branch information
Abhishek Sagar authored and Ingo Molnar committed Jun 14, 2008
1 parent 5686918 commit bc583dc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 20764ff1efb440640353053ec83263e69e1259e0
refs/heads/master: a4500b84c51645bbc86be3ca84f2252b7ada060f
12 changes: 9 additions & 3 deletions trunk/kernel/trace/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -355,20 +355,26 @@ __ftrace_replace_code(struct dyn_ftrace *rec,
* If this record is set not to trace then
* do nothing.
*
* If this record is set not to trace and
* it is enabled then disable it.
*
* If this record is not set to be filtered and
* it is enabled, disable it.
*/
fl = rec->flags & (FTRACE_FL_FILTER | FTRACE_FL_ENABLED);

fl = rec->flags & (FTRACE_FL_FILTER | FTRACE_FL_NOTRACE |
FTRACE_FL_ENABLED);

if ((fl == (FTRACE_FL_FILTER | FTRACE_FL_ENABLED)) ||
(fl == 0) || (rec->flags & FTRACE_FL_NOTRACE))
(fl == (FTRACE_FL_FILTER | FTRACE_FL_NOTRACE)) ||
!fl || (fl == FTRACE_FL_NOTRACE))
return 0;

/*
* If it is enabled disable it,
* otherwise enable it!
*/
if (fl == FTRACE_FL_ENABLED) {
if (fl & FTRACE_FL_ENABLED) {
/* swap new and old */
new = old;
old = ftrace_call_replace(ip, FTRACE_ADDR);
Expand Down

0 comments on commit bc583dc

Please sign in to comment.