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 mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/gnunet-developers

Reply via email to