Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 234139
b: refs/heads/master
c: b9f07eb
h: refs/heads/master
i:
  234137: f0a84e4
  234135: a11a55b
v: v3
  • Loading branch information
Wu Zhangjin authored and Ralf Baechle committed Mar 14, 2011
1 parent ff6e243 commit f6f12a9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 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: 7f21a60968221eabad5c53fe760db3d094994011
refs/heads/master: b9f07eb2f25a64098e2ba223c1a2fe2a8f249e01
11 changes: 9 additions & 2 deletions trunk/arch/mips/kernel/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ void prepare_ftrace_return(unsigned long *parent_ra_addr, unsigned long self_ra,
struct ftrace_graph_ent trace;
unsigned long return_hooker = (unsigned long)
&return_to_handler;
int faulted;
int faulted, insns;

if (unlikely(atomic_read(&current->tracing_graph_pause)))
return;
Expand Down Expand Up @@ -304,7 +304,14 @@ void prepare_ftrace_return(unsigned long *parent_ra_addr, unsigned long self_ra,
return;
}

trace.func = self_ra;
/*
* Get the recorded ip of the current mcount calling site in the
* __mcount_loc section, which will be used to filter the function
* entries configured through the tracing/set_graph_function interface.
*/

insns = in_kernel_space(self_ra) ? 2 : MCOUNT_OFFSET_INSNS + 1;
trace.func = self_ra - (MCOUNT_INSN_SIZE * insns);

/* Only trace if the calling function expects to */
if (!ftrace_graph_entry(&trace)) {
Expand Down

0 comments on commit f6f12a9

Please sign in to comment.