PERFORCE change 99659 for review
John Birrell
jb at FreeBSD.org
Tue Jun 20 06:05:33 UTC 2006
http://perforce.freebsd.org/chv.cgi?CH=99659
Change 99659 by jb at jb_freebsd2 on 2006/06/20 06:04:45
Register and de-register the thread switch callback function for vtime.
Affected files ...
.. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_load.c#13 edit
.. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_unload.c#12 edit
Differences ...
==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_load.c#13 (text+ko) ====
@@ -38,6 +38,9 @@
/* Hang our hook for DTrace traps during probes. */
dtrace_instr_size_func = dtrace_instr_size;
+ /* Hang our hook for thread switches. */
+ dtrace_vtime_switch_func = dtrace_vtime_switch;
+
/*
* XXX This is a short term hack to avoid having to comment
* out lots and lots of lock/unlock calls.
==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_unload.c#12 (text+ko) ====
@@ -154,6 +154,13 @@
dtrace_mutex_destroy(&cpu_lock);
dtrace_mutex_destroy(&mod_lock);
+ /*
+ * Reset our hook for thread switches, but ensure that vtime isn't
+ * active first.
+ */
+ dtrace_vtime_active = 0;
+ dtrace_vtime_switch_func = NULL;
+
/* Reset our hook for DTrace traps during probes. */
dtrace_instr_size_func = NULL;
More information about the p4-projects
mailing list