User Tools

Site Tools


developersguide:statisticalprofiling

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

developersguide:statisticalprofiling [2014/11/12 17:51]
lionelsambuc created
developersguide:statisticalprofiling [2016/01/28 12:16] (current)
dcvmoole first attempt at an update
Line 3: Line 3:
  
 ==== Prerequisites ==== ==== Prerequisites ====
-Before statistical profiling can be used, some configuration changes must be made in MINIX. In ''/​usr/​src/​include/​minix/​config.h'',​ set the ''​SPROFILE''​ constant to ''​1''​. This causes the kernel to allocate a huge buffer to store profiling samples. After these changes, a ''​make ​world''​ command (in ''/​usr/​src''​) is needed to compile and install the new image.+Before statistical profiling can be used, some configuration changes must be made in MINIX. In ''/​usr/​src/minix/​include/​minix/​config.h'',​ set the ''​SPROFILE''​ constant to ''​1''​. This causes the kernel to allocate a huge buffer to store profiling samples. After these changes, a ''​make ​build''​ command (in ''/​usr/​src''​) is needed to compile and install the new image.
  
-If you want to use NMI rather than RTC, additional configuration changes are needed. In ''/​usr/​src/​kernel/​config.h'',​ add:+If you want to use NMI rather than RTC, you need to perform the build with the following make variables (TODO: explain how to set those):
 <​code>​ <​code>​
-#define USE_APIC ​    +MKAPIC=
-#define USE_ACPI ​    +MKACPI=
-#define USE_WATCHDOG ​1+MKWATCHDOG=1
 </​code>​ </​code>​
-After this, the boot image must be recompiled and installed ​(''​make install''​ in ''/​usr/​src/​tools''​ or simply ''​make world''​ in ''/​usr/​src''​ to do everything in one go). You must also pass some kernel parameters from the bootloader to make this work. Edit ''/​boot.cfg''​ to add a menu item that includes the following arguments: ''​watchdog=1 no_apic=0 acpi=yes''​. Note that ''/​boot.cfg''​ is overwritten when the system is compiled, so it may be more convenient to change the local additions file ''/​etc/​boot.cfg.local,''​ that is never overwritten,​ instead. After booting this new option, NMI statistical profiling should work.+After the build process has installed ​the system with these new settings, you must also pass some kernel parameters from the bootloader to make this work. Edit ''/​boot.cfg''​ to add a menu item that includes the following arguments: ''​watchdog=1 no_apic=0 acpi=yes''​. Note that ''/​boot.cfg''​ is overwritten when the system is compiled, so it may be more convenient to change the local additions file ''/​etc/​boot.cfg.local,''​ that is never overwritten,​ instead. After booting this new option, NMI statistical profiling should work.
  
 ==== Usage ==== ==== Usage ====
developersguide/statisticalprofiling.txt · Last modified: 2016/01/28 12:16 by dcvmoole