aboutsummaryrefslogtreecommitdiff
path: root/cddl/contrib/opensolaris/cmd/lockstat
Commit message (Collapse)AuthorAgeFilesLines
* Merge OpenZFS support in to HEAD.Matt Macy2020-08-251-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The primary benefit is maintaining a completely shared code base with the community allowing FreeBSD to receive new features sooner and with less effort. I would advise against doing 'zpool upgrade' or creating indispensable pools using new features until this change has had a month+ to soak. Work on merging FreeBSD support in to what was at the time "ZFS on Linux" began in August 2018. I first publicly proposed transitioning FreeBSD to (new) OpenZFS on December 18th, 2018. FreeBSD support in OpenZFS was finally completed in December 2019. A CFT for downstreaming OpenZFS support in to FreeBSD was first issued on July 8th. All issues that were reported have been addressed or, for a couple of less critical matters there are pull requests in progress with OpenZFS. iXsystems has tested and dogfooded extensively internally. The TrueNAS 12 release is based on OpenZFS with some additional features that have not yet made it upstream. Improvements include: project quotas, encrypted datasets, allocation classes, vectorized raidz, vectorized checksums, various command line improvements, zstd compression. Thanks to those who have helped along the way: Ryan Moeller, Allan Jude, Zack Welch, and many others. Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D25872 Notes: svn path=/head/; revision=364746
* Add HISTORY sections to ZFS and dtrace manpageGordon Bergling2020-06-141-1/+6
| | | | | | | | | | Reviewed by: bcr (mentor) Approved by: bcr (mentor) MFC after: 7 days Differential Revision: https://reviews.freebsd.org/D23833 Notes: svn path=/head/; revision=362170
* Add hold events for lockmgr probes, missed in r351361.Mark Johnston2019-08-211-2/+6
| | | | | | | MFC with: r351361 Notes: svn path=/head/; revision=351363
* Add lockmgr(9) probes to the lockstat DTrace provider.Mark Johnston2019-08-211-10/+14
| | | | | | | | | | | | | | | | | They follow the conventions set by rw and sx lock probes. There is an additional lockstat:::lockmgr-disown probe. Update lockstat(1) to report on contention and hold events for lockmgr locks. Document the new probes in dtrace_lockstat.4, and deduplicate some of the existing probe descriptions. Reviewed by: mjg MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21355 Notes: svn path=/head/; revision=351361
* Fix inverted predicates for sx lock hold events in lockstat(1).Mark Johnston2019-08-211-2/+2
| | | | | | | | | | | | This caused shared sx holds to be reported as exclusive, and vice versa. Reviewed by: mjg MFC after: 3 days Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=351359
* Rework and simplify the ksyms(4) implementation.Mark Johnston2017-08-031-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | - Store the symbol table contents in an anonymous swap-backed object. Have mmap(/dev/ksyms) map that object, and stop mapping the symbol table into the calling process in ksyms_open(). Previously we would cache a pointer to the pmap of the opening process, and mmap(/dev/ksyms) would create a mapping using the physical address found by a pmap lookup at the initial mapping address. However, this assumes that the cached pmap is valid, which may not be the case. [1] - Remove the ksyms ioctl interface. It appears to have been added to work around a limitation in libelf that no longer exists; see r321842. Moreover, the interface is difficult to support and isn't present in illumos. Since ksyms was added specifically to support lockstat(1), it is expected that this removal won't have any real impact. - Simplify ksyms_read() to avoid unnecessary copying. - Don't call the device handle destructor if we fail to capture a snapshot of the kernel's symbol table. devfs will do that for us. Reported by: Ilja van Sprundel <ivansprundel@ioactive.com> [1] Reviewed by: kib (previous revision) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D11789 Notes: svn path=/head/; revision=321963
* Remove local variables missed in r321842.Mark Johnston2017-08-011-4/+0
| | | | | | | X-MFC with: r321842 Notes: svn path=/head/; revision=321843
* Let lockstat use ksyms(4)'s mmap interface.Mark Johnston2017-08-011-24/+0
| | | | | | | | | The workaround described in the deleted comment is no longer needed. MFC after: 1 week Notes: svn path=/head/; revision=321842
* Have lockstat(1) trace locks by name rather than by address.Mark Johnston2015-09-302-4/+66
| | | | | | | | | | | | | | | | | | | | | | Previously, lockstat(1) would use a lock's address as its identifier when consuming data describing lock contention and hold events. After collecting the requested data, it would use ksyms(4) to resolve lock addresses to names. Of course, this doesn't work too well for locks contained in dynamically-allocated memory. This change modifies lockstat(1) to trace the lock names obtained from the base struct lock_object instead, leading to output that is generally much more useful. This change also removes the -c option, which is used to coalesce data for locks in an array. It's not possible to support this option without also tracing lock addresses, and since lock arrays in which the lock names are distinct are not very common in FreeBSD, it's simpler to just remove the option. Reviewed by: avg (earlier revision) Differential Revision: https://reviews.freebsd.org/D3661 Notes: svn path=/head/; revision=288417
* Consistently use a reader/writer flag for lockstat probes in rwlock(9) andMark Johnston2015-07-191-8/+8
| | | | | | | | sx(9), rather than using the probe function name to determine whether a given lock is a read lock or a write lock. Update lockstat(1) accordingly. Notes: svn path=/head/; revision=285704
* several lockstat improvementsAndriy Gapon2015-06-121-14/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 0. For spin events report time spent spinning, not a loop count. While loop count is much easier and cheaper to obtain it is hard to reason about the reported numbers, espcially for adaptive locks where both spinning and sleeping can happen. So, it's better to compare apples and apples. 1. Teach lockstat about FreeBSD rw locks. This is done in part by changing the corresponding probes and in part by changing what probes lockstat should expect. 2. Teach lockstat that rw locks are adaptive and can spin on FreeBSD. 3. Report lock acquisition events for successful rw try-lock operations. 4. Teach lockstat about FreeBSD sx locks. Reporting of events for those locks completely mirrors rw locks. 5. Report spin and block events before acquisition event. This is behavior documented for the upstream, so it makes sense to stick to it. Note that because of FreeBSD adaptive lock implementations both the spin and block events may be reported for the same acquisition while the upstream reports only one of them. Differential Revision: https://reviews.freebsd.org/D2727 Reviewed by: markj MFC after: 17 days Relnotes: yes Sponsored by: ClusterHQ Notes: svn path=/head/; revision=284297
* lockstat(1): document the -V option.Mark Johnston2015-05-252-2/+8
| | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=283508
* Mechanically convert cddl sun #ifdef's to illumosSteven Hartland2015-01-172-24/+19
| | | | | | | | | | | | | | | Since the upstream for cddl code is now illumos not sun, mechanically convert all sun #ifdef's to illumos #ifdef's which have been used in all newer code for some time. Also do a manual pass to correct the use if #ifdef comments as per style(9) as well as few uses of #if defined(__FreeBSD__) vs #ifndef illumos. MFC after: 1 month Sponsored by: Multiplay Notes: svn path=/head/; revision=277300
* Document the CPU+Pri_Class column rather than CPU+PRI, as the latter isn'tMark Johnston2014-10-091-5/+6
| | | | | | | | | | | | used or implemented on FreeBSD. Reported by: kmacy Reviewed by: kmacy, rpaulo MFC after: 1 week Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=272834
* Include two headers to provide prototype for modfind(2) and kldload(2).Xin LI2014-08-211-0/+3
| | | | | | | MFC after: 2 weeks Notes: svn path=/head/; revision=270315
* If the initial attempt to open /dev/ksyms fails, kldload the ksyms moduleMark Johnston2013-10-271-0/+11
| | | | | | | and retry. Notes: svn path=/head/; revision=257213
* Convert the lockstat(1) man page to mdoc and make sure that it getsMark Johnston2013-10-271-827/+351
| | | | | | | | | | | | | | | installed. Additionally, remove Solaris-specific sections and references, and replace example outputs with output from lockstat on FreeBSD, since lockstat's output contains stack traces. This change also removes some examples that don't seem to work properly on FreeBSD. The examples should be re-added when lockstat is fixed. Reported by: avg MFC after: 1 week Notes: svn path=/head/; revision=257212
* Fix lockstat breakage to arm/powerpc buildworld.Stacey Son2009-05-271-8/+12
| | | | | | | | | Thanks to IBM char's are unsigned on arm/powerpc. Approved by: gnn (mentor) Notes: svn path=/head/; revision=192937
* Add the OpenSolaris lockstat(1M) command. Requires the dtrace driver,Stacey Son2009-05-273-0/+3103
the lockstat provider, and the ksyms(4) pseudo driver kernel modules. Approved by: gnn (mentor) Notes: svn path=/head/; revision=192867