aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/trace
diff options
context:
space:
mode:
authorSteven Rostedt <srostedt@redhat.com>2010-09-09 08:43:22 -0400
committerSteven Rostedt <rostedt@goodmis.org>2010-09-14 11:42:29 -0400
commit2bccfffd1538f3523847583213567e2f7ce00926 (patch)
tree7062e0bfc46f66efa2ec3231a6c718a901a0a80c /kernel/trace
parentbfa88ea7ee9e6b4fd673e45a8cc0a8e0b7ef4761 (diff)
tracing: Do not reset *pos in set_ftrace_filter
After the filtered functions are read, the probed functions are read from the hash in set_ftrace_filter. When the hashed probed functions are read, the *pos passed in is reset. Instead of modifying the pos given to the read function, just record the pos where the filtered functions ended and subtract from that. Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'kernel/trace')
-rw-r--r--kernel/trace/ftrace.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c
index fa7ece649fe1..585ea27025b1 100644
--- a/kernel/trace/ftrace.c
+++ b/kernel/trace/ftrace.c
@@ -1368,6 +1368,7 @@ enum {
1368#define FTRACE_BUFF_MAX (KSYM_SYMBOL_LEN+4) /* room for wildcards */ 1368#define FTRACE_BUFF_MAX (KSYM_SYMBOL_LEN+4) /* room for wildcards */
1369 1369
1370struct ftrace_iterator { 1370struct ftrace_iterator {
1371 loff_t func_pos;
1371 struct ftrace_page *pg; 1372 struct ftrace_page *pg;
1372 int hidx; 1373 int hidx;
1373 int idx; 1374 int idx;
@@ -1418,12 +1419,15 @@ static void *t_hash_start(struct seq_file *m, loff_t *pos)
1418 loff_t l; 1419 loff_t l;
1419 1420
1420 if (!(iter->flags & FTRACE_ITER_HASH)) 1421 if (!(iter->flags & FTRACE_ITER_HASH))
1421 *pos = 0; 1422 iter->func_pos = *pos;
1423
1424 if (iter->func_pos > *pos)
1425 return NULL;
1422 1426
1423 iter->flags |= FTRACE_ITER_HASH; 1427 iter->flags |= FTRACE_ITER_HASH;
1424 1428
1425 iter->hidx = 0; 1429 iter->hidx = 0;
1426 for (l = 0; l <= *pos; ) { 1430 for (l = 0; l <= (*pos - iter->func_pos); ) {
1427 p = t_hash_next(m, p, &l); 1431 p = t_hash_next(m, p, &l);
1428 if (!p) 1432 if (!p)
1429 break; 1433 break;