lockstat: repair erronous contention statistics
authorJoe Korty <joe.korty@ccur.com>
Mon, 25 Aug 2008 21:16:23 +0000 (17:16 -0400)
committerIngo Molnar <mingo@elte.hu>
Tue, 26 Aug 2008 08:37:47 +0000 (10:37 +0200)
Fix bad contention counting in /proc/lock_stat.

/proc/lockstat tries to gather per-ip contention
statistics per-lock.  This was failing due to
a garbage per-ip index selector being used.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
kernel/lockdep.c

index 3bfb1877a00372b0a99e4a37d1686a220251b910..b5db51d2803deff8357c1829d0deddd75f00186c 100644 (file)
@@ -3029,7 +3029,7 @@ found_it:
 
        stats = get_lock_stats(hlock_class(hlock));
        if (point < ARRAY_SIZE(stats->contention_point))
-               stats->contention_point[i]++;
+               stats->contention_point[point]++;
        if (lock->cpu != smp_processor_id())
                stats->bounces[bounce_contended + !!hlock->read]++;
        put_lock_stats(stats);