Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Matthieu CASTET <matthieu.castet <at> parrot.com>
Subject: build only daemon
Newsgroups: gmane.linux.oprofile
Date: Wednesday 7th May 2008 13:23:26 UTC (over 9 years ago)
Hi,

for embedded use it could be nice to have a option to build only the
oprofiled
daemon and utils.

Last time I tried to do it, I should do :
* Remove bfd_openr check in configure
* Remove abi.cpp from libabi_a_SOURCES in libabi/Makefile.am

./configure
make libabi libabi.a
make libdb libodb.a
make libop libop.a
make libutil libutil.a
make daemon
make utils
make daemon install
make utils install

Could it be possible an option to configure or a Makefile target to do that
?

PS : I would be nice to have a simple opcontrol script with less options
but
less dependency. The most tricky part is to find a way to recover the
kernel
address. For that I parse /proc/iomem, but the address can be the physical
one
and we want the virtual one.

For example is a minimal control script for oprofile :

#! /bin/sh

set -e


SESSION_DIR=/var/lib/oprofile
#should be set according platform
KERNEL_ADDR=`grep "Kernel text" /proc/iomem | sed -e "s/\-3/,0xc/1" -e "s/
3/0xc/1" -e "s/:.*//1"`
#KERNEL_ADDR="0xc0021000,0xc020ffff"
case $1 in
    --init)
        modprobe oprofile timer=1
        mount -t oprofilefs nodev /dev/oprofile
        mkdir -p $SESSION_DIR
        mkdir -p ${SESSION_DIR}/samples
        echo "starting `oprofiled -v`"
        oprofiled  -e timer -k vmlinux --session-dir=$SESSION_DIR -r 
$KERNEL_ADDR        ;;
    --start)
        echo 1 | cat  > /dev/oprofile/enable
        ;;
    --stop)
        echo 1 | cat  > /dev/oprofile/dump
        echo 0 | cat  > /dev/oprofile/enable
        killall -HUP oprofiled
        killall -USR2 oprofiled
        ;;
    --reset)
        rm -rf ${SESSION_DIR}/samples/current/{kern}
        rm -rf ${SESSION_DIR}/samples/current/{root}
        killall -HUP oprofiled
        ;;
        *)
        usage
        ;;
esac

exit
        


-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
 
CD: 3ms