Howdy!

Anyone know a working method to get profiling to work? (i.e. seeing
something like "method a::getValue() spent 12s Usertime, 3s Kerneltime"
etc).

I've tried with
gcc -mprofiler-epilogue
but got the following linker error:

MessageCenter.o: In function
`MessageCenter::OpenNewInput(basic_string<char,
string_char_traits<char>, __default_alloc_template<true, 0> >)':
MessageCenter.o(.text+0x954): undefined reference to `mexitcount'

So, searching the headers (in machine/asmacros.h) I found some reference
to GPROF so I tried to define it, but it still doesn't work. Actually:
the complete argumentlist to gcc is this:

c++ -ggdb -D_THREAD_SAFE -D_REENTRANT -Wall -pedantic -ansi -pipe
-D_PTHREADS -DGPROF -mprofiler-epilogue -c MessageCenter.cpp
c++ -ggdb -D_THREAD_SAFE -D_REENTRANT -Wall -pedantic -ansi -pipe
-D_PTHREADS -DGPROF -mprofiler-epilogue MessageCenter.o -o runme
-L/usr/local/lib -pthread      
MessageCenter.o: In function
`MessageCenter::OpenNewInput(basic_string<char,
string_char_traits<char>, __default_alloc_template<true, 0> >)':
MessageCenter.o(.text+0x954): undefined reference to `mexitcount'
(one error per method, of cource)


What library should I link with? How do I use it? Documentation?

TIA

        Bjorn

btw:
*sigh* I whish there was a common site like freebsddiary.org for us
programmers - freebsdprogrammer.org would be fantastic). I just feel so
stupid when I don't find any information after a couple of hours looking
through searchengines, archives, the ports collection etc.
Somehow [EMAIL PROTECTED] seem like the wrong place to ask
(since I'm not hacking away at/inside freebsd itself. Please accept my
apologies if this is the wrong forum for these questions.


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to