Date: Tue, 18 Mar 2014 15:39:33 -0400 From: yan cui <ccuiyyan@gmail.com> To: John Baldwin <jhb@freebsd.org> Cc: freebsd-hackers@freebsd.org, freebsd-current@freebsd.org, soc-status@freebsd.org Subject: Re: FreeBSD GSOC proposal in 2014 Message-ID: <CAAVq3rmQkV3C=t8H10QKphFfdVqPA7VZG%2BHzLDQUoiD4TmuTjw@mail.gmail.com> In-Reply-To: <201403181426.19929.jhb@freebsd.org> References: <CAAVq3rkyqmu6fKL9jFX6NmwaiB794H5fN_Ec79GYG39GHfh2Ow@mail.gmail.com> <CAAVq3rmQVZqvmF7bg0=9oHBrUDMegvmREKPe4E2RCfQ=3yxo9w@mail.gmail.com> <20140314070218.GA37327@FreeBSD.org> <201403181426.19929.jhb@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Really? Maybe I can download his code from previous GSoC. Actually, before applying for this idea, I did not scan the projects in previous years and just pick up one which I like. Are there any possibilities to improve on this part (or this idea should not be considered any more)? Yan 2014-03-18 14:26 GMT-04:00 John Baldwin <jhb@freebsd.org>: > On Friday, March 14, 2014 3:02:18 am Wojciech A. Koszek wrote: > > On Thu, Mar 13, 2014 at 09:56:35PM -0400, yan cui wrote: > > > Hi all, > > > > > > I write this mail to make my question clear. I know witness can be > used > > > to detect wrong lock order in the kernel. However, can it be used to do > > > lock profiling (what I mean is to report the information such as which > > > locks are most contended and print some related statistics such as > calling > > > graph, etc)? > > > In other words, is it enough to finish the task by porting witness to > the > > > pthread library? > > > > > > > Yan, > > > > To my knowledge WITNESS is the only tool for lock order verification. > > > > For lock profiling in the FreeBSD kernel there's a KTR subsystem. KTR > > mechanism is basically like syslog() in the user-space, but for the > kernel. > > KTR subsystem will receive messages from KTR API that is placed in the > > FreeBSD kernel. Messages get stored on the list of some sort. List can be > > exported to a file. File you can later analyze. > > > > Jeff wrote a Python app which can be used for pre-processing the KTR logs > > from scheduler and protting them visually. Link: > > > > http://svnweb.freebsd.org/base/head/tools/sched/schedgraph.py > > > > Instead of porting witness to pthreads, maybe we could evaluate expanding > > WITNESS to cover kern_umtx? This could prove to be more universal. > > > > Wojciech > > There is a dedicated lock profiler (LOCK_PROFILING) in the kernel. A > previous GSoC student from an earlier year has already re-implemented both > LOCK_PROFILING and WITNESS for pthreads. > > -- > John Baldwin > -- Think big; Dream impossible; Make it happen.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAAVq3rmQkV3C=t8H10QKphFfdVqPA7VZG%2BHzLDQUoiD4TmuTjw>