git: d80ad7dabb - main - handbook/dtrace: Add Out-of-Kernel Modules info

"Danilo G. Baio" <[email protected]>
Newsgroups gmane.os.freebsd.devel.cvs.doc
Message-ID <[email protected]>
The branch main has been updated by dbaio:

URL: https://cgit.FreeBSD.org/doc/commit/?id=d80ad7dabb8d9fe4afae3186c691bc86e751045a

commit d80ad7dabb8d9fe4afae3186c691bc86e751045a
Author:     Danilo G. Baio <[email protected]>
AuthorDate: 2024-05-01 18:41:50 +0000
Commit:     Danilo G. Baio <[email protected]>
CommitDate: 2024-05-01 18:41:50 +0000

    handbook/dtrace: Add Out-of-Kernel Modules info
    
    Reviewed by:    gnn
---
 documentation/content/en/books/handbook/dtrace/_index.adoc | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/documentation/content/en/books/handbook/dtrace/_index.adoc b/documentation/content/en/books/handbook/dtrace/_index.adoc
index cf6e5e1c42..797d27606c 100644
--- a/documentation/content/en/books/handbook/dtrace/_index.adoc
+++ b/documentation/content/en/books/handbook/dtrace/_index.adoc
@@ -153,6 +153,19 @@ This language is called the D language and it is very similar to C++.
 An in depth discussion of the language is beyond the scope of this document.
 It is covered extensively in the http://www.dtrace.org/guide[Illumos Dynamic Tracing Guide].
 
+[[dtrace-out-of-kernel]]
+== Enabling DTrace in Out-of-Kernel Modules
+
+To add DTrace support to an out-of-kernel module, which is useful for development and debugging, include the following line in the module's Makefile:
+
+[.programlisting]
+....
+CFLAGS+= -DKDTRACE_HOOKS
+....
+
+This flag enables DTrace hooks during compilation, allowing for advanced debugging and monitoring of the module.
+Ensure to recompile the module after this modification to activate DTrace functionality.
+
 [[dtrace-using]]
 == Using DTrace
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.