summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormarkj <markj@FreeBSD.org>2014-08-24 17:10:47 +0000
committermarkj <markj@FreeBSD.org>2014-08-24 17:10:47 +0000
commit46bd89ef4cc8e38b4ea093f38353946ba8d86705 (patch)
treeeef55d0bdd12861c338089e0ff2e12dff30e6137
parentbf5f21dde4e784fd1c07ddcdab78b4c1eff24b1b (diff)
downloadFreeBSD-src-46bd89ef4cc8e38b4ea093f38353946ba8d86705.zip
FreeBSD-src-46bd89ef4cc8e38b4ea093f38353946ba8d86705.tar.gz
Restore the correct value when disabling probes. Otherwise the instrumented
tracepoints would continue to generate traps, which would be ignored but could consume noticeable amounts of CPU if, say, all functions in the kernel were instrumented. X-MFC-With: r270067
-rw-r--r--sys/cddl/dev/fbt/fbt.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/cddl/dev/fbt/fbt.c b/sys/cddl/dev/fbt/fbt.c
index 894eb62..a8b86a0 100644
--- a/sys/cddl/dev/fbt/fbt.c
+++ b/sys/cddl/dev/fbt/fbt.c
@@ -121,7 +121,7 @@ fbt_doubletrap(void)
fbt = fbt_probetab[i];
for (; fbt != NULL; fbt = fbt->fbtp_next)
- *fbt->fbtp_patchpoint = fbt->fbtp_savedval;
+ fbt_patch_tracepoint(fbt, fbt->fbtp_savedval);
}
}
@@ -253,7 +253,7 @@ fbt_disable(void *arg, dtrace_id_t id, void *parg)
return;
for (; fbt != NULL; fbt = fbt->fbtp_next)
- fbt_patch_tracepoint(fbt, fbt->fbtp_patchval);
+ fbt_patch_tracepoint(fbt, fbt->fbtp_savedval);
}
static void
@@ -268,7 +268,7 @@ fbt_suspend(void *arg, dtrace_id_t id, void *parg)
return;
for (; fbt != NULL; fbt = fbt->fbtp_next)
- fbt_patch_tracepoint(fbt, fbt->fbtp_patchval);
+ fbt_patch_tracepoint(fbt, fbt->fbtp_savedval);
}
static void
OpenPOWER on IntegriCloud