|
|
HEADS UP: 6491439 warlock support on x86
Date: Sat, 18 Nov 2006 13:20:05 -0800
From: frits vanderlinden <frits at sun dot com>
To: onnv-gate at onnv dot sfbay dot sun dot com
Subject: HEADS UP: 6491439 warlock support on x86
Gatelings,
If you do not write nor maintain MT code that uses locks you can
probably delete this message.
Warlock is a tool designed to help detect locking problems. In effect it
simulates the execution of all possible paths through a multi-threaded
program, watching what the program does with locks, reporting what it
thinks might be problems.
Warlock looks at the code in source form. You will need to modify the
source with special annotations that let warlock know your intent. This
initial setup can take a while, but in the process you provide good
documentation for human readers. Thereafter it is easy to check for
locking errors introduced by changes. Many engineers make a habit of
running warlock prior to code reviews and putbacks to save time and
embarrassment.
For more documentation:
http://jurassic.eng/net/suntools.eng/export/tools/internal/warlock/2.0/docs/
Warlock was only available on SPARC but recently Alexander Gorshenev
made an x86 version available which will soon be installed in public/bin.
Warlocking is not limited to drivers. Any piece of MT code that uses
locks can be warlocked. Warlock has an impressive track record of
finding obscure recursive mutex_enters, acquiring locks in an
inconsistent order, finding inconsistent protection of variables, and
exiting functions without releasing all locks. I have been using warlock
in all my driver projects since 1992.
My putback of
6491439 warlock support on x86
prepares the way for warlocking on both SPARC and x86. Currently many
drivers in ON are warlocked (have a look at
uts/{sparc|intel}/warlock/Makefile).
The most noticable change introduced by my putback is that *.wlcmd files
now live in uts/common/io/warlock so they can be shared between SPARC
and x86.
In order to see warlock in action today on a SPARC system:
- add the following to your path:
/net/suntools.central/export/tools/sparc/bin
- activate your workspace and resync with onnv-clone
- cd usr/src/uts/sparc/warlock
- make all
Note that attempting to warlock all in a workspace that does NOT contain
the usr/closed tree will fail.
A new internal mailing list, warlock-interest at sun dot com, has been created.
Aaron will be the new warlock support person and will attempt to answer
your questions (with help from the china usb and audio teams).
The nightly script will be extended to support warlocking:
6493270 nightly.sh should make it easier to run warlock
On a personal note:
This is probably my last putback (at least as a Sun employee) and my
farewell present to Solaris. I am confident that warlocking will improve
the quality. My last day is 11/23 and I will retire.
cheers
fritS
(email: fritsv at sonic dot net)
|