Merge branch 'tip/perf/urgent-2' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorIngo Molnar <mingo@kernel.org>
Thu, 14 Mar 2013 07:12:20 +0000 (08:12 +0100)
committerIngo Molnar <mingo@kernel.org>
Thu, 14 Mar 2013 07:12:20 +0000 (08:12 +0100)
Pull tracing fixes from Steven Rostedt.

Signed-off-by: Ingo Molnar <mingo@kernel.org>
1  2 
kernel/trace/ftrace.c

diff --combined kernel/trace/ftrace.c
@@@ -762,6 -762,7 +762,6 @@@ ftrace_find_profiled_func(struct ftrace
  {
        struct ftrace_profile *rec;
        struct hlist_head *hhd;
 -      struct hlist_node *n;
        unsigned long key;
  
        key = hash_long(ip, ftrace_profile_bits);
        if (hlist_empty(hhd))
                return NULL;
  
 -      hlist_for_each_entry_rcu(rec, n, hhd, node) {
 +      hlist_for_each_entry_rcu(rec, hhd, node) {
                if (rec->ip == ip)
                        return rec;
        }
@@@ -1132,6 -1133,7 +1132,6 @@@ ftrace_lookup_ip(struct ftrace_hash *ha
        unsigned long key;
        struct ftrace_func_entry *entry;
        struct hlist_head *hhd;
 -      struct hlist_node *n;
  
        if (ftrace_hash_empty(hash))
                return NULL;
  
        hhd = &hash->buckets[key];
  
 -      hlist_for_each_entry_rcu(entry, n, hhd, hlist) {
 +      hlist_for_each_entry_rcu(entry, hhd, hlist) {
                if (entry->ip == ip)
                        return entry;
        }
@@@ -1200,7 -1202,7 +1200,7 @@@ remove_hash_entry(struct ftrace_hash *h
  static void ftrace_hash_clear(struct ftrace_hash *hash)
  {
        struct hlist_head *hhd;
 -      struct hlist_node *tp, *tn;
 +      struct hlist_node *tn;
        struct ftrace_func_entry *entry;
        int size = 1 << hash->size_bits;
        int i;
  
        for (i = 0; i < size; i++) {
                hhd = &hash->buckets[i];
 -              hlist_for_each_entry_safe(entry, tp, tn, hhd, hlist)
 +              hlist_for_each_entry_safe(entry, tn, hhd, hlist)
                        free_hash_entry(hash, entry);
        }
        FTRACE_WARN_ON(hash->count);
@@@ -1273,6 -1275,7 +1273,6 @@@ alloc_and_copy_ftrace_hash(int size_bit
  {
        struct ftrace_func_entry *entry;
        struct ftrace_hash *new_hash;
 -      struct hlist_node *tp;
        int size;
        int ret;
        int i;
  
        size = 1 << hash->size_bits;
        for (i = 0; i < size; i++) {
 -              hlist_for_each_entry(entry, tp, &hash->buckets[i], hlist) {
 +              hlist_for_each_entry(entry, &hash->buckets[i], hlist) {
                        ret = add_hash_entry(new_hash, entry->ip);
                        if (ret < 0)
                                goto free_hash;
@@@ -1313,7 -1316,7 +1313,7 @@@ ftrace_hash_move(struct ftrace_ops *ops
                 struct ftrace_hash **dst, struct ftrace_hash *src)
  {
        struct ftrace_func_entry *entry;
 -      struct hlist_node *tp, *tn;
 +      struct hlist_node *tn;
        struct hlist_head *hhd;
        struct ftrace_hash *old_hash;
        struct ftrace_hash *new_hash;
        size = 1 << src->size_bits;
        for (i = 0; i < size; i++) {
                hhd = &src->buckets[i];
 -              hlist_for_each_entry_safe(entry, tp, tn, hhd, hlist) {
 +              hlist_for_each_entry_safe(entry, tn, hhd, hlist) {
                        if (bits > 0)
                                key = hash_long(entry->ip, bits);
                        else
@@@ -2898,6 -2901,7 +2898,6 @@@ static void function_trace_probe_call(u
  {
        struct ftrace_func_probe *entry;
        struct hlist_head *hhd;
 -      struct hlist_node *n;
        unsigned long key;
  
        key = hash_long(ip, FTRACE_HASH_BITS);
         * on the hash. rcu_read_lock is too dangerous here.
         */
        preempt_disable_notrace();
 -      hlist_for_each_entry_rcu(entry, n, hhd, node) {
 +      hlist_for_each_entry_rcu(entry, hhd, node) {
                if (entry->ip == ip)
                        entry->ops->func(ip, parent_ip, &entry->data);
        }
@@@ -3064,7 -3068,7 +3064,7 @@@ __unregister_ftrace_function_probe(cha
                                  void *data, int flags)
  {
        struct ftrace_func_probe *entry;
 -      struct hlist_node *n, *tmp;
 +      struct hlist_node *tmp;
        char str[KSYM_SYMBOL_LEN];
        int type = MATCH_FULL;
        int i, len = 0;
        for (i = 0; i < FTRACE_FUNC_HASHSIZE; i++) {
                struct hlist_head *hhd = &ftrace_func_hash[i];
  
 -              hlist_for_each_entry_safe(entry, n, tmp, hhd, node) {
 +              hlist_for_each_entry_safe(entry, tmp, hhd, node) {
  
                        /* break up if statements for readability */
                        if ((flags & PROBE_TEST_FUNC) && entry->ops != ops)
                                        continue;
                        }
  
-                       hlist_del(&entry->node);
-                       call_rcu(&entry->rcu, ftrace_free_entry_rcu);
+                       hlist_del_rcu(&entry->node);
+                       call_rcu_sched(&entry->rcu, ftrace_free_entry_rcu);
                }
        }
        __disable_ftrace_function_probe();