diff options
author | Luc Maranget <[email protected]> | 2018-05-14 16:33:48 -0700 |
---|---|---|
committer | Ingo Molnar <[email protected]> | 2018-05-15 08:11:17 +0200 |
commit | 15553dcbca0638de57047e79b9fb4ea77aa04db3 (patch) | |
tree | c8ea4191091b107a12b2e5bb1f35bb04a112fe04 /tools/perf/scripts/python/stat-cpi.py | |
parent | 2fb6ae162f25a9c3bc45663c479a2b15fb69e768 (diff) |
tools/memory-model: Add model support for spin_is_locked()
This commit first adds a trivial macro for spin_is_locked() to
linux-kernel.def.
It also adds cat code for enumerating all possible matches of lock
write events (set LKW) with islocked events returning true (set RL,
for Read from Lock), and unlock write events (set UL) with islocked
events returning false (set RU, for Read from Unlock). Note that this
intentionally does not model uniprocessor kernels (CONFIG_SMP=n) built
with CONFIG_DEBUG_SPINLOCK=n, in which spin_is_locked() unconditionally
returns zero.
It also adds a pair of litmus tests demonstrating the minimal ordering
provided by spin_is_locked() in conjunction with spin_lock(). Will Deacon
noted that this minimal ordering happens on ARMv8:
https://lkml.kernel.org/r/[email protected]
Notice that herd7 installations strictly older than version 7.49
do not handle the new constructs.
Signed-off-by: Luc Maranget <[email protected]>
Signed-off-by: Paul E. McKenney <[email protected]>
Reviewed-by: Alan Stern <[email protected]>
Cc: Akira Yokosawa <[email protected]>
Cc: Andrea Parri <[email protected]>
Cc: Andrew Morton <[email protected]>
Cc: Boqun Feng <[email protected]>
Cc: David Howells <[email protected]>
Cc: Jade Alglave <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Luc Maranget <[email protected]>
Cc: Nicholas Piggin <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Will Deacon <[email protected]>
Cc: [email protected]
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/stat-cpi.py')
0 files changed, 0 insertions, 0 deletions