Page MenuHomeFreeBSD

D33440.diff
No OneTemporary

D33440.diff

diff --git a/sys/cddl/dev/dtrace/aarch64/dtrace_subr.c b/sys/cddl/dev/dtrace/aarch64/dtrace_subr.c
--- a/sys/cddl/dev/dtrace/aarch64/dtrace_subr.c
+++ b/sys/cddl/dev/dtrace/aarch64/dtrace_subr.c
@@ -270,7 +270,7 @@
int tmp;
int i;
- invop = dtrace_invop(frame->tf_elr, frame, frame->tf_elr);
+ invop = dtrace_invop(frame->tf_elr, frame, frame->tf_x[0]);
tmp = (invop & LDP_STP_MASK);
if (tmp == STP_64 || tmp == LDP_64) {
diff --git a/sys/cddl/dev/fbt/aarch64/fbt_isa.c b/sys/cddl/dev/fbt/aarch64/fbt_isa.c
--- a/sys/cddl/dev/fbt/aarch64/fbt_isa.c
+++ b/sys/cddl/dev/fbt/aarch64/fbt_isa.c
@@ -56,16 +56,21 @@
fbt = fbt_probetab[FBT_ADDR2NDX(addr)];
for (; fbt != NULL; fbt = fbt->fbtp_hashnext) {
- if ((uintptr_t)fbt->fbtp_patchpoint == addr) {
- cpu->cpu_dtrace_caller = addr;
+ if ((uintptr_t)fbt->fbtp_patchpoint != addr)
+ continue;
+ cpu->cpu_dtrace_caller = addr;
+
+ if (fbt->fbtp_roffset == 0) {
dtrace_probe(fbt->fbtp_id, frame->tf_x[0],
frame->tf_x[1], frame->tf_x[2],
frame->tf_x[3], frame->tf_x[4]);
-
- cpu->cpu_dtrace_caller = 0;
- return (fbt->fbtp_savedval);
+ } else {
+ dtrace_probe(fbt->fbtp_id, fbt->fbtp_roffset, rval,
+ 0, 0, 0);
}
+ cpu->cpu_dtrace_caller = 0;
+ return (fbt->fbtp_savedval);
}
return (0);
@@ -216,6 +221,7 @@
fbt->fbtp_rval = DTRACE_INVOP_B;
else
fbt->fbtp_rval = DTRACE_INVOP_RET;
+ fbt->fbtp_roffset = (uintptr_t)instr - (uintptr_t)symval->value;
fbt->fbtp_savedval = *instr;
fbt->fbtp_patchval = FBT_PATCHVAL;
fbt->fbtp_hashnext = fbt_probetab[FBT_ADDR2NDX(instr)];

File Metadata

Mime Type
text/plain
Expires
Tue, Jan 28, 12:35 AM (9 h, 29 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16184322
Default Alt Text
D33440.diff (1 KB)

Event Timeline