# HG changeset patch # User Richard M. Stallman # Date 871263482 0 # Node ID 27c3012475b2eaaf05366b8f84c347e7d7866dce # Parent 7fb99affa49a709d21593717a23af205cd62c410 (main) [__FreeBSD__ && PROFILING]: Add code for profiling. diff -r 7fb99affa49a -r 27c3012475b2 src/emacs.c --- a/src/emacs.c Mon Aug 11 01:18:29 1997 +0000 +++ b/src/emacs.c Mon Aug 11 01:38:02 1997 +0000 @@ -1095,6 +1095,24 @@ #endif } + /* Gerd Moellmann says this makes profiling work on + FreeBSD. It might work on some other systems too. + Give it a try and tell me if it works on your system. */ +#ifdef __FreeBSD__ +#ifdef PROFILING + if (initialized) + { + extern void _mcleanup (); + extern char etext; + extern void clear_glyph_matrix (); + atexit (_mcleanup); + monstartup (clear_glyph_matrix, &etext); + } + else + moncontrol (0); +#endif +#endif + initialized = 1; #ifdef LOCALTIME_CACHE