summaryrefslogtreecommitdiffstats
path: root/cddl
Commit message (Collapse)AuthorAgeFilesLines
* Remove drti.o's dependency on libelf. This makes it possible to add DTracemarkj2015-02-185-72/+86
| | | | | | | | | | | | | | | | | | | probes to userland programs and libraries without also needing to link libelf. dtrace -G places the __SUNW_dof symbol at the beginning of the DOF (DTrace probe and provider metdata) section in the generated object file; drti.o now just uses this symbol to locate the section. A complication occurs when multiple dtrace-generated object files are linked together, since the __SUNW_dof symbol defined in each file is global. This is handled by using objcopy(1) to convert __SUNW_dof to a local symbol once drti.o has been linked with the generated object file. Upstream, this is done using a linker feature not present in GNU ld. Differential Revision: https://reviews.freebsd.org/D1757 Reviewed by: rpaulo MFC after: 1 month Relnotes: yes
* Tweak the fds test program so that it actually compiles. Also use 0 insteadmarkj2015-02-142-7/+8
| | | | | | | of -1 for the bogus ioctl command so that dmesg doesn't get spammed with sign extension warnings when the test program runs. MFC after: 1 week
* Initial version of DTrace on ARM32.gnn2015-02-105-3/+204
| | | | | Submitted by: Howard Su based on work by Oleksandr Tymoshenko Reviewed by: ian, andrew, rpaulo, markj
* Avoid hard-coding a path to ksh in scripts that are executed directly bymarkj2015-02-0311-11/+11
| | | | | | | | the test harness. This is a problem in many of the *.ksh test scripts as well, but those scripts are executed using a shell whose path is specified in dtest.pl, so there's no need to modify them. MFC after: 1 week
* Let the standard deviation of the empty set be 0. This is consistent withmarkj2015-02-021-0/+3
| | | | | | | | | | the behaviour for averages, and fixes a crash that can occur when attempting to print a stddev aggregation containing no elements: dtrace:::BEGIN { @ = stddev(0); clear(@); printa("%@d", @); } PR: 197260 MFC after: 2 week
* Fix mktemp(1) usage.markj2015-01-311-1/+1
| | | | MFC after: 1 week
* Use syscall::exit instead of the nonexistent syscall::rexit.markj2015-01-311-1/+1
| | | | MFC after: 1 week
* Remove hard-coded invocations of gcc; use cc(1) instead.markj2015-01-314-13/+7
| | | | MFC after: 1 week
* Remove a makefile that isn't present upstream.markj2015-01-311-13/+0
| | | | MFC after: 1 week
* Fix a number of DTrace scripting tests:markj2015-01-3111-27/+27
| | | | | | | | * Avoid hard-coding program paths. * Use -x when searching for oneself in ps(1) output. * Use the correct keyword (egid instead of pgid) in tst.egid.ksh. MFC after: 1 week
* Fix some proc provider tests:markj2015-01-313-12/+14
| | | | | | | | | | * Avoid hard-coding program paths, except when it's necessary in order to override the use of a shell builtin. * Translate struct proc through psinfo_t so that we can access process arguments via the pr_psargs field of psinfo_t. * Replace uses of pstop and prun with kill(1). MFC after: 1 week
* pause() isn't a system call on FreeBSD; use sigsuspend(2) instead.markj2015-01-301-2/+5
| | | | MFC after: 1 week
* The DTrace harness (dtest.pl) executes DTrace scripts with the -C flag,markj2015-01-303-3/+9
| | | | | | | | which causes dtrace(1) to run the C preprocessor on input scripts before executing them. Suppress some warnings emitted by the preprocessor which are confusing the DTrace lexer tests. MFC after: 1 week
* Include required headers in DTrace test programs.markj2015-01-3010-0/+15
| | | | MFC after: 1 week
* Replace Solaris identifiers and types with their FreeBSD equivalents.markj2015-01-3012-16/+16
| | | | MFC after: 1 week
* Use the correct field when reading the PID out of a struct proc.markj2015-01-304-4/+4
| | | | MFC after: 1 week
* When searching for an accompanying test program, look in the directorymarkj2015-01-301-1/+1
| | | | | | | containing the test script rather than the current directory. This is needed in order to run the DTrace tests under Kyua. MFC after: 1 week
* Follow up to r277449 by fixing the remaining NSEC_TO_TICK macro to have the samengie2015-01-211-1/+1
| | | | | | named parameters Reported by: Ben Perrault <ben.perrault@gmail.com>, Willem Jan Withagen <wjw@digiware.nl>
* MFV r277432:delphij2015-01-202-33/+47
| | | | | | | | | Plug various memory leaks in libzfs import implementation. Illumos issue: 5518 Memory leaks in libzfs import implementation MFC after: 2 weeks
* Mechanically convert cddl sun #ifdef's to illumossmh2015-01-1755-331/+325
| | | | | | | | | | | | 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
* Eliminate illumos whole disk special case when searching for a ZFS vdevsmh2015-01-161-0/+6
| | | | | | | | | | This special case prevented locating vdevs which start with c[0-9] e.g. gptid/c6cde092-504b-11e4-ba52-c45444453598 hence it was impossible to online a vdev via its path. Submitted by: Peter Xu <xzpeter@gmail.com> MFC after: 2 weeks Sponsored by: Multiplay
* Revert r274569. It seems to be causing a crash when merging CTF data formarkj2015-01-081-1/+1
| | | | | | recent i386 GENERIC kernels. Reported by: David Wolfskill
* Use the correct state name for unavailable pools in zpool listsmh2014-12-311-1/+2
| | | | | | | | This corrects inconsitencies between zpool list and zpool status which are both described as displaying the pool <state> however zpool list would use this hardcoded FAULTED instead of the correct UNAVAIL. MFC after: 1 month
* mdoc: remove EOL whitespace.joel2014-12-291-1/+1
|
* Add PowerPC64 function descriptor support for dt_link.cjhibbits2014-12-281-14/+27
| | | | | | | | | | | | | | | | | | | | | | | Summary: PowerPC64 uses function descriptors in a section .opd, exporting the descriptors to the symbol table. This adds support for these into dt_link.c so that dtrace USDT probes can be compiled. Test Plan: Tested only on powerpc64. No regression testing has been performed, so I want someone with x86 hardware to regression test this. Tested on amd64 by markj Reviewers: #dtrace, markj Reviewed By: #dtrace, markj Subscribers: markj Differential Revision: https://reviews.freebsd.org/D1267 MFC after: 3 weeks
* mdoc: improvements to SEE ALSO.joel2014-12-271-2/+2
|
* DOF tables are aligned according to the DOF section's alignment constraint,markj2014-12-261-1/+4
| | | | | | | | so take this into account when iterating over DOF tables. PR: 195555 Submitted by: Fedor Indutny <fedor@indutny.com> (original version) MFC after: 1 week
* Enhancements to zpool upgrade processingsmh2014-12-261-21/+72
| | | | | | | | | | | | | | | | | | | | | | | | Introduce a seperate phase to list all unavailable pools when listing pools to upgrade. This avoids confusing output when displaying older and disabled feature pools. These existing phases now silently skip unavailable pools. Introduce cb_unavail to upgrade_cbdata_t which enables the final output for zpool list to correctly detail if all pools or only all available pools where up-to-date on version / features. Correct the type of upgrade_cbdata_t.cb_first from int -> boolean_t. Change the pool iteration when upgrading named pools to include unavailable pools and update upgrade_one so it doesn't try to upgrade unavailable pools but warns about them. This allows the correct error to be displayed as well as upgrades with available and unavailable pools intermixed to partially complete. Also correct some missing trailing \n's from output in upgrade_one. MFC after: 1 month X-MFC-With: r276194
* Prevent zpool upgrade failing due to unavailable poolssmh2014-12-251-0/+15
| | | | | | | | | | Prior to this fix "zpool upgrade" and "zpool upgrade -a" would fail due to an assert when operating on unavailable pools. We now print a warning to stderr but allow the processing of other pools to procesed. MFC after: 1 month
* We can stop iterating once we've found the DOF section.markj2014-12-231-0/+1
| | | | Submitted by: Fedor Indutny <fedor@indutny.com>
* Initialize an argument to NULL instead of expecting dlinfo() to do it.will2014-12-171-1/+1
| | | | | | | | | | dlinfo() is a weak reference that may not be initialized at the time of execution. The default implementation (in lib/libc/gen/dlfcn.c) neither modifies the address pointed to by the third argument nor returns an error. Differential Revision: https://reviews.freebsd.org/D1326 Reviewed by: markj MFC after: 1 week
* MFV r275784:delphij2014-12-151-4/+1
| | | | | | | | | | | Plug a memory leak in libzfs. In zfs_iter_bookmarks, an nvlist is allocated before calling lzc_get_bookmarks, which allocates the nvlist again (and overwrites the pointer to previously allocated list). Illumos issue: 5427 memory leak in libzfs when doing rollback MFC after: 2 weeks
* MFV r275783:delphij2014-12-151-1/+1
| | | | | | | | | | | | | | | Convert ARC flags to use enum. Previously, public flags are defined in arc.h and private flags are defined in arc.c which can lead to confusion and programming errors. Consistently use 'hdr' (when referencing arc_buf_hdr_t) instead of 'buf' or 'ab' because arc_buf_t are often named 'buf' as well. Illumos issue: 5369 arc flags should be an enum 5370 consistent arc_buf_hdr_t naming scheme MFC after: 2 weeks
* MFV r275551:delphij2014-12-151-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove "dbuf phys" db->db_data pointer aliases. Use function accessors that cast db->db_data to the appropriate "phys" type, removing the need for clients of the dmu buf user API to keep properly typed pointer aliases to db->db_data in order to conveniently access their data. sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_leaf.c: In zap_leaf() and zap_leaf_byteswap, now that the pointer alias field l_phys has been removed, use the db_data field in an on stack dmu_buf_t to point to the leaf's phys data. sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c: Remove the db_user_data_ptr_ptr field from dbuf and all logic to maintain it. sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dbuf.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dbuf.h: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dmu.h: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c: Modify the DMU buf user API to remove the ability to specify a db_data aliasing pointer (db_user_data_ptr_ptr). cddl/contrib/opensolaris/cmd/zdb/zdb.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_diff.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_traverse.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_tx.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_bookmark.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dataset.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deadlist.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_deleg.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_destroy.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_pool.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_prop.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_synctask.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_userhold.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sa.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa_history.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_leaf.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zap_micro.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap_impl.h: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap_leaf.h: Create and use the new "phys data" accessor functions dsl_dir_phys(), dsl_dataset_phys(), zap_m_phys(), zap_f_phys(), and zap_leaf_phys(). sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dataset.h: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/dsl_dir.h: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap_impl.h: sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/zap_leaf.h: Remove now unused "phys pointer" aliases to db->db_data from clients of the DMU buf user API. Illumos issue: 5314 Remove "dbuf phys" db->db_data pointer aliases in ZFS MFC after: 2 weeks
* MFV r275547:delphij2014-12-131-32/+23
| | | | | | | | | | Port Illumos 'zfs allow' examples update. While I'm there also fix a typo. Illumos issue: 4181 zfs(1m): 'zfs allow' examples in the man page are outdated MFC after: 2 weeks
* Use calloc() instead of malloc() + bzero(). This also gets rid of a warningdelphij2014-12-081-4/+2
| | | | | | because bzero is defined by strings.h which is not included in thread_pool.c. MFC after: 2 weeks
* MFV r272851:markj2014-12-082-0/+1141
| | | | | | 5202 want ctf(4) illumos/illumos-gate@fe2e029eea29fd49d0d9058dbd5b79a252667e6b
* MFV r275537:delphij2014-12-072-19/+48
| | | | | | | | | | Illumos issue: 5316 allow smbadm join to use RPC (Due to our lack of smbsrv this is mostly no-op on FreeBSD) MFC after: 2 weeks
* MFV r275536:delphij2014-12-061-4/+4
| | | | | | | Illumos issue: 3363 Mark non-returning functions in ctftools MFC after: 2 weeks
* MFV r260710 + 275532:delphij2014-12-063-0/+406
| | | | | | Add a new method, nvlist_print_json to allow libnvpair to emit JSON. MFC after: 1 month
* Adjust some checks missed in r274637, now that pi_rname can be NULL.markj2014-11-251-2/+3
| | | | | | | | Additionally fix a misparenthesization in the same check, noticed while fixing the first bug. This bug only appears to cause problems if the same USDT probe appears twice within a static function. X-MFC-With: r274637
* The module load address always needs to be included when setting the dm_*_vamarkj2014-11-251-3/+3
| | | | | | | | | | | | fields of dt_module_t. Previously, this was only done on architectures where kernel modules have type ET_REL; this change fixes that. As a result, symbol name resolution in the stack() action now works properly for kernel modules on i386. Reported by: Shrikanth Kamath <shrikanth07@gmail.com> Tested by: Shrikanth Kamath Discussed with: avg MFC after: 2 weeks
* DTrace imposes a 128-byte limit on the length of the function component ofmarkj2014-11-173-22/+21
| | | | | | | | | | | | | | | | | a probe name. When dtrace -G builds up a DOF section for the specified provider(s), the probe function names are truncated to fit in this limit. The DOF is later used to build the symbol table for the generated object file, so the table can end up with truncated references, causing link errors. Instead of potentially truncating symbol table entries, write the full function name to the DOF string table and allow the kernel to enforce the 128-byte function name limit when a process attempts to load its DOF. PR: 194757 Differential Revision: https://reviews.freebsd.org/D1175 Reviewed by: rpaulo MFC after: 2 weeks
* Only compare visitation counters if they've both been set for the currentmarkj2014-11-161-1/+1
| | | | | | | | type graph walk. Reviewed by: Robert Mustacchi <rm@joyent.com> MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
* Remove an incorrect optimization. The type IDs of each member of a struct ormarkj2014-11-161-11/+3
| | | | | | | | | union must be checked when determine whether two types are equivalent. This bug could cause ctfmerge(1) to incorrectly merge distinct types. Reviewed by: Robert Mustacchi <rm@joyent.com> MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
* Fix a couple of bugs around the handling of structs and unions of size zero.markj2014-11-161-2/+8
| | | | | | | | | These would cause ctfconvert(1) to return an error when attempting to resolve valid C types. Reviewed by: Robert Mustacchi <rm@joyent.com> MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division
* Fix an mdoc(7) macro that is not an option in the providedgjb2014-11-121-2/+3
| | | | | | | | | | description. Bump Dd. As CDDL License dictates, update the Copyright accordingly. Sponsored by: The FreeBSD Foundation
* MFV r274273:delphij2014-11-1011-39/+180
| | | | | | | | | | | | | | | | ZFS large block support. Please note that booting from datasets that have recordsize greater than 128KB is not supported (but it's Okay to enable the feature on the pool). This *may* remain unchanged because of memory constraint. Limited safety belt is provided for mounted root filesystem but use caution is advised. Illumos issue: 5027 zfs large block support MFC after: 1 month
* MFV r274272 and diff reduction with upstream.delphij2014-11-091-0/+4
| | | | | | | | Illumos issue: 5244 zio pipeline callers should explicitly invoke next stage Tested with: ztest plus ZFS over GELI configuration MFC after: 1 month
* Apply upstream 13597:3eac1e8e0f4c (git: illumos-gate@aa846ad9):delphij2014-11-091-0/+2
| | | | | | | | | | | | Initialize tqent_flags in the userland taskq implementation. Without this the assertion of tq->tq_freelist != NULL may fail in taskq_destroy. The problem is that tqent_flags is never initialized in the userland implementation while the kernel one does initialize it. Without proper initialization, the flag may have its lowest bit set, making it treated as TQENT_FLAG_PREALLOC and never removing taskq_ent_t from tq_freelist. MFC after: 2 weeks
OpenPOWER on IntegriCloud