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 /kernel/trace | |
| 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>
Diffstat (limited to 'kernel/trace')
| -rw-r--r-- | kernel/trace/ftrace.c | 10 |
1 files changed, 5 insertions, 5 deletions
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; |
