DragonFly BSD
DragonFly commits List (threaded) for 2012-05
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

git: vkernel: Fix compilation with profiling support.


From: Sascha Wildner <swildner@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 17 May 2012 07:17:38 -0700 (PDT)

commit b96eeefdbef8ad746365c234181372389428cc11
Author: Sascha Wildner <saw@online.de>
Date:   Thu May 17 16:17:22 2012 +0200

    vkernel: Fix compilation with profiling support.
    
    The vkernel is a special userland program in the regard that its Makefile
    is generated by config(8), which is kind of tailored to the real kernel.
    
    So first of all, we have to modify config(8) to detect it's a vkernel we
    want to build and in this case it should not define GPROF which otherwise
    activates the real kernel's profiling bits.
    
    Then, modify libkern's mcount.c to skip kernel specific parts too.
    
    Then, modify the vkernels' Makefiles to take into account ${PROF} (and
    while we're here, ${DEBUG} too) which are set by the surrounding Makefile
    which is generated by config(8).
    
    The vkernel is now (from profiling point of view) treated like any other
    userland program.
    
    Last but not least, add some documentation about building a vkernel with
    profiling support to vkernel's manpage.
    
    To build with profiling, simply add CONFIGARGS=-p to the buildkernel
    command line. It will need the config(8) program to be in /usr/obj's
    btools dir, so either a buildworld with this commit needs to be done,
    or config can be installed manually to /usr/sbin and nativekernel can
    be used.
    
    Tested-by: tuxillo

Summary of changes:
 share/man/man7/vkernel.7             |   14 +++++++++++++-
 sys/libkern/mcount.c                 |   15 +++++++--------
 sys/platform/vkernel/conf/Makefile   |    5 ++---
 sys/platform/vkernel64/conf/Makefile |    5 ++---
 usr.sbin/config/mkmakefile.c         |    7 +++++--
 5 files changed, 29 insertions(+), 17 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/b96eeefdbef8ad746365c234181372389428cc11


-- 
DragonFly BSD source repository



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]