git: d80ad7dabb - main - handbook/dtrace: Add Out-of-Kernel Modules info
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 01 May 2024 18:43:55 UTC
The branch main has been updated by dbaio:
URL: https://cgit.FreeBSD.org/doc/commit/?id=d80ad7dabb8d9fe4afae3186c691bc86e751045a
commit d80ad7dabb8d9fe4afae3186c691bc86e751045a
Author: Danilo G. Baio <dbaio@FreeBSD.org>
AuthorDate: 2024-05-01 18:41:50 +0000
Commit: Danilo G. Baio <dbaio@FreeBSD.org>
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