diff options
author | Steven Rostedt (Red Hat) <rostedt@goodmis.org> | 2014-07-23 15:03:00 -0400 |
---|---|---|
committer | Steven Rostedt <rostedt@goodmis.org> | 2014-07-23 15:03:00 -0400 |
commit | 0162d621ddf3bd02bf7de324dcf002d9c84c5059 (patch) | |
tree | ba112ba7396d042a0409b6794c7d53e49f28c2be | |
parent | ba1afef6a47c4133831fefcad4e0d7bf1d0ee99e (diff) |
ftrace: Rename ftrace_ops field from trampolines to nr_trampolines
Having two fields within the same struct that is off by one character
can be confusing and error prone. Rename the counter "trampolines"
to "nr_trampolines" to explicitly show it is a counter and not to
be confused by the "trampoline" field.
Suggested-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
-rw-r--r-- | include/linux/ftrace.h | 2 | ||||
-rw-r--r-- | kernel/trace/ftrace.c | 10 |
2 files changed, 6 insertions, 6 deletions
diff --git a/include/linux/ftrace.h b/include/linux/ftrace.h index 7a5b7b97e539..6bb5e3f2a3b4 100644 --- a/include/linux/ftrace.h +++ b/include/linux/ftrace.h | |||
@@ -120,7 +120,7 @@ struct ftrace_ops { | |||
120 | void *private; | 120 | void *private; |
121 | int __percpu *disabled; | 121 | int __percpu *disabled; |
122 | #ifdef CONFIG_DYNAMIC_FTRACE | 122 | #ifdef CONFIG_DYNAMIC_FTRACE |
123 | int trampolines; | 123 | int nr_trampolines; |
124 | struct ftrace_hash *notrace_hash; | 124 | struct ftrace_hash *notrace_hash; |
125 | struct ftrace_hash *filter_hash; | 125 | struct ftrace_hash *filter_hash; |
126 | struct ftrace_hash *tramp_hash; | 126 | struct ftrace_hash *tramp_hash; |
diff --git a/kernel/trace/ftrace.c b/kernel/trace/ftrace.c index 762806026561..eda69c9f78d0 100644 --- a/kernel/trace/ftrace.c +++ b/kernel/trace/ftrace.c | |||
@@ -1513,7 +1513,7 @@ static void ftrace_remove_tramp(struct ftrace_ops *ops, | |||
1513 | * The tramp_hash entry will be removed at time | 1513 | * The tramp_hash entry will be removed at time |
1514 | * of update. | 1514 | * of update. |
1515 | */ | 1515 | */ |
1516 | ops->trampolines--; | 1516 | ops->nr_trampolines--; |
1517 | rec->flags &= ~FTRACE_FL_TRAMP; | 1517 | rec->flags &= ~FTRACE_FL_TRAMP; |
1518 | } | 1518 | } |
1519 | 1519 | ||
@@ -1522,7 +1522,7 @@ static void ftrace_clear_tramps(struct dyn_ftrace *rec) | |||
1522 | struct ftrace_ops *op; | 1522 | struct ftrace_ops *op; |
1523 | 1523 | ||
1524 | do_for_each_ftrace_op(op, ftrace_ops_list) { | 1524 | do_for_each_ftrace_op(op, ftrace_ops_list) { |
1525 | if (op->trampolines) | 1525 | if (op->nr_trampolines) |
1526 | ftrace_remove_tramp(op, rec); | 1526 | ftrace_remove_tramp(op, rec); |
1527 | } while_for_each_ftrace_op(op); | 1527 | } while_for_each_ftrace_op(op); |
1528 | } | 1528 | } |
@@ -1617,7 +1617,7 @@ static void __ftrace_hash_rec_update(struct ftrace_ops *ops, | |||
1617 | */ | 1617 | */ |
1618 | if (ftrace_rec_count(rec) == 1 && ops->trampoline) { | 1618 | if (ftrace_rec_count(rec) == 1 && ops->trampoline) { |
1619 | rec->flags |= FTRACE_FL_TRAMP; | 1619 | rec->flags |= FTRACE_FL_TRAMP; |
1620 | ops->trampolines++; | 1620 | ops->nr_trampolines++; |
1621 | } else { | 1621 | } else { |
1622 | /* | 1622 | /* |
1623 | * If we are adding another function callback | 1623 | * If we are adding another function callback |
@@ -2185,7 +2185,7 @@ static int ftrace_save_ops_tramp_hash(struct ftrace_ops *ops) | |||
2185 | int size, bits; | 2185 | int size, bits; |
2186 | int ret; | 2186 | int ret; |
2187 | 2187 | ||
2188 | size = ops->trampolines; | 2188 | size = ops->nr_trampolines; |
2189 | bits = 0; | 2189 | bits = 0; |
2190 | /* | 2190 | /* |
2191 | * Make the hash size about 1/2 the # found | 2191 | * Make the hash size about 1/2 the # found |
@@ -2239,7 +2239,7 @@ static int ftrace_save_tramp_hashes(void) | |||
2239 | free_ftrace_hash(op->tramp_hash); | 2239 | free_ftrace_hash(op->tramp_hash); |
2240 | op->tramp_hash = NULL; | 2240 | op->tramp_hash = NULL; |
2241 | 2241 | ||
2242 | if (op->trampolines) { | 2242 | if (op->nr_trampolines) { |
2243 | ret = ftrace_save_ops_tramp_hash(op); | 2243 | ret = ftrace_save_ops_tramp_hash(op); |
2244 | if (ret) | 2244 | if (ret) |
2245 | return ret; | 2245 | return ret; |