#
93f27766 |
| 03-Jan-2024 |
Domagoj Stolfa <domagoj.stolfa@gmail.com> |
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 ou
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
show more ...
|
#
2179a159 |
| 11-Oct-2022 |
Christos Margiolis <christos@FreeBSD.org> |
libdtrace: Add kinst support
kinst does not instantiate its probes automatically, it only does so on demand via an ioctl interface implemented by /dev/kinst. This change modifies libdtrace to perfo
libdtrace: Add kinst support
kinst does not instantiate its probes automatically, it only does so on demand via an ioctl interface implemented by /dev/kinst. This change modifies libdtrace to perform that work when the script references the kinst provider, similar to the way pid provider probes are implemented.
Reviewed by: markj MFC after: 3 months Sponsored by: Google, Inc. (GSoC 2022) Differential Revision: https://reviews.freebsd.org/D36852
show more ...
|
#
8ba333e0 |
| 17-Feb-2021 |
Mark Johnston <markj@FreeBSD.org> |
libdtrace: Stop relying on lex compatibility
It does not appear to be required, and as of commit 6b7e592c215f ("lex: Do not let input() return 0 when end-of-file is reached") it causes input to retu
libdtrace: Stop relying on lex compatibility
It does not appear to be required, and as of commit 6b7e592c215f ("lex: Do not let input() return 0 when end-of-file is reached") it causes input to return 0 instead of EOF when end-of-input is reached.
PR: 253440 MFC after: 3 days Sponsored by: The FreeBSD Foundation
show more ...
|
#
375c8b20 |
| 12-Nov-2016 |
Mark Johnston <markj@FreeBSD.org> |
Remove the DTrace printt and typeref actions.
These are FreeBSD-specific and were added in r178576 to provide the ability to pretty-print instances of compound types. However, the print action has l
Remove the DTrace printt and typeref actions.
These are FreeBSD-specific and were added in r178576 to provide the ability to pretty-print instances of compound types. However, the print action has long since been augmented to provide this functionality with a simpler interface.
Discussed with: gnn Differential Revision: https://reviews.freebsd.org/D8478
show more ...
|
#
650f66ac |
| 16-Aug-2016 |
Mark Johnston <markj@FreeBSD.org> |
MFV r304057: 7085 add support for "if" and "else" statements in dtrace
illumos/illumos-gate@c3bd3abd8856e8e75d820f65c58031cd6cbac818
Add syntactic sugar to dtrace: "if" and "else" statements. The s
MFV r304057: 7085 add support for "if" and "else" statements in dtrace
illumos/illumos-gate@c3bd3abd8856e8e75d820f65c58031cd6cbac818
Add syntactic sugar to dtrace: "if" and "else" statements. The sugar is baked down to standard dtrace features by adding additional clauses with the appropriate predicates.
Reviewed by: Adam Leventhal <ahl@delphix.com> Reviewed by: Sebastien Roy <sebastien.roy@delphix.com> Reviewed by: Paul Dagnelie <pcd@delphix.com> Reviewed by: Bryan Cantrill <bryan@joyent.com> Approved by: Richard Lowe <richlowe@richlowe.net> Author: Matthew Ahrens <mahrens@delphix.com>
MFC after: 2 weeks Relnotes: yes
show more ...
|
#
8436cb81 |
| 06-Jun-2015 |
Mark Johnston <markj@FreeBSD.org> |
libdtrace: allow D libraries to declare dependencies on kernel modules
The "depends_on module" pragma can be used to declare a dependency on a DTrace module, which for kernel probes corresponds to a
libdtrace: allow D libraries to declare dependencies on kernel modules
The "depends_on module" pragma can be used to declare a dependency on a DTrace module, which for kernel probes corresponds to a KLD. Such dependencies cannot be checked if the KLD is compiled into the kernel. Therefore, allow a module dependency to be satisfied if either a kernel module or a KLD with the specified name is loaded.
Differential Revision: https://reviews.freebsd.org/D2653 Reviewed by: gnn, rpaulo Reported by: gnn
show more ...
|
#
03a5f9f0 |
| 18-Feb-2015 |
Mark Johnston <markj@FreeBSD.org> |
Remove drti.o's dependency on libelf. This makes it possible to add DTrace probes to userland programs and libraries without also needing to link libelf.
dtrace -G places the __SUNW_dof symbol at th
Remove drti.o's dependency on libelf. This makes it possible to add DTrace 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
show more ...
|
#
bc96366c |
| 17-Jan-2015 |
Steven Hartland <smh@FreeBSD.org> |
Mechanically convert cddl sun #ifdef's to illumos
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
Mechanically convert cddl sun #ifdef's to illumos
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
show more ...
|
#
4ddb46f6 |
| 22-Aug-2014 |
Xin LI <delphij@FreeBSD.org> |
Make DTrace stuff compile with C99 standard.
|
#
a43f0be9 |
| 26-Jun-2014 |
Rui Paulo <rpaulo@FreeBSD.org> |
MFV illumos
4471 DTrace count() with histogram 4472 DTrace full width distribution histograms 4473 DTrace frequency trails
MFC after: 2 weeks
|
#
8e648814 |
| 26-Jun-2014 |
Rui Paulo <rpaulo@FreeBSD.org> |
MFV illumos
4474 DTrace Userland CTF Support 4475 DTrace userland Keyword 4476 DTrace tests should be better citizens 4479 pid provider types 4480 dof emulation is missing checks
MFC after: 2 weeks
|
#
dd9b2abe |
| 26-Jun-2014 |
Rui Paulo <rpaulo@FreeBSD.org> |
Revert r267898.
|
#
d8e37c5f |
| 26-Jun-2014 |
Rui Paulo <rpaulo@FreeBSD.org> |
Bring the following change from the illumos-joyent repository:
commit 78e24ab6803bbe11ba37642624e1498ede5b239d Author: Bryan Cantrill <bryan@joyent.com> Date: Thu Oct 31 01:20:54 2013
OS-1688
Bring the following change from the illumos-joyent repository:
commit 78e24ab6803bbe11ba37642624e1498ede5b239d Author: Bryan Cantrill <bryan@joyent.com> Date: Thu Oct 31 01:20:54 2013
OS-1688 DTrace count() with histogram OS-2360 DTrace full width distribution histograms OS-2361 DTrace frequency trails
MFC after: 2 weeks
show more ...
|
#
23e4da43 |
| 02-Apr-2014 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
MFV r258379;
4248 dtrace(1M) should never create DOF with empty probes section 4249 Only probes from the first DTrace object file will be included
Illumos Revision: 4a20ab41aadcb81c53e72fc65886e964
MFV r258379;
4248 dtrace(1M) should never create DOF with empty probes section 4249 Only probes from the first DTrace object file will be included
Illumos Revision: 4a20ab41aadcb81c53e72fc65886e964e9add59
Reference: https://www.illumos.org/issues/4248 https://www.illumos.org/issues/4249
Obtained from: Illumos MFC after: 1 month
show more ...
|
#
a98ff317 |
| 28-Jul-2013 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
DTrace: re-merge remainder of r249367 (original from Illumos).
Bring back some important fixes from Illumos:
3022 DTrace: keys should not affect the sort order when sorting by value 3023 it should
DTrace: re-merge remainder of r249367 (original from Illumos).
Bring back some important fixes from Illumos:
3022 DTrace: keys should not affect the sort order when sorting by value 3023 it should be possible to dereference dynamic variables 3024 D integer narrowing needs some work
We particularly avoid the LD_NOLAZYLOAD changes that Illumos made as those don't apply to FreeBSD and were causing problems in interactive mode.
Illumos Revision: 13758:23432da34147
Reference:
https://www.illumos.org/issues/3022 https://www.illumos.org/issues/3023 https://www.illumos.org/issues/3024
MFC after: 1 month Tested by: markj
show more ...
|
#
09e6105f |
| 12-May-2013 |
Mark Johnston <markj@FreeBSD.org> |
Bring back part of r249367 by adding DTrace's temporal option, which allows users to guarantee that the output of DTrace scripts will be time-ordered. This option is enabled by adding the line
#pr
Bring back part of r249367 by adding DTrace's temporal option, which allows users to guarantee that the output of DTrace scripts will be time-ordered. This option is enabled by adding the line
#pragma D option temporal
to the beginning of a script, or by adding '-x temporal' to the arguments of dtrace(1).
This change fixes a bug in the original port of the temporal option. This bug was causing some assertions to fail, so they had been disabled; in this revision the assertions are working properly and are enabled.
The DTrace version number has been bumped from 1.9.0 to 1.9.1 to reflect the language change that's being introduced.
This change corresponds to part of illumos-gate commit e5803b76927480: 3021 option for time-ordered output from dtrace(1M)
Reviewed by: pfg Obtained from: illumos MFC after: 1 month
show more ...
|
#
03836978 |
| 17-Apr-2013 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
DTrace: Revert r249367
The following change from illumos brought caused DTrace to pause in an interactive environment:
3026 libdtrace should set LD_NOLAZYLOAD=1 to help the pid provider
This was n
DTrace: Revert r249367
The following change from illumos brought caused DTrace to pause in an interactive environment:
3026 libdtrace should set LD_NOLAZYLOAD=1 to help the pid provider
This was not detected during testing because it doesn't affect scripts.
We shouldn't be changing the environment, especially since the LD_NOLAZYLOAD option doesn't apply to our (GNU) ld. Unfortunately the change from upstream was made in such a way that it is very difficult to separate this change from the others so, at least for now, it's better to just revert everything.
Reference: https://www.illumos.org/issues/3026
Reported by: Navdeep Parhar and Mark Johnston
show more ...
|
#
ddd5b8e9 |
| 11-Apr-2013 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
DTrace: option for time-ordered output
Merge changes from illumos:
3021 option for time-ordered output from dtrace(1M) 3022 DTrace: keys should not affect the sort order when sorting by value 3023
DTrace: option for time-ordered output
Merge changes from illumos:
3021 option for time-ordered output from dtrace(1M) 3022 DTrace: keys should not affect the sort order when sorting by value 3023 it should be possible to dereference dynamic variables 3024 D integer narrowing needs some work 3025 register leak in D code generation 3026 libdtrace should set LD_NOLAZYLOAD=1 to help the pid provider
This brings yet another feature implemented in upstream DTrace. A complete description is available here: http://dtrace.org/blogs/ahl/2012/07/28/my-new-dtrace-favorite/
This change bumps the DT_VERS_* number to 1.9.1 in accordance to what is done in illumos.
This change was somewhat complicated because upstream is mixed many changes in an individual commit and some of the tests don't really apply to us.
There are also appear to be differences in timestamping with Solaris so we had to workaround some assertions making sure no regression happened.
Special thanks to Fabian Keil for changes and testing.
Illumos Revisions: 13758:23432da34147
Reference: https://www.illumos.org/issues/3021 https://www.illumos.org/issues/3022 https://www.illumos.org/issues/3023 https://www.illumos.org/issues/3024 https://www.illumos.org/issues/3025 https://www.illumos.org/issues/1694
Tested by: Fabian Keil Obtained from: Illumos MFC after: 1 months
show more ...
|
#
54727873 |
| 25-Mar-2013 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
Dtrace: Add SUN MDB-like type-aware print() action.
Merge change from illumos:
1694 Add type-aware print() action
This is a very nice feature implemented in upstream Dtrace. A complete description
Dtrace: Add SUN MDB-like type-aware print() action.
Merge change from illumos:
1694 Add type-aware print() action
This is a very nice feature implemented in upstream Dtrace. A complete description is available here: http://dtrace.org/blogs/eschrock/2011/10/26/your-mdb-fell-into-my-dtrace/
This change bumps the DT_VERS_* number to 1.9.0 in accordance to what is done in illumos.
While here also include some minor cleanups to ease further merging and appease clang with a fix by Fabian Keil.
Illumos Revisions: 13501:c3a7090dbc16 13483:f413e6c5d297
Reference: https://www.illumos.org/issues/1560 https://www.illumos.org/issues/1694
Tested by: Fabian Keil Obtained from: Illumos MFC after: 1 month
show more ...
|
#
675cf915 |
| 27-Jun-2012 |
Pedro F. Giffuni <pfg@FreeBSD.org> |
Bring llquantize support into Dtrace.
Bryan Cantrill implemented the equivalent of semi-log graph paper for Dtrace so llquantize will use one logarithmic and one linear scale.
Special thanks to Mar
Bring llquantize support into Dtrace.
Bryan Cantrill implemented the equivalent of semi-log graph paper for Dtrace so llquantize will use one logarithmic and one linear scale.
Special thanks to Mark Peek for providing fix to an assertion and to Fabian Keill for testing the port.
Illumos Revision: 13355:15b74a2a9a9d
Reference: https://www.illumos/issues/905
Obtained from: Illumos Tested by: Fabian Keill, mp MFC after: 4 days
show more ...
|
#
afba0b6e |
| 02-Aug-2010 |
Rui Paulo <rpaulo@FreeBSD.org> |
Fix another mismerge: bring back the definition of DT_MUTEX_HELD().
|
#
1670a1c2 |
| 02-Aug-2010 |
Rui Paulo <rpaulo@FreeBSD.org> |
MFV OpenSolaris DTrace userland bits.
|
#
556cb98d |
| 23-Jul-2010 |
Andriy Gapon <avg@FreeBSD.org> |
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 insufficie
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
show more ...
|
#
f5a73645 |
| 26-Apr-2008 |
John Birrell <jb@FreeBSD.org> |
* Add a couple of action definitions for FreeBSD extensions. * Handle the different ioctl design. * Add support for the get and set error location. * Add support for freopen().
|
#
20594ebf |
| 26-Apr-2008 |
John Birrell <jb@FreeBSD.org> |
This commit was generated by cvs2svn to compensate for changes in r178528, which included commits to RCS files with non-trunk default branches.
|