gcc -pg, "Generate extra code to write profile information suitable for
the analysis program `gprof'" (Info), gives trouble. After compiling and
linking with gcc -ansi -pg -Wall, I get a run-time fatal memory error:
No space for profiling buffer(s)
[then some minutes later ...]
Segmentation fault (core dumped)
and I am left with an empty gmon.out file.
According to gdb, the crash is in _mcleanup(), which is not one of my own
functions. There is no seg. fault when the program is compiled in the same
way but without -pg. There is 4 G of disk space and free memory of 60 M
RAM + 50 M swap (including buffers and cached), and the shell limits are
stacksize 8192 kbytes
coredumpsize 1000000 kbytes
I have just tried compiling and linking with -p instead of -pg, but I get
the same "No space for profiling buffer(s)" message, and a dump of core
when in _mcleanup ()again when I CTRL-c.
I would be grateful for any advice on how to work around this. Also, if
anyone knows about other profilers, especially pc-sampling profilers,
please let me know. I could cobble something together with profil() plus
gcc -a, but I assume someone has been there before me.
Biocomputing Research Unit,
Institute of Cell and Molecular Biology,