Writing the "most generic" dtrace script possible (please correct me
if wrong :-)):
pid$target:::entry,
pid$target:::return
/ execname == "YYYYY" /
{
printf("u:");
}
fbt::*:entry,
fbt::*:return
/ execname == "YYYYY" /
{
printf("k:");
}
I managed to trace the transition from user to kernel and vice versa:
1 6847 sys_rtt_common:return k:
1 67621 mutex_lock:return u:
1 6846 sys_rtt_common:entry k:
1 6847 sys_rtt_common:return k:
1 62685 _malloc_unlocked:entry u:
1 6846 sys_rtt_common:entry k:
1 6847 sys_rtt_common:return k:
1 62693 cleanfree:entry u:
1 6846 sys_rtt_common:entry k:
1 5746 trap:entry k:
1 6940 do_interrupt:entry k:
1 6842 cpu_idle_exit:entry k:
1 6843 cpu_idle_exit:return k:
1 26906 apic_intr_enter:entry k:
1 6190 psm_get_cpu_id:entry k:
1 6191 psm_get_cpu_id:return k:
1 26907 apic_intr_enter:return k:
1 3700 hilevel_intr_prolog:entry k:
the thing is that i keep seeing this sys_rtt_common() everywhere.
what is the purpose of this function? the code is not understood by
me either:
http://cvs.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/i86pc/os/intr.c
994 /*
995 * Common tasks always done by _sys_rtt, called with
interrupts disabled.
996 * Returns 1 if returning to userland, 0 if returning to system mode.
997 */
998 int
999 sys_rtt_common(struct regs *rp)
1000 {
I cannot answer - who call sys_rtt_common()? from any userspace API
(cleanfree() for example), how is the transition to kernel's
sys_rtt_common() done?
SYSENTER? (what code)?
and inside the function - why is it sometime returning back to
userspace, and sometime continuing processing in kernelspace?
--
Regards,
Peter Teoh
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code