aboutsummaryrefslogtreecommitdiff
path: root/sys/cddl/contrib/opensolaris/uts/common
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2022-08-09 20:08:13 +0000
committerMark Johnston <markj@FreeBSD.org>2022-08-09 22:34:01 +0000
commit3ba8e9dc4a0e0e9c35cfadfe25379871ce581697 (patch)
tree293bc80524525f0b031e96527e0c92f31d580f44 /sys/cddl/contrib/opensolaris/uts/common
parenta7aa3d4d758dc60894e7f9c99411a64837fd3c18 (diff)
downloadsrc-3ba8e9dc4a0e0e9c35cfadfe25379871ce581697.tar.gz
src-3ba8e9dc4a0e0e9c35cfadfe25379871ce581697.zip
dtrace/amd64: Implement emulation of call instructions
Here, the provider is responsible for updating the trapframe to redirect control flow and for computing the return address. Once software-saved registers are restored, the emulation shifts the remaining context down on the stack to make space for the return address, then copies the address provided by the invop handler. dtrace_invop() is modified to allocate temporary storage space on the stack for use by the provider to return the return address. This is to support a new provider for amd64 which can instrument arbitrary instructions, not just function entry and exit instructions as FBT does. In collaboration with: christos Sponsored by: Google, Inc. (GSoC 2022) Sponsored by: The FreeBSD Foundation MFC after: 2 weeks
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common')
-rw-r--r--sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h b/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h
index c15cc39189b1..5cad5a3b18c9 100644
--- a/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h
+++ b/sys/cddl/contrib/opensolaris/uts/common/sys/dtrace.h
@@ -2440,6 +2440,10 @@ extern void dtrace_helpers_destroy(proc_t *);
#define DTRACE_INVOP_NOP 4
#define DTRACE_INVOP_RET 5
+#if defined(__amd64)
+#define DTRACE_INVOP_CALL 6
+#endif
+
#elif defined(__powerpc__)
#define DTRACE_INVOP_BCTR 1