summaryrefslogtreecommitdiffstats
path: root/cddl/lib
Commit message (Collapse)AuthorAgeFilesLines
* Initial version of DTrace on ARM32.gnn2015-02-102-1/+6
| | | | | Submitted by: Howard Su based on work by Oleksandr Tymoshenko Reviewed by: ian, andrew, rpaulo, markj
* MFV r272851:markj2014-12-081-0/+1
| | | | | | 5202 want ctf(4) illumos/illumos-gate@fe2e029eea29fd49d0d9058dbd5b79a252667e6b
* MFV r260710 + 275532:delphij2014-12-061-0/+1
| | | | | | Add a new method, nvlist_print_json to allow libnvpair to emit JSON. MFC after: 1 month
* Correct the calculation of tcps_rto in the struct tcpcb -> tcpsinfo_tmarkj2014-10-211-1/+1
| | | | | | | translator. Submitted by: Grenville Armitage <garmitage@swin.edu.au> MFC after: 1 week
* Update the TCP structure used by DTrace to show the smoothed RTT.gnn2014-10-191-0/+2
| | | | | | | This will allow similar functionality to SIFTR to be built with DTrace. Submitted by: Grenville Armitage MFC after: 2 weeks
* Hook up support for userland CTF support in DTrace. This required somemarkj2014-10-031-3/+3
| | | | | | | | | | | | | | | | | | modifications to libproc to support fetching the CTF info for a given file. With this change, dtrace(1) is able to resolve type info for function and USDT probe arguments, and function return values. In particular, the args[n] syntax should now work for referencing arguments of userland probes, provided that the requisite CTF info is available. The uctf tests pass if the test programs are compiled with CTF info. The current infrastructure around the DTrace test suite doesn't support this yet. Differential Revision: https://reviews.freebsd.org/D891 MFC after: 1 month Relnotes: yes Sponsored by: EMC / Isilon Storage Division
* Add dependencies to various libraries to libzfs and libzpool.delphij2014-10-032-4/+8
| | | | Submitted by: sef
* Revert r272189, the committed version was an old version and breaks build.delphij2014-09-271-2/+2
| | | | Pointy hat to: delphij
* Add libuutil to dependency list.delphij2014-09-261-2/+2
| | | | | Noticed by: sef MFC after: 3 days
* Make DTrace stuff compile with C99 standard.delphij2014-08-221-0/+1
|
* Remove ia64.marcel2014-07-071-1/+1
| | | | | | | | | | | | | | | | | This includes: o All directories named *ia64* o All files named *ia64* o All ia64-specific code guarded by __ia64__ o All ia64-specific makefile logic o Mention of ia64 in comments and documentation This excludes: o Everything under contrib/ o Everything under crypto/ o sys/xen/interface o sys/sys/elf_common.h Discussed at: BSDcan
* Add stubs for CTF functions which are not yet implemented.rpaulo2014-06-261-0/+2
| | | | MFC after: 2 weeks
* Explicitly link libzfs against libavl as it is done in OpenSolarisdelphij2014-05-221-2/+2
| | | | | | | | | | | | | (4543:12bb2876a62e). Without this, some third party applications may break because the lack of AVL related symbols. FreeBSD base system are not affected because the FreeBSD ZFS command line tools were all linked against libavl and thus hide the underlying issue. PR: java/183081 Tested by: jkim MFC after: 3 days
* Bind ip/tcp/udp provider translators and symbols to the same versions as inmarkj2014-05-143-57/+57
| | | | | | | | | | | illumos, rather than using "1.0" everywhere. Some of the translators use D functions that are not present in version 1.0 (e.g. inet_ntoa()) which can result in libdtrace crashing when running scripts that restrict themselves to version 1.0 (e.g. with "-x version=1.0"). MFC after: 1 week
* Import adapted OpenSolaris' thread pool API implementation.mav2014-05-081-0/+1
| | | | | | | | | | The thread pool is used by libzfs to implement parallel disk scanning. Without this change our dummy wrapper made `zpool import ZZZ` command to scan all disks sequentially from the single thread when searching for pools. This change makes it use two threads per CPU, same as in OpenSolaris. On system with 200 HDDs this change reduces ZFS pool import time from 35 to 22 seconds.
* Use src.opts.mk in preference to bsd.own.mk except where we need stuffimp2014-05-061-1/+1
| | | | from the latter.
* Remove a duplicate definition.markj2014-05-041-1/+0
| | | | MFC after: 3 days
* Spell NO_PROFILE= as MK_PROFILE=no.imp2014-04-251-1/+1
|
* Add placeholder Kyuafiles for various top-level hierarchies.jmmv2014-04-212-1/+16
| | | | | | | | | | | | This change adds tests/ directories in the source tree to create various subdirectories in /usr/tests/ and to install placeholder Kyuafiles for them. the relevant hierarchies are: cddl, etc, games, gnu and secure. The reason for this is to simplify the addition of new test programs for utilities or libraries under any of these directories. Doing so on a case by case basis is unnecessary and is quite an obscure process.
* mark that libctf depends upon libz so that if you dlopen libctf, youjmg2014-03-051-0/+3
| | | | | don't get: Undefined symbol "zError"
* Move some files that are identical on i386 and amd64 to an x86 subdirectorymarkj2014-02-271-0/+2
| | | | | | | rather than keeping duplicate copies. Discussed with: avg MFC after: 1 week
* spelling in comments fixupsbruno2013-11-041-2/+2
| | | | Submitted by: Joerg Sonnenberger <joerg@britannica.bec.de>
* This library uses macros to define fprintf behvavior for several object typessbruno2013-11-031-0/+9
| | | | | | | | | The compiler will see the non-string literal arguments to the fprintf calls and omit warnings for them. Quiese these warnings in contrib code: cddl/contrib/opensolaris/lib/libnvpair/libnvpair.c:743:12: warning: format string is not a string literal (potentially insecure) [-Wformat-security] ARENDER(pctl, nvlist_array, nvl, name, val, nelem);
* Add a function, memstr, which can be used to convert a buffer ofmarkj2013-10-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | null-separated strings to a single string. This can be used to print the full arguments of a process using execsnoop (from the DTrace toolkit) or with the following one-liner: dtrace -n 'syscall::execve:return {trace(curpsinfo->pr_psargs);}' Note that this relies on the process arguments being cached via the struct proc, which means that it will not work for argvs longer than kern.ps_arg_cache_limit. However, the following rather non-portable script can be used to extract any argv at exec time: fbt::kern_execve:entry { printf("%s", memstr(args[1]->begin_argv, ' ', args[1]->begin_envv - args[1]->begin_argv)); } The debug.dtrace.memstr_max sysctl limits the maximum argument size to memstr(). Thanks to Brendan Gregg for helpful comments on freebsd-dtrace. Tested by: Fabian Keil (earlier version) MFC after: 2 weeks
* Add a separate translator for headers passed to the TCP probes in themarkj2013-10-021-1/+39
| | | | | | | | | input path. These probes get some of the fields in host order, whereas the output probes get them in network order, so a single translator isn't enough. This workaround ensures that the problem is essentially invisble to users: none of the probe arguments or their fields have changed. Approved by: re (hrs)
* Use the address of the inpcb rather than the tcpcb to identify TCPmarkj2013-09-151-1/+1
| | | | | | | connections. This keeps the tcp provider consistent with the other network providers. Approved by: re (delphij)
* Build all ZFS testing & debugging tools with -g.will2013-08-271-2/+4
| | | | | | These programs and everything using libzpool rely on the embedded asserts to verify the correctness of operations. Given that, the core dumps would be useless without debug symbols.
* Implement the ip, tcp, and udp DTrace providers. The probe definitions usemarkj2013-08-254-0/+566
| | | | | | | | | dynamic translation so that their arguments match the definitions for these providers in Solaris and illumos. Thus, existing scripts for these providers should work unmodified on FreeBSD. Tested by: gnn, hiren MFC after: 1 month
* Bring back part of r249367 by adding DTrace's temporal option, which allowsmarkj2013-05-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | users to guarantee that the output of DTrace scripts will be time-ordered. This option is enabled by adding the line #pragma D option temporal to the beginning of a script, or by adding '-x temporal' to the arguments of dtrace(1). This change fixes a bug in the original port of the temporal option. This bug was causing some assertions to fail, so they had been disabled; in this revision the assertions are working properly and are enabled. The DTrace version number has been bumped from 1.9.0 to 1.9.1 to reflect the language change that's being introduced. This change corresponds to part of illumos-gate commit e5803b76927480: 3021 option for time-ordered output from dtrace(1M) Reviewed by: pfg Obtained from: illumos MFC after: 1 month
* Work around the implementation of LIBRARIES_ONLY. It causes drti.o tobrooks2013-05-071-0/+8
| | | | | | | | | | not be installed in /usr/lib32 on systems with compat-32 support. This fix has two parts. First, the build is forced by linking drti.o into a dummy internal library. Second, the object file is installed manually in the LIBRARIES_ONLY case. MFC after: 3 days
* DTrace: NFS translators should be split into client/server piecespfg2013-04-182-31/+59
| | | | | | | | | | Belatedly update the provider with changes from OpenSolaris: PSARC 2008/050 DTrace NFS v3 Provider 6696397 NFS v3 provider reports all UDP clients as 0.0.0.0 6711844 assert: vp->v_shrlocks Obtained from: Illumos
* DTrace: Revert r249367pfg2013-04-171-1/+0
| | | | | | | | | | | | | | | | | | | | | | The following change from illumos brought caused DTrace to pause in an interactive environment: 3026 libdtrace should set LD_NOLAZYLOAD=1 to help the pid provider This was not detected during testing because it doesn't affect scripts. We shouldn't be changing the environment, especially since the LD_NOLAZYLOAD option doesn't apply to our (GNU) ld. Unfortunately the change from upstream was made in such a way that it is very difficult to separate this change from the others so, at least for now, it's better to just revert everything. Reference: https://www.illumos.org/issues/3026 Reported by: Navdeep Parhar and Mark Johnston
* DTrace: NFS translators should be split into client/server piecespfg2013-04-152-19/+55
| | | | | | | | | | | | | | | | Merge change from illumos: 1731 DTrace NFS translators should be split into client/server pieces Illumos Revision: 13523:6763769941d2 This code seems to be currently unused on FreeBSD. Reference: https://www.illumos.org/issues/1731 Obtained from: Illumos MFC after: 1 week
* DTrace: option for time-ordered outputpfg2013-04-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merge changes from illumos: 3021 option for time-ordered output from dtrace(1M) 3022 DTrace: keys should not affect the sort order when sorting by value 3023 it should be possible to dereference dynamic variables 3024 D integer narrowing needs some work 3025 register leak in D code generation 3026 libdtrace should set LD_NOLAZYLOAD=1 to help the pid provider This brings yet another feature implemented in upstream DTrace. A complete description is available here: http://dtrace.org/blogs/ahl/2012/07/28/my-new-dtrace-favorite/ This change bumps the DT_VERS_* number to 1.9.1 in accordance to what is done in illumos. This change was somewhat complicated because upstream is mixed many changes in an individual commit and some of the tests don't really apply to us. There are also appear to be differences in timestamping with Solaris so we had to workaround some assertions making sure no regression happened. Special thanks to Fabian Keil for changes and testing. Illumos Revisions: 13758:23432da34147 Reference: https://www.illumos.org/issues/3021 https://www.illumos.org/issues/3022 https://www.illumos.org/issues/3023 https://www.illumos.org/issues/3024 https://www.illumos.org/issues/3025 https://www.illumos.org/issues/1694 Tested by: Fabian Keil Obtained from: Illumos MFC after: 1 months
* Revert previous change in favor of a fix to the actual dtracegnn2013-03-281-0/+2
| | | | libraries that addresses a #pragma issue.
* Remove dependency code that caused a double inclusion.gnn2013-03-281-2/+0
| | | | Pointed out by: rpaulo and others
* Dtrace: Add SUN MDB-like type-aware print() action.pfg2013-03-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | Merge change from illumos: 1694 Add type-aware print() action This is a very nice feature implemented in upstream Dtrace. A complete description is available here: http://dtrace.org/blogs/eschrock/2011/10/26/your-mdb-fell-into-my-dtrace/ This change bumps the DT_VERS_* number to 1.9.0 in accordance to what is done in illumos. While here also include some minor cleanups to ease further merging and appease clang with a fix by Fabian Keil. Illumos Revisions: 13501:c3a7090dbc16 13483:f413e6c5d297 Reference: https://www.illumos.org/issues/1560 https://www.illumos.org/issues/1694 Tested by: Fabian Keil Obtained from: Illumos MFC after: 1 month
* Move common zfs ioctl compatibility functions (userland) into libzfs_compat.cmm2013-03-182-1/+6
| | | | Introduce additional constants for zfs ioctl versions
* Add forwards compatibility for libzfs_coremm2013-03-171-1/+1
| | | | Unsupported: creation of multiple snapshots including "zfs snapshot -r"
* WiP merge of libzfs_core (MFV r238590, r238592)mm2013-03-053-2/+39
| | | | not yet working, ioctl handling needs to be changed
* Add a new LIBRARIES_ONLY make variable to disable the build and installbrooks2013-01-171-1/+1
| | | | | | | | | | of files other than the actual libraries. Use LIBRARIES_ONLY to supress the inclusion of files in the lib32 distribution that are duplicates of files in base. Sponsored by: DARPA, AFRL Reviewed by: emaste
* Implement DTrace for PowerPC. This includes both 32-bit and 64-bit.jhibbits2012-11-072-1/+6
| | | | | | | | | | | There is one known issue: Some probes will display an error message along the lines of: "Invalid address (0)" I tested this with both a simple dtrace probe and dtruss on a few different binaries on 32-bit. I only compiled 64-bit, did not run it, but I don't expect problems without the modules loaded. Volunteers are welcome. MFC after: 1 month
* Add TRIM support.pjd2012-09-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | The code builds a map of regions that were freed. On every write the code consults the map and eventually removes ranges that were freed before, but are now overwritten. Freed blocks are not TRIMed immediately. There is a tunable that defines how many txg we should wait with TRIMming freed blocks (64 by default). There is a low priority thread that TRIMs ranges when the time comes. During TRIM we keep in-flight ranges on a list to detect colliding writes - we have to delay writes that collide with in-flight TRIMs in case something will be reordered and write will reached the disk before the TRIM. We don't have to do the same for in-flight writes, as colliding writes just remove ranges to TRIM. Sponsored by: multiplay.co.uk This work includes some important fixes and some improvements obtained from the zfsonlinux project, including TRIMming entire vdevs on pool create/add/attach and on pool import for spare and cache vdevs. Obtained from: zfsonlinux Submitted by: Etienne Dechamps <etienne.dechamps@ovh.net>
* Merge recent zfs vendor changes, sync code and adjust userland DEBUG.mm2012-09-121-0/+3
| | | | | | | | | | | | | | | | | | | | | Illumos issued covered: 1884 Empty "used" field for zfs *space commands 3006 VERIFY[S,U,P] and ASSERT[S,U,P] frequently check if first argument is zero 3028 zfs {group,user}space -n prints (null) instead of numeric GID/UID 3048 zfs {user,group}space [-s|-S] is broken 3049 zfs {user,group}space -t doesn't really filter the results 3060 zfs {user,group}space -H output isn't tab-delimited 3061 zfs {user,group}space -o doesn't use specified fields order 3064 usr/src/cmd/zpool/zpool_main.c misspells "successful" 3093 zfs {user,group}space's -i is noop 3098 zfs userspace/groupspace fail without saying why when run as non-root References: https://www.illumos.org/issues/ + [issue_id] Obtained from: illumos (vendor/illumos, vendor/illumos-sys) MFC after: 2 weeks
* Finish porting execsnoop to FreeBSD. This includes replacing the zonenamerpaulo2012-09-011-0/+2
| | | | with a jail ID and removing the project ID from the list of options.
* Partial MFV (illumos-gate 13753:2aba784c276b)mm2012-07-301-2/+2
| | | | | | | | | 2762 zpool command should have better support for feature flags References: https://www.illumos.org/issues/2762 MFC after: 2 weeks
* Initial commit of an I/O provider for DTrace on FreeBSD.gnn2012-07-112-144/+35
| | | | | | | | | | | | These probes are most useful when looking into the structures they provide, which are listed in io.d. For example: dtrace -n 'io:genunix::start { printf("%d\n", args[0]->bio_bcount); }' Note that the I/O systems in FreeBSD and Solaris/Illumos are sufficiently different that there is not a 1:1 mapping from scripts that work with one to the other. MFC after: 1 month
* Introduce "feature flags" for ZFS pools (bump SPA version to 5000).mm2012-06-112-1/+7
| | | | | | | | | | | | | | | | | | | Add first feature "com.delphix:async_destroy" (asynchronous destroy of ZFS datasets). Implement features support in ZFS boot code. Illumos revisions merged: 13700:2889e2596bd6 13701:1949b688d5fb 2619 asynchronous destruction of ZFS file systems 2747 SPA versioning with zfs feature flags References: https://www.illumos.org/issues/2619 https://www.illumos.org/issues/2747 Obtained from: illumos (issue #2619, #2747) MFC after: 1 month
* Add DTrace's io.d, which handles tranlsations for file, buffer andgnn2012-06-051-0/+220
| | | | | device info structures as well as the fds[] array. This is a raw version of the file, unmodified, to be used as a baseline.
* Enable build of DTrace-related userland parts for MIPSgonzo2012-03-242-3/+7
|
OpenPOWER on IntegriCloud