Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 304953
b: refs/heads/master
c: f0cf973
h: refs/heads/master
i:
  304951: b17808d
v: v3
  • Loading branch information
Steven Rostedt authored and Steven Rostedt committed May 16, 2012
1 parent 3f79815 commit da85754
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 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: a650e02a528ab9d6d6f0b8b57745c32f2a138459
refs/heads/master: f0cf973a224a3e3c1dec3395af3ba01cf14b1ff4
2 changes: 1 addition & 1 deletion trunk/include/linux/ftrace.h
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,7 @@ struct dyn_ftrace *ftrace_rec_iter_record(struct ftrace_rec_iter *iter);
int ftrace_update_record(struct dyn_ftrace *rec, int enable);
int ftrace_test_record(struct dyn_ftrace *rec, int enable);
void ftrace_run_stop_machine(int command);
int ftrace_location(unsigned long ip);
unsigned long ftrace_location(unsigned long ip);

extern ftrace_func_t ftrace_trace_function;

Expand Down
16 changes: 10 additions & 6 deletions trunk/kernel/trace/ftrace.c
Original file line number Diff line number Diff line change
Expand Up @@ -1393,7 +1393,7 @@ static int ftrace_cmp_recs(const void *a, const void *b)
return 0;
}

static int ftrace_location_range(unsigned long start, unsigned long end)
static unsigned long ftrace_location_range(unsigned long start, unsigned long end)
{
struct ftrace_page *pg;
struct dyn_ftrace *rec;
Expand All @@ -1410,7 +1410,7 @@ static int ftrace_location_range(unsigned long start, unsigned long end)
sizeof(struct dyn_ftrace),
ftrace_cmp_recs);
if (rec)
return 1;
return rec->ip;
}

return 0;
Expand All @@ -1420,12 +1420,12 @@ static int ftrace_location_range(unsigned long start, unsigned long end)
* ftrace_location - return true if the ip giving is a traced location
* @ip: the instruction pointer to check
*
* Returns 1 if @ip given is a pointer to a ftrace location.
* Returns rec->ip if @ip given is a pointer to a ftrace location.
* That is, the instruction that is either a NOP or call to
* the function tracer. It checks the ftrace internal tables to
* determine if the address belongs or not.
*/
int ftrace_location(unsigned long ip)
unsigned long ftrace_location(unsigned long ip)
{
return ftrace_location_range(ip, ip);
}
Expand All @@ -1442,8 +1442,12 @@ int ftrace_location(unsigned long ip)
*/
int ftrace_text_reserved(void *start, void *end)
{
return ftrace_location_range((unsigned long)start,
(unsigned long)end);
unsigned long ret;

ret = ftrace_location_range((unsigned long)start,
(unsigned long)end);

return (int)!!ret;
}

static void __ftrace_hash_rec_update(struct ftrace_ops *ops,
Expand Down

0 comments on commit da85754

Please sign in to comment.