summaryrefslogtreecommitdiffstats
path: root/cddl/lib
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Merge new ZFS features from illumos:mm2011-11-281-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 1644 add ZFS "clones" property https://www.illumos.org/issues/1644 1645 add ZFS "written" and "written@..." properties https://www.illumos.org/issues/1645 1646 "zfs send" should estimate size of stream https://www.illumos.org/issues/1646 1647 "zfs destroy" should determine space reclaimed by destroying multiple snapshots https://www.illumos.org/issues/1647 1693 persistent 'comment' field for a zpool https://www.illumos.org/issues/1693 1708 adjust size of zpool history data https://www.illumos.org/issues/1708 1748 desire support for reguid in zfs https://www.illumos.org/issues/1748 Obtained from: illumos (changesets 13514, 13524, 13525) MFC after: 1 month
* Change the Makefile in cddl/lib/drti to use bsd.lib.mk instead ofrwatson2011-11-281-1/+1
| | | | | | | | | | | bsd.prog.mk -- we need to compile PIC, which requires a library build. With this change, USDT (userspace DTrace probes) work from within shared libraries. PR: kern/159046 Submitted by: Alex Samorukov <samm at os2.kiev.ua> Comments by: Scott Lystig Fritchie <slfritchie at snookles.com> MFC after: 3 days
* Fix a few gratuitous library dependencies. Some of the ZFS utilitiesrmh2011-10-301-2/+2
| | | | | | | | | | | | | | | | | are linked with libraries they don't use: - zinject doesn't use libavl - ztest doesn't use libz - zdb uses neither libavl nor libz - zfs uses neither libbsdxml nor libm, nor libsbuf - zpool uses neither libbsdxml nor libm, nor libsbuf In addition, libzfs needs libm because it uses pow(), however it isn't linked with -lm. This went unnoticed because all its users had -lm before. Reviewed by: pjd, mm Approved by: kib (mentor) MFC after: 1 week
* Finally... Import the latest open-source ZFS version - (SPA) 28.pjd2011-02-272-21/+26
| | | | | | | | | | | | | | | Few new things available from now on: - Data deduplication. - Triple parity RAIDZ (RAIDZ3). - zfs diff. - zpool split. - Snapshot holds. - zpool import -F. Allows to rewind corrupted pool to earlier transaction group. - Possibility to import pool in read-only mode. MFC after: 1 month
* When building libzpool on ia64 or sparc64, don't add the .note.GNU-stackdim2011-02-151-0/+2
| | | | | | section. Submitted by: kib
* Fix some leftover binaries and shared libraries in the system that stilldim2011-02-151-0/+1
| | | | | | | | | | | | | | | have an executable stack, due to linking in hand-assembled .S or .s files, that have no .GNU-stack sections: RWX --- --- /lib/libcrypto.so.6 RWX --- --- /lib/libmd.so.5 RWX --- --- /lib/libz.so.6 RWX --- --- /lib/libzpool.so.2 RWX --- --- /usr/lib/liblzma.so.5 These were found using scanelf, from the sysutils/pax-utils port. Reviewed by: kib
* Use ${PICFLAG} instead of -fpic.rpaulo2010-10-271-1/+1
|
* MFtbemd:imp2010-08-232-3/+3
| | | | | Prefer MACHNE_CPUARCH to MACHINE_ARCH in most contexts where you want to test of all the CPUs of a given family conform.
* Use real atomic operations for sparc64.marius2010-08-231-1/+1
| | | | MFC after: 1 week
* Add powerpc64 to the list of architectures with real atomic operations.nwhitehorn2010-08-231-1/+1
| | | | Submitted by: imp
* Don't link drti.o with libelf_pic.a. This means that all software withrpaulo2010-08-211-7/+1
| | | | | | | userland SDT probes must be linked with libelf explicitly. Requested by: kib Sponsored by: The FreeBSD Foundation
* Link drti.o with a PIC version of libelf. This is needed becauserpaulo2010-08-211-2/+9
| | | | | | | drti.o depends on libelf and this avoids linking every other drti.o program (namely programs with USDT probes) with libelf. Sponsored by: The FreeBSD Foundation
* Add libdtrace support for tracing userland programs.rpaulo2010-08-213-3/+196
| | | | | | | | | | | | | | | | | | Summary of changes: * Implement a compatibility shim between Solaris libproc and our libproc and remove several ifdefs because of this. * Port the drti to FreeBSD. * Implement the missing DOODAD sections * Link with libproc and librtld_db * Support for ustack, jstack and uregs (by sson@) * Misc bugfixing When writing the SUWN_dof section, we had to resort to building the ELF file layout by "hand". This is the job of libelf, but our libelf doesn't support this yet. When libelf is fixed, we can remove the code under #ifdef BROKEN_LIBELF. Sponsored by: The FreeBSD Foundation
* Use double quotes when checking the value of MACHINE_ARCH.rpaulo2010-08-211-1/+1
| | | | Sponsored by: The FreeBSD Foundation
* The DTrace instrumentation object is going to be i386/amd64 only.rpaulo2010-08-211-1/+2
| | | | Sponsored by: The FreeBSD Foundation
* libdtrace, dtrace(1) and lockstat(1) are for i386 and amd64 only rightrpaulo2010-07-311-1/+5
| | | | | | now. Sponsored by: The FreeBSD Foundation
* Remove manual .includes in cddl Makefilesuqs2010-03-029-18/+14
| | | | | | | | | | | | | | | - Break the dependency on ../Makefile.inc for .PATH, and include ../Makefile.inc implicitly. This is required to ... - Set WARNS?=6 in top-level Makefile.inc - Remove now redundant WARNS settings, add WARNS?=0 where appropriate - Remove redundant SHLIB_MAJOR overrides - Use NO_MAN, not MK_MAN=no - Remove redundant inclusion of bsd.own.mk - Order Makefiles more according to style.Makefile(9) - Reduce diff of cddl Makefiles against each other No objection: pjd Approved by: ed (co-mentor)
* Remove files that are no longer used.pjd2009-08-171-0/+1
| | | | | Discussed with: kmacy Approved by: re (kib)
* Bump the version of all non-symbol-versioned shared libraries inkensmith2009-07-193-3/+3
| | | | | | | | preparation for 8.0-RELEASE. Add the previous version of those libraries to ObsoleteFiles.inc and bump __FreeBSD_Version. Reviewed by: kib Approved by: re (rwatson)
* atomic.S has been renamed opensolaris_atomic.S to avoid collisionskmacy2009-05-091-1/+1
|
* Switch over to gnu99 compilation on default for userland.rdivacky2009-03-141-2/+2
| | | | | | | | Tested by: make universe Tested by: ports exp build (done by pav) Reviewed by: ru Reviewed by: silence on arch Approved by: ed (mentor)
OpenPOWER on IntegriCloud