Commit Graph

186 Commits

Author SHA1 Message Date
markm
60be074c5c Do not lint code beyond necessity (with apologies to Wiliam of Ockham).
Don't lint externally maintained CDDL code, or relint the 32-bit libraries
in amd64 mode.
2010-11-18 16:32:52 +00:00
pjd
3f400ac846 Fix ztest when it is executed by just 'ztest' and not by full path
'/usr/bin/ztest'.
2010-11-01 10:42:14 +00:00
pjd
2133f19a2d 1. Remove invalid assertion.
2. Properly recalculate delta in case pthread_cond_timedwait() is interrupted.
3. Style fix.

Reported by:	[1] App Deb <appdebgr@gmail.com>
2010-11-01 10:41:05 +00:00
rpaulo
28a426fd14 Use ${PICFLAG} instead of -fpic. 2010-10-27 18:46:56 +00:00
mm
240333eaa7 Properly handle IO with B_FAILFAST
Retry IO once with ZIO_FLAG_TRYHARD before declaring a pool faulted

OpenSolaris revision and Bug IDs:

9725:0bf7402e8022
6843014 ZFS B_FAILFAST handling is broken

Approved by:	delphij (mentor)
Obtained from:	OpenSolaris (Bug ID 6843014)
MFC after:	3 weeks
2010-09-27 09:42:31 +00:00
mm
06d7ad0883 Enable offlining of log devices.
OpenSolaris revision and Bug IDs:

9701:cc5b64682e64
6803605	should be able to offline log devices
6726045	vdev_deflate_ratio is not set when offlining a log device
6599442	zpool import has faults in the display

Approved by:	delphij (mentor)
Obtained from:	OpenSolaris (Bug ID 6803605, 6726045, 6599442)
MFC after:	3 weeks
2010-09-27 09:05:51 +00:00
brueffer
d776b5f956 Minor grammar fixes. 2010-09-21 21:07:46 +00:00
mm
5921c815c6 Remove duplicate include of <strings.h>
Approved by:	delphij (mentor)
MFC after:	3 days
2010-09-17 14:15:03 +00:00
rpaulo
357ed349fc Add a man page for plockstat.
Sponsored by:	The FreeBSD Foundation
2010-09-15 10:18:18 +00:00
rpaulo
4f68232de5 Give a chance to the target binary to run the ctors by waiting until it
has reached main(). This allows plockstat to work.

Sponsored by:	The FreeBSD Foundation
2010-09-12 15:59:14 +00:00
rpaulo
6b5a9d0d4b Disable debug by default.
Sponsored by:	The FreeBSD Foundation
2010-09-11 10:16:15 +00:00
rpaulo
e3c11acb8b Don't try to map the USDT probes. This is necessary because there is no
__SUNW_dof symbol present in FreeBSD binaries.

Sponsored by:	The FreeBSD Foundation
2010-09-10 12:16:24 +00:00
rpaulo
bf61bd49f5 Don't clobber an existing target object file when doing the DTrace
linking process. This is needed because we change the source object
files and the second this dtrace -G is run, no probes will be found.
This hack allows us to build postgres with DTrace probes enabled. I'll
try to find a way to fix this without needing this hack.

Sponsored by:	The FreeBSD Foundation
2010-09-09 11:10:15 +00:00
rpaulo
9a2ac244af Include <sys/sdt.h> on a generated header.
Sponsored by:	The FreeBSD Foundation
2010-09-01 11:27:09 +00:00
pjd
fc642a405b Eliminate confusing while () loop. In the first version of the code it was
there to avoid gotos, but in the current version it serves no purpose.

MFC after:	2 weeks
2010-08-31 19:01:46 +00:00
pjd
701b1fd34c When upgrading a pool which contain root file system, give user a hint that
he should update boot code.

MFC after:	2 weeks
2010-08-31 10:41:53 +00:00
pjd
2e80e3aea9 Give user a hint what to do when /usr/lib/zfs/pyzfs.py is missing.
MFC after:	2 weeks
2010-08-29 20:25:25 +00:00
pjd
a001829122 Print errors on stderr.
MFC after:	2 weeks
2010-08-29 20:21:10 +00:00
pjd
0926b8ce7c Fix 'zfs allow' (maybe not only) returning:
cannot access dataset system/usr/home: Operation not supported

by including libzfs_impl.h. What libzfs_impl.h does is to redefine ioctl() to
be compatible with OpenSolaris. More specifically OpenSolaris returns ENOMEM
when buffer is too small and sets field zc_nvlist_dst_size to the size that
will be big enough for the data. In FreeBSD case ioctl() doesn't copy data
structure back in case of a failure. We work-around it in kernel and libzfs by
returning 0 from ioctl() and always checking if zc_nvlist_dst_size hasn't
changed. For this work-around to work in pyzfs we need this compatible ioctl()
which is implemented in libzfs_impl.h.

MFC after:	2 weeks
2010-08-29 20:18:06 +00:00
mm
465a8c9841 Update ZFS metaslab code from OpenSolaris.
This provides a noticeable write speedup, especially on pools with
less than 30% of free space.

Detailed information (OpenSolaris onnv changesets and Bug IDs):

11146:7e58f40bcb1c
6826241	Sync write IOPS drops dramatically during TXG sync
6869229	zfs should switch to shiny new metaslabs more frequently

11728:59fdb3b856f6
6918420	zdb -m has issues printing metaslab statistics

12047:7c1fcc8419ca
6917066	zfs block picking can be improved

Approved by:	delphij (mentor)
Obtained from:	OpenSolaris (Bug ID 6826241, 6869229, 6918420, 6917066)
MFC after:	2 weeks
2010-08-28 08:59:55 +00:00
rpaulo
81d469bf3e Install dtruss.
Sponsored by:	The FreeBSD Foundation
2010-08-26 11:46:38 +00:00
rpaulo
f8939397a8 Add a man page for dtruss.
Sponsored by:	The FreeBSD Foundation
2010-08-26 11:45:39 +00:00
rpaulo
d1b92febc4 Port dtruss to FreeBSD.
Sponsored by:	The FreeBSD Foundation
2010-08-24 23:24:43 +00:00
rpaulo
52fb4a6e18 Merge dtracetoolkit/dtruss from the vendor.
Sponsored by:	The FreeBSD Foundation
2010-08-24 23:17:30 +00:00
imp
c3a399c4ba MFtbemd:
Prefer MACHNE_CPUARCH to MACHINE_ARCH in most contexts where you want
to test of all the CPUs of a given family conform.
2010-08-23 22:24:11 +00:00
marius
a1a6e5ff56 Use real atomic operations for sparc64.
MFC after:	1 week
2010-08-23 22:04:30 +00:00
nwhitehorn
c508e8d056 Add powerpc64 to the list of architectures with real atomic operations.
Submitted by:	imp
2010-08-23 16:47:29 +00:00
rpaulo
6a5d9f2b9f Don't link drti.o with libelf_pic.a. This means that all software with
userland SDT probes must be linked with libelf explicitly.

Requested by:	kib
Sponsored by:	The FreeBSD Foundation
2010-08-21 17:29:59 +00:00
rpaulo
17e8c7438b Use double quotes when checking the value of MACHINE_ARCH.
Sponsored by:	The FreeBSD Foundation
2010-08-21 14:02:04 +00:00
rpaulo
5d40e38e69 Add a Makefile for dtruss.
Sponsored by:	The FreeBSD Foundation
2010-08-21 13:56:29 +00:00
rpaulo
a25bd19095 Port plockstat to FreeBSD. This will be connected to the build later.
Sponsored by:	The FreeBSD Foundation
2010-08-21 13:54:33 +00:00
rpaulo
26d140a225 Link drti.o with a PIC version of libelf. This is needed because
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
2010-08-21 13:48:04 +00:00
rpaulo
b325e69c92 Add libdtrace support for tracing userland programs.
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
2010-08-21 11:50:53 +00:00
rpaulo
45dce14583 Use double quotes when checking the value of MACHINE_ARCH.
Sponsored by:	The FreeBSD Foundation
2010-08-21 11:14:50 +00:00
rpaulo
c3d495b24d The DTrace instrumentation object is going to be i386/amd64 only.
Sponsored by:	The FreeBSD Foundation
2010-08-21 11:09:03 +00:00
rpaulo
210576ca5a Port most of the DTrace tests to FreeBSD.
Sponsored by:	The FreeBSD Foundation
2010-08-21 11:04:38 +00:00
rpaulo
b625eef938 Add man pages for the CTF tools.
Sponsored by:	The FreeBSD Foundation
2010-08-11 18:00:45 +00:00
rpaulo
0a86131c62 Fix another mismerge: bring back the definition of DT_MUTEX_HELD(). 2010-08-02 17:31:48 +00:00
rpaulo
dd3a63ce5e Fix the result of a mismerge. MUTEX_HELD should be DT_MUTEX_HELD() and
Plmid() is not supposed to be called.
2010-08-02 17:20:59 +00:00
rpaulo
577761e181 MFV OpenSolaris DTrace userland bits. 2010-08-02 13:40:53 +00:00
rpaulo
0c01965ab6 lockstat(1) now depends on libutil and librtld_db.
Sponsored by:	The FreeBSD Foundation
2010-07-31 17:58:44 +00:00
rpaulo
a7ce14acf3 proc_wait() was replaced by proc_wstatus(). Right now this call is
useless because userland support is not working on HEAD, but this makes
libdtrace compile again.

Sponsored by:	The FreeBSD Foundation
2010-07-31 17:23:37 +00:00
rpaulo
6a96e8c49c libdtrace, dtrace(1) and lockstat(1) are for i386 and amd64 only right
now.

Sponsored by:	The FreeBSD Foundation
2010-07-31 17:13:14 +00:00
rpaulo
8f93b5f706 Update to the new proc_detach() function.
Sponsored by:	The FreeBSD Foundation
2010-07-31 17:10:55 +00:00
rpaulo
2fbcde3111 dtrace(1) now depends on libutil and librtld_db.
Sponsored by:	The FreeBSD Foundation
2010-07-31 17:09:37 +00:00
np
06b03cfd4f Catch up with r210324. d_buf will be NULL for SHT_NOBITS sections, do not
attempt to copy from it in that case.

MFC after:	1 month
2010-07-23 22:24:25 +00:00
avg
50e1a73d60 dtrace: correctly map sections to addresses in elf object modules (amd64)
Unlike for modules with dso type, in elf object modules all the sections
have virtual address of zero.  So, it is insufficient to add module base
address to section virtual address (as recorded in section header) to
get section address in kernel memory.
Instead, we should apply the same calculations that are performed by
kernel loaders (in boot code and in kernel) when they lay out sections
in memory.
Also, unlike OpenSolaris, the sections are not collapsed into just .text,
.data and .bss by module loaders, so we need to take additional care
about other sections.

Note that in-kernel symbol-to-address mapping worked just fine, e.g. fbt
provider could correctly find the functions, etc.  It's only in userland
that the mapping in both direction worked incorrectly, e.g. in stack()
output addresses of functions in kernel modules were not translated to
their names.

Reviewed by:	rpaulo
MFC after:	3 weeks
2010-07-23 17:32:47 +00:00
mm
db407a02da Enable fake resolving of SMB RIDs by using nulldomain and UID_NOBODY
- fixes panics when Solaris/OpenSolaris pools that contain files
uploaded with the SMB protocol are accessed

Enable seting/unsetting the sharesmb property (dummy action)
- allows users who import pools from Solaris/Opensolaris to unset
the sharesmb property and get rid of annoying messages

PR:		kern/145778, kern/148709
Approved by:	pjd, delphij (mentor)
MFC after:	7 weeks
2010-07-22 23:30:24 +00:00
rpaulo
9670bd01ed MFV:
OpenSolaris' plockstat utility.

Sponsored by:	The FreeBSD Foundation
2010-07-19 14:59:23 +00:00
rpaulo
583f4f5d6a Merge from vendor: libdtrace MD parts needed by fasttrap.
Sponsored by:	The FreeBSD Foundation
2010-07-17 18:31:31 +00:00