git: ec9388ddba02 - main - dtrace: Make pid provider work on trivial tests
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 30 Oct 2022 20:03:03 UTC
The branch main has been updated by jhibbits:
URL: https://cgit.FreeBSD.org/src/commit/?id=ec9388ddba02b45ed106113594d80be349415665
commit ec9388ddba02b45ed106113594d80be349415665
Author: Justin Hibbits <jhibbits@FreeBSD.org>
AuthorDate: 2022-10-30 19:33:06 +0000
Commit: Justin Hibbits <jhibbits@FreeBSD.org>
CommitDate: 2022-10-30 20:00:44 +0000
dtrace: Make pid provider work on trivial tests
'newpc' needs set in the "common" case. With this, the trivial test
$ dtrace -n 'pid$target:libc:strlen:entry { trace(timestamp); }' -p
<pid>
now works.
MFC after: 3 weeks
---
sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c b/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c
index 69ba0f3c64d0..8f4db66f817d 100644
--- a/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c
+++ b/sys/cddl/contrib/opensolaris/uts/powerpc/dtrace/fasttrap_isa.c
@@ -486,6 +486,10 @@ fasttrap_pid_probe(struct trapframe *frame)
rp->lr = rp->pc + 4;
break;
case FASTTRAP_T_COMMON:
+ curthread->t_dtrace_pc = pc;
+ curthread->t_dtrace_npc = pc + 4;
+ curthread->t_dtrace_on = 1;
+ new_pc = pc;
break;
};
done: