summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1997-08-11 01:38:02 +0000
committerRichard M. Stallman <rms@gnu.org>1997-08-11 01:38:02 +0000
commitd8a3a5c5fee7cfb235825d3b22ee7e86eb383fee (patch)
tree7ee155d2cca53a97918f4182fc12d879e6aecc02 /src
parentf0094e74063a7b87cdde1987813681105e6a34ee (diff)
downloademacs-d8a3a5c5fee7cfb235825d3b22ee7e86eb383fee.tar.gz
(main) [__FreeBSD__ && PROFILING]: Add code for profiling.
Diffstat (limited to 'src')
-rw-r--r--src/emacs.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/emacs.c b/src/emacs.c
index 7e6ac1413fc..05b044f57cf 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -1095,6 +1095,24 @@ the Bugs section of the Emacs manual or the file BUGS.\n", argv[0]);
#endif
}
+ /* Gerd Moellmann <gerd@acm.org> 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