This is an old revision of the document!
Userland Lock Profiling and Verification
Project description
The goal of this project is to provide userland versions of the LOCK_PROFILING and WITNESS kernel options. This will require the addition of new, instrumented libraries to the base system build. Modifications to pthread.h will be needed in order to collect file and line information for lock acquisition and release.
One problematic area is the lack of lock names for the pthread locks. Default names will be automatically generated, and additional functions pthread_{mutex,rwlock,etc}attr_setname_np() and pthread_{mutex,rwlock,etc}attr_setname_np() will be added to allow for more user-friendly names to be selected.
Profiling statistics will be available via an external XML file and a pair of new functions, pthread_getprofiledata_np(). Lock order reversals will be logged to an external XML file as well.
Approach to solving the problem
(Details as to how you intend to approach the problem, if applicable. May include ideas as to how to break the problem down into smaller parts, or notes on research you need to do before settling on your final approach to solving the problem)
Deliverables
The project will provide:
- Lock profiling data recording and access via library API
- Lock order reversal recording and access via library API
- Logging of statistics to a file
- Data viewer
Milestones
- May 21: Start of coding
- June 1: Lock profiling integrated into build system (stub functions only)
- June 15: Lock profiling code feature complete
- July 9-13: Mid-term Evaluations
- July 6: Data logging feature complete
- July 10: Witness library integrated into build system
- July 27: Witness library feature complete
- August 10: Data viewer
- August 13: End of coding (soft)
- August 20: End of coding (hard)
Test Plan
(List of steps you plan to use to test your work, as discussed with your mentor)
The Code
The code will be available in the Subversion repository at https://socsvn.freebsd.org/socsvn/soc2012/gmiller/.
Useful links
(Links to any external resources, work, research etc which may be useful to you or to anybody wanting to understand your work)