Commit Graph

47 Commits

Author SHA1 Message Date
Mark Johnston
d96700a6da Remove redefinitions of some kernel types from mbuf.d.
These override the kernel's definitions and do not match in some cases,
which can break scripts that use these types. With r305055, dtrace is able
to trace fields of struct mbuf's anonymous structs and unions, so there is
no need to redefine types already defined in CTF.

MFC after:	3 days
2016-09-03 20:43:59 +00:00
George V. Neville-Neil
18849b5da0 Remove the old version of the DTraceToolkit from the source tree.
The DTraceToolkit is part of the Open DTrace effort and is supported
on FreeBSD as a port (sysutils/DTraceToolkit) which has been updated
to properly track toolkit development upstream.

Sponsored by:	DARPA, AFRL
2016-05-19 19:51:39 +00:00
George V. Neville-Neil
a5ff72cb0e Add the address at which the routine returned.
MFC after:	1 week
Sponsored by:	Rubicon Communications (Netgate)
2016-04-21 03:17:53 +00:00
George V. Neville-Neil
c94c8223bd Remove dependency on mbuf provider as mbuf SDTs are now in the SDT space.
Sponsored by:	Rubicon Communications (Netgate)
2016-03-25 00:33:55 +00:00
George V. Neville-Neil
480f4e946d Add an mbuf provider to DTrace.
The mbuf provider is made up of a set of Statically Defined Tracepoints
which help us look into mbufs as they are allocated and freed.  This can be
used to inspect the buffers or for a simplified mbuf leak detector.

New tracepoints are:

mbuf:::m-init
mbuf:::m-gethdr
mbuf:::m-get
mbuf:::m-getcl
mbuf:::m-clget
mbuf:::m-cljget
mbuf:::m-cljset
mbuf:::m-free
mbuf:::m-freem

There is also a translator for mbufs which gives some visibility into the structure,
see mbuf.d for more details.

Reviewed by:	bz, markj
MFC after:	2 weeks
Sponsored by:	Rubicon Communications (Netgate)
Differential Revision:	https://reviews.freebsd.org/D5682
2016-03-22 13:16:52 +00:00
George V. Neville-Neil
342af4d5ef fix tcpdebug: - assign to "flags" in each probe, not only debug-input
compute "len" in the same way in each probe

Submitted by:	Hannes Mehnert
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D5524
2016-03-03 02:46:12 +00:00
Devin Teske
1d02df3a10 Bump copyright for change from fbt to syscall
MFC after:	3 days
X-MFC-to:	stable/10
X-MFC-with:	r294548 r294556
2016-01-24 21:18:54 +00:00
Devin Teske
7b84bab04c Switch to syscall; HEAD lacks fbt for kill(2)
MFC after:	3 days
X-MFC-to:	stable/10
X-MFC-with:	294548
2016-01-22 08:29:23 +00:00
Devin Teske
4c7395be90 Fix bad title on script (caused by copy/paste)
MFC after:	3 days
X-MFC-to:	stable/10
X-MFC-with:	r294548
2016-01-22 07:22:30 +00:00
Devin Teske
abac203368 Add scripts for watching common entry points.
MFC after:	3 days
X-MFC-to:	stable/10
2016-01-22 07:19:30 +00:00
Bryan Drewery
b1f92fa229 META MODE: Update dependencies with 'the-lot' and add missing directories.
This is not properly respecting WITHOUT or ARCH dependencies in target/.
Doing so requires a massive effort to rework targets/ to do so.  A
better approach will be to either include the SUBDIR Makefiles directly
and map to DIRDEPS or just dynamically lookup the SUBDIR.  These lose
the benefit of having a userland/lib, userland/libexec, etc, though and
results in a massive package.  The current implementation of targets/ is
very unmaintainable.

Currently rescue/rescue and sys/modules are still not connected.

Sponsored by:	EMC / Isilon Storage Division
2015-12-01 05:23:19 +00:00
Bryan Drewery
93e779a26c META MODE: These need object directories to handle staging.
Sponsored by:	EMC / Isilon Storage Division
2015-11-26 01:14:27 +00:00
George V. Neville-Neil
1576e8f871 Replace the retval.sh shell script with a native DTrace script.
Suggested by: markj
2015-11-26 00:53:39 +00:00
George V. Neville-Neil
669f9224ec Summary: A simple script to print the return value of any function,
with or without wild cards.
2015-11-25 22:59:41 +00:00
Pawel Jakub Dawidek
af71f40a98 Add a little, but very useful script for use with programs that work using an
event loop and should sleep only when waiting for events (eg. via kevent(2)).
When a program is going to sleep in the kernel, the script will show its name,
PID, kernel stack trace and userland stack trace. Sleeping in kevent(2) is
ignored as it is expected to be valid.

Sample output:

# ./blocking lynxd

lynxd(15042) is blocking...

              kernel`_cv_wait_sig+0x124
              kernel`seltdwait+0xae
              kernel`sys_poll+0x3a3
              kernel`amd64_syscall+0x343
              kernel`0xffffffff806c79ab

              lynxd`poll+0xa
              lynxd`pqSocketCheck+0xa2
              lynxd`pqWaitTimed+0x29
              lynxd`connectDBComplete+0xd7
              lynxd`PQsetdbLogin+0x2ec
              lynxd`db_connect+0x3c
              lynxd`main+0x198
              lynxd`_start+0x16f
              0x2

lynxd(1925) is blocking...

              kernel`_cv_wait+0x125
              zfs.ko`zio_wait+0x5b
              zfs.ko`dmu_buf_hold_array_by_dnode+0x1dc
              zfs.ko`dmu_read+0xcb
              zfs.ko`zfs_freebsd_getpages+0x37b
              kernel`VOP_GETPAGES_APV+0xa7
              kernel`vnode_pager_getpages+0x9a
              kernel`vm_fault_hold+0x885
              kernel`vm_fault+0x77
              kernel`trap_pfault+0x211
              kernel`trap+0x506
              kernel`0xffffffff806c76c2

              lynxd`EVP_add_cipher+0x13
              lynxd`SSL_library_init+0x11
              lynxd`main+0x94
              lynxd`_start+0x16f
              0x2

lynxd(1925) is blocking...

              kernel`_cv_wait+0x125
              zfs.ko`zio_wait+0x5b
              zfs.ko`dbuf_read+0x791
              zfs.ko`dbuf_findbp+0x12f
              zfs.ko`dbuf_hold_impl+0xa2
              zfs.ko`dbuf_hold+0x1b
              zfs.ko`dmu_buf_hold_array_by_dnode+0x153
              zfs.ko`dmu_read_uio+0x66
              zfs.ko`zfs_freebsd_read+0x3a3
              kernel`VOP_READ_APV+0xa1
              kernel`vn_read+0x13a
              kernel`vn_io_fault+0x10b
              kernel`dofileread+0x95
              kernel`kern_readv+0x68
              kernel`sys_read+0x63
              kernel`amd64_syscall+0x343
              kernel`0xffffffff806c79ab

              lynxd`_read+0xa
              lynxd`__srefill+0x122
              lynxd`fgets+0x78
              lynxd`file_gets+0x1d
              lynxd`BIO_gets+0x64
              lynxd`PEM_read_bio+0xf5
              lynxd`PEM_X509_INFO_read_bio+0x90
              lynxd`X509_load_cert_crl_file+0x47
              lynxd`by_file_ctrl+0x2e
              lynxd`X509_STORE_load_locations+0x4a
              lynxd`sslctx_init+0x255
              lynxd`main+0x215
              lynxd`_start+0x16f
              0x2

Requested by:	gnn
Obtained from:	Wheel Systems http://wheelsystems.com
2015-10-04 00:40:12 +00:00
George V. Neville-Neil
5d06879adb dd DTrace probe points, translators and a corresponding script
to provide the TCPDEBUG functionality with pure DTrace.

Reviewed by:	rwatson
MFC after:	2 weeks
Sponsored by:	Limelight Networks
Differential Revision:	D3530
2015-09-13 15:50:55 +00:00
George V. Neville-Neil
c1eb4109f3 Update DTrace nfs scripts to track the proper provider names.
Submitted by:	Alex Burlyga
2015-09-08 00:30:10 +00:00
Hiren Panchasara
5341316696 Add missing DTrace scripts that exist in the source tree to the Makefile for
install.
While here, sort the list.

Differential Revision:	D2950
Submitted by:		Jason Wolfe <j at nitrology.com>
Reviewed by:		gnn, markj, hiren
Sponsored by:		Limelight Networks
2015-06-30 18:23:08 +00:00
Simon J. Gerraty
ccfb965433 Add META_MODE support.
Off by default, build behaves normally.
WITH_META_MODE we get auto objdir creation, the ability to
start build from anywhere in the tree.

Still need to add real targets under targets/ to build packages.

Differential Revision:       D2796
Reviewed by: brooks imp
2015-06-13 19:20:56 +00:00
Simon J. Gerraty
5b381db8cc Remove NO_OBJ
For meta mode we will want objdirs.

Differential Revision:	D2748
Reviewed by:	brooks imp
2015-06-11 04:22:17 +00:00
Simon J. Gerraty
b589e6297b Remove extra blank lines 2015-06-10 14:08:36 +00:00
Simon J. Gerraty
44d314f704 dirdeps.mk now sets DEP_RELDIR 2015-06-08 23:35:17 +00:00
Simon J. Gerraty
98e0ffaefb Merge sync of head 2015-05-27 01:19:58 +00:00
George V. Neville-Neil
9fe48b8076 Brief demo script showing the various values that can be read via the new SIFTR statically defined tracepoint (SDT).
Reviewed by:	bz, markj
2015-04-29 18:07:58 +00:00
George V. Neville-Neil
8a502e7434 Summary: Update the ports to read from the packet rather than the
socket structure
2015-03-08 04:33:53 +00:00
George V. Neville-Neil
1dfaa6f1aa udp track shows UDP data as it arrives and leaves the system 2015-03-08 04:29:41 +00:00
George V. Neville-Neil
73450093d0 Summary: Remove the pid printing which does not currently work. 2015-03-08 02:47:38 +00:00
George V. Neville-Neil
fd95ce9e53 Set the property to executable. 2015-03-07 21:31:37 +00:00
George V. Neville-Neil
6b740d6ecc Add execute bits to tcpstate script. 2015-03-07 21:28:37 +00:00
George V. Neville-Neil
2c5c06a0d9 TCP connection tracker that uses aggregations to show where connections
originate from.
2015-03-07 19:29:53 +00:00
George V. Neville-Neil
234aa44656 Add a more complex TCP tracking script, which shows connections and
accepts as well as state transitions.
2015-03-07 19:16:09 +00:00
George V. Neville-Neil
4ce386ff25 Add a TCP state tracking script based on FreeBSD TCP SDTs 2015-03-07 18:17:15 +00:00
Simon J. Gerraty
9268022b74 Merge from head@274682 2014-11-19 01:07:58 +00:00
Simon J. Gerraty
ee7b0571c2 Merge head from 7/28 2014-08-19 06:50:54 +00:00
John-Mark Gurney
1a4574596c add my scripts to measure io latency per disk... 2014-08-09 20:40:03 +00:00
John-Mark Gurney
a0e793cbf1 make the README a bit more clearer...
Sort the scripts, and remove the trailing backslash...

We really should install more of the toolkit scripts than just 5 of them..
2014-08-09 20:25:17 +00:00
Rui Paulo
a223d3ed90 Use dtrace -s instead of /bin/sh for DTrace scripts. 2014-06-26 17:27:36 +00:00
Simon J. Gerraty
cc3f4b9965 Merge from head 2014-05-08 23:54:15 +00:00
Warner Losh
c6063d0da8 Use src.opts.mk in preference to bsd.own.mk except where we need stuff
from the latter.
2014-05-06 04:22:01 +00:00
Simon J. Gerraty
c8191bc69e We do want objdir 2013-10-13 00:27:34 +00:00
Simon J. Gerraty
34b33809b7 Updated dependencies 2013-10-13 00:24:00 +00:00
George V. Neville-Neil
9becab3349 Remove copy/pasteo in the copyright notice. 2012-07-21 07:14:52 +00:00
George V. Neville-Neil
213dc9df2e Add a new script, hotopen, which shows what uid is opening files
on a per second basis.  While here clean up the Makefile as well.

MFC after:	1 week
2012-07-20 23:56:23 +00:00
George V. Neville-Neil
ed43a220e7 Add a script that traces NFS attribute cache accesses.
Submitted by:	rwatson
MFC after:	2 weeks
2012-07-16 17:48:43 +00:00
George V. Neville-Neil
11f1804db4 Fix a case typo.
Pointed out by: jlh@
2012-05-18 20:34:08 +00:00
George V. Neville-Neil
c94c8819a5 Add a DTrace script to show the frequency and latency of NFS client calls.
Submitted by:	rwatson
2012-05-18 16:47:15 +00:00
George V. Neville-Neil
4d37a12307 Add support for our own DTrace scripts and those from the DTraceToolkit
to the build system.  FreeBSD written scripts are stored in
src/share and the toolkit scripts are brought from the cddl directory
into a working tree via install.

MFC after:	2 weeks
2012-05-18 16:40:15 +00:00