freebsd-src/cddl/contrib/opensolaris
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
..
cmd dtrace: Add the 'oformat' libdtrace option 2024-01-10 18:14:26 -05:00
common libctf: Fix recursive descent into anonymous SOU fields 2022-04-12 17:29:53 -04:00
head MFV r270197: 2014-08-22 22:13:36 +00:00
lib dtrace: Add the 'oformat' libdtrace option 2024-01-10 18:14:26 -05:00
tools/ctf ctfconvert: Handle DW_AT_data_bit_offset 2024-01-01 23:12:29 -05:00
OPENSOLARIS.LICENSE