diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-04-20 00:32:15 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2016-04-20 00:32:15 +0200 |
commit | 675fd4eecd75a7156c83bb814ecfdbbcfbf27ea1 (patch) | |
tree | ca1ef6507b938fe491bdf51a2fe6137de52d0f4c /configfrag.ac | |
parent | c908225cb5def2c6df3cf889ca458db8b633d395 (diff) | |
download | gnumach-675fd4eecd75a7156c83bb814ecfdbbcfbf27ea1.tar.gz gnumach-675fd4eecd75a7156c83bb814ecfdbbcfbf27ea1.tar.bz2 gnumach-675fd4eecd75a7156c83bb814ecfdbbcfbf27ea1.zip |
Add kernel profiling through sampling
* NEWS: Advertise feature.
* configfrac.ac (--enable-kernsample): Add option.
* kern/pc_sample.h (take_pc_sample): Add usermode and pc parameter.
(take_pc_sample_macro): Take usermode and pc parameters, pass as such to
take_pc_sample.
* kern/pc_sample.c (take_pc_sample): Use pc parameter when usermode is 1.
* kern/mach_clock.c (clock_interrupt): Add pc parameter. Pass usermode and
pc to take_pc_sample_macro call.
* i386/i386/hardclock.c (hardclock): Pass regs->eip to clock_interrupt call
on normal interrupts, NULL on interrupt interrupt.
* vm/vm_fault.c (vm_fault_cleanup): Set usermode to 1 and pc to NULL in
take_pc_sample_macro call.
Diffstat (limited to 'configfrag.ac')
-rw-r--r-- | configfrag.ac | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/configfrag.ac b/configfrag.ac index cfc34c76..3d7033ec 100644 --- a/configfrag.ac +++ b/configfrag.ac @@ -85,6 +85,15 @@ AC_DEFINE([MACH_PAGEMAP], [1], [MACH_PAGEMAP]) # Do pc sample histogram. AC_DEFINE([MACH_PCSAMPLE], [1], [MACH_PCSAMPLE]) +# Sample kernel too. +AC_ARG_ENABLE([kernsample], + AS_HELP_STRING([--enable-kernsample], [enable sampling kernel])) +[if [ x"$enable_kernsample" = xyes ]; then] + AC_DEFINE([MACH_KERNSAMPLE], [1], [MACH_KERNSAMPLE]) +[else] + AC_DEFINE([MACH_KERNSAMPLE], [0], [MACH_KERNSAMPLE]) +[fi] + # TTD Remote Kernel Debugging. AC_DEFINE([MACH_TTD], [0], [MACH_TTD]) |