Work in Progress -- lockstat and lockmeter enhancements
Lee Schermerhorn <lee.schermerhorn@hp.com>

Note:  I am maintaining changes with quilt.  Patches reside under
./.patches, with quilt's patch control info under ./.pc.  The file
00-defs-build contains shell function wrappers and environment
variables for quilt commands.
These defs, along with this README+lts, can be removed at some
point when this work is completed or abandoned.

Building:

Can build with internal copy of lockmeter.h in ./include/linux
[default] or with the lockmeter.h in the kernel source tree of
the running OS--i.e., in /lib/modules/$(uname -r)/build/include
--or from any other location by overriding the LINUX_INC_ROOT
definition on the make command line.  See the Makefile.


Changes from lockstat 1.4.11, so far:

Patch:  lockstat+lts-mods-1.patch

Makefile enhancements: build, install, cscope, tarball

Shell wrapper to select kernel version appropriate lockstat command.
Note:  hope to weaken dependency of lockstat command on exact kernel
version.  But, may still need/want this capability.
	Only install lockstat shell wrapper if specified by
	USE_LOCKSTAT_SH Makefile variable.  Default is 'n'.

version.h for version stamping lockstat executable and tarball.

README enhancements -- much more to do vis a vis documentation.

Build cleanup for various platforms, releases:
+ add header includes to obtain correct function prototypes
  fixes faults on x86_64.
+ define __KERNGLUE__ for RHEL4 [2.6.9+] builds

Reorg:
+ move externs, macro defs to header: lockstat.h

Map/symbol handling:
+ enhance to allow use of /proc/kallsyms for access to module
  symbols.

---

Patch:  lockstat-split-lockmeter.h.patch
Depends on:  lockmeter-04-split-lockmeter.h.patch

Patch:  lockstat-split-lockmeter.h.patch
Depends on:  lockmeter-04-split-lockmeter.h.patch

In the kernel patches, I split <linux/lockmeter.h> into a externally
visible [i.e., to lockstat] API definition header--still lockmeter.h--
and a kernel internal header <linux/lockmeter-internal.h>.  This
didn't actually require any changes to lockstat, as I hadn't
removed the LSTAT_*_SIZE definitions from lockmeter.h yet.  However,
I did define a mask for extracting the lock type embedded in the
call site addresses to eliminate use of a "magic number".  Changed
lockstat.c to use this symbolic mask name.

---

Patch:
Depends on:  lockmeter-05-prepare-for-dynamic-sizing.patch

lockstat-prepare-for-dynamic-sizing.patch
Change lockstat to be independent of kernel's internal table
sizes.  Pass these table sizes in the /proc/lockmeter "user
request" structure and dynamically allocate the appropriately
sized data areas in lockstat.

	Eventually hope to allow dynamic sizing of these
	tables w/o reconfiguring kernel--e.g., from lockstat
	command options.

On-going whitespace and stylistic "cleanup".

