[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-developers] Profiling GNUnet
From: |
N. Durner |
Subject: |
[GNUnet-developers] Profiling GNUnet |
Date: |
Wed, 26 Oct 2005 22:03:39 +0200 |
User-agent: |
Mozilla Thunderbird 1.0.6 (Windows/20050716) |
Hi,
thanks to the workaround described at
http://sam.zoy.org/writings/programming/gprof.html
we're now able to profile GNUnet using gprof:
1. Set ENABLE_PROFILER to 1 in src/util/semaphore.c:
#define ENABLE_PROFILER 1
2. Compile GNUnet with
CFLAGS="-O0 -g -pg" ./configure ... && make install
3. Run the application as usual:
gnunetd -d
4. After termination, run gprof:
gprof `which gnunetd` gmon.out > gnunetd.txt
This profiles the application only. To profile a shared library:
1. Run
export LD_PROFILE=libgnunetutil.so.1
2. Run
export LD_PROFILE_OUTPUT=.
3. Run the application as usual:
gnunetd -d
4. After termination, run sprof (Note the "S"!):
sprof libgnunetutil.so libgnunetutil.so.1.profile > util.txt
The patch to semaphore.c was commited a few minutes ago, so this
requires a "svn up".
Regards,
Nils
- [GNUnet-developers] Profiling GNUnet,
N. Durner <=