Blogs
Daniel Tralamazza
français | english
EPFL > Blogs > Daniel Tralamazza >FreeBSD kernel lock profiling
BLOGS
Home
My blogs
Directory
New blog
Help
CALENDAR
February 2010
SuMoTuWeThFrSa
 123456
78910111213
14151617181920
21222324252627
28      
       
« | Today | »
CATEGORIES
concurrency
I/O
Profiling

RSS
FreeBSD kernel lock profiling

I recently discovered that FreeBSD has a neat way of doing kernel lock profiling. To use it you just need to add a single line in your kernel config script:

options  LOCK_PROFILING

Rebuild, install and reboot your new kernel. To check if it's working call sysctl debug.lock, you should see some options. Now try:

> sysctl debug.lock.prof.enable=1

> (launch a program or just wait a few seconds)

> sysctl debug.lock.prof.enable=0

> sysctl debug.lock.prof.stats

The stats include: file:line and lock type, maximum time held, total time held, total wait time, count, average time held, average wait time, contention while holding, contention while locking



Posted by Daniel Tralamazza on Monday 19 January 2009 at 15:38


Comments



SEARCH
TOOLS
NEWSLETTER
Receive an email when an article is added to this blog!