I revised the patch to fix a bug causing profiling to always be enabled. The commit message is much more detailed. I have also noticed a bug in the current build process that occurs when enable-profiling is specified and with a parallel build. I randomly see compile jobs reporting segmentation faults. The compiled files appear to be correctly output, so my best guess (and that is all it is) is that the race condition for 32 compile processes all competing to write "gmon.out" triggers some bug in the profiling code inserted by gcc with the pg flag. I don't see these issues with this patch, but a more targeted fix could be to have emacs specify the environment variable "GMON_OUT_PREFIX" at startup if it is not already set, since the profiling code will then use that name suffixed by the process id instead of just "gmon.out". That should at least address the race condition, both with other instances of emacs and with the helper executables which will also race for the file "gmon.out" if executed from the same directory as the emacs process that invokes them. I don't know whether the segfaults should be considered a bug in "gcc -pg", or a violation of the requirements imposed on using the instrumented code generated by "gcc -pg". Lynn