freebsd-src/cddl/lib
Domagoj Stolfa 93f27766a7 dtrace: Add the 'oformat' libdtrace option
This option can be used to specify a format to use in DTrace output.
The following formats are supported:
 - json
 - xml
 - html
 - none (default DTrace output)

This is implemented using libxo and integrated into libdtrace. Client
code only works with the following API:

 - dtrace_oformat_setup(dtrace_hdl_t *) -- to be called when output is starting.
 - dtrace_oformat_teardown(dtrace_hdl_t *) -- to be called when output is finished
 - dtrace_oformat(dtrace_hdl_t *) -- check if oformat is enabled.
 - dtrace_set_outfp(FILE *) -- sets the output file for oformat.
 - Ensure that oformat is correctly checked in the drop handler and record
   processing callbacks.

This commit also adds tests which check if the generated output is
valid (JSON, XML) and extends the dtrace(1) describing the structured output.

Reviewed by:	markj
Discussed with:	phil
MFC after:	2 months
Sponsored by:	Innovate UK
Differential Revision:	https://reviews.freebsd.org/D41745
2024-01-10 18:14:26 -05:00
..
drti Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libavl Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libctf Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libdtrace dtrace: Add the 'oformat' libdtrace option 2024-01-10 18:14:26 -05:00
libicp libicp(_rescue)?: use asm versions for all 32-bit arm flavors 2023-12-13 20:00:35 +01:00
libicp_rescue libicp(_rescue)?: use asm versions for all 32-bit arm flavors 2023-12-13 20:00:35 +01:00
libnvpair Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libspl dirdeps: Update Makefile.depend* files with empty contents 2023-10-29 17:01:04 -04:00
libtpool dirdeps: Update Makefile.depend* files with empty contents 2023-10-29 17:01:04 -04:00
libumem Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libuutil Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libzfs libc: expose execvpe for Linux compat 2023-12-11 19:24:53 +00:00
libzfs_core Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
libzfsbootenv dirdeps: Update Makefile.depend* files with empty contents 2023-10-29 17:01:04 -04:00
libzpool zfs: merge openzfs/zfs@887a3c533 2023-11-09 13:19:17 +01:00
libzutil dirdeps: Update Makefile.depend* files with empty contents 2023-10-29 17:01:04 -04:00
pam_zfs_key pkgbase: Put zfs utilities and lib in their own package 2022-10-26 19:46:30 +02:00
tests Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00
Makefile.inc Remove $FreeBSD$: one-line sh pattern 2023-08-16 11:55:03 -06:00