]> git.baikalelectronics.ru Git - kernel.git/commit
locking/lockdep: Correct calling tracepoints
authorLeo Yan <leo.yan@linaro.org>
Wed, 12 May 2021 12:09:37 +0000 (20:09 +0800)
committerPeter Zijlstra <peterz@infradead.org>
Tue, 18 May 2021 10:53:50 +0000 (12:53 +0200)
commit7cc4d4e6c3b8a71009c4ca34f617a2d654b9ce2b
treeba94f0e7778ed78aeabcd843665d63b8667cffa7
parent87d9f8b77b5545016adf3cfc494e6ea6899acca7
locking/lockdep: Correct calling tracepoints

The commit 69a3f3aff657 ("lockdep,trace: Expose tracepoints") reverses
tracepoints for lock_contended() and lock_acquired(), thus the ftrace
log shows the wrong locking sequence that "acquired" event is prior to
"contended" event:

  <idle>-0       [001] d.s3 20803.501685: lock_acquire: 0000000008b91ab4 &sg_policy->update_lock
  <idle>-0       [001] d.s3 20803.501686: lock_acquired: 0000000008b91ab4 &sg_policy->update_lock
  <idle>-0       [001] d.s3 20803.501689: lock_contended: 0000000008b91ab4 &sg_policy->update_lock
  <idle>-0       [001] d.s3 20803.501690: lock_release: 0000000008b91ab4 &sg_policy->update_lock

This patch fixes calling tracepoints for lock_contended() and
lock_acquired().

Fixes: 69a3f3aff657 ("lockdep,trace: Expose tracepoints")
Signed-off-by: Leo Yan <leo.yan@linaro.org>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lkml.kernel.org/r/20210512120937.90211-1-leo.yan@linaro.org
kernel/locking/lockdep.c