1.\" 2.\" Copyright (c) 2010 The FreeBSD Foundation 3.\" All rights reserved. 4.\" 5.\" This software was developed by Rui Paulo under sponsorship from the 6.\" FreeBSD Foundation. 7.\" 8.\" Redistribution and use in source and binary forms, with or without 9.\" modification, are permitted provided that the following conditions 10.\" are met: 11.\" 1. Redistributions of source code must retain the above copyright 12.\" notice, this list of conditions and the following disclaimer. 13.\" 2. Redistributions in binary form must reproduce the above copyright 14.\" notice, this list of conditions and the following disclaimer in the 15.\" documentation and/or other materials provided with the distribution. 16.\" 17.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 18.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 19.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 20.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 21.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 22.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 23.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 24.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 25.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 26.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 27.\" SUCH DAMAGE. 28.\" 29.Dd September 13, 2010 30.Dt PLOCKSTAT 1 31.Os 32.Sh NAME 33.Nm plockstat 34.Nd Trace pthread lock statistics using DTrace 35.Sh SYNOPSIS 36.Nm 37.Op Fl vACHV 38.Op Fl n Ar count 39.Op Fl s Ar depth 40.Op Fl e Ar secs 41.Op Fl x Ar opt Ns = Ns Ar val 42.Ar command 43.Op arg... 44.Nm 45.Op Fl vACHV 46.Op Fl n Ar count 47.Op Fl s Ar depth 48.Op Fl e Ar secs 49.Op Fl x Ar opt Ns = Ns Ar val 50.Fl p Ar pid 51.Sh DESCRIPTION 52The 53.Nm 54utility traces pthread locks (mutexes and rwlocks) and prints statistics about 55them. 56You can use 57.Nm 58to investigate bottlenecks in your software. 59.Pp 60The following options are available: 61.Bl -tag -width indent 62.It Fl v 63Be verbose. 64.It Fl A 65Print all statistics. 66.It Fl C 67Print commulative statistics (the default). 68.It Fl H 69Print a histogram. 70.It Fl V 71Print the DTrace script about to be used to stderr. 72.It Fl n Ar count 73Set the aggregation count for the data set. 74.It Fl s Ar depth 75Set the ustack (userland stack) caller depth. 76.It Fl e Ar secs 77Does nothing at the moment. 78.It Fl x Ar opt Ns = Ns Ar val 79Specify DTrace options. 80See the 81.Xr dtrace 1 82man page for more details. 83.El 84.Sh EXIT STATUS 85.Ex -std 86.Sh SEE ALSO 87.Xr dtrace 1 , 88.Xr pthread 3 89.Sh HISTORY 90The 91.Nm 92utility comes from OpenSolaris and was first imported into 93.Fx 9.0 . 94