]> git.eshelyaron.com Git - emacs.git/commitdiff
(main) [__FreeBSD__ && PROFILING]: Add code for profiling.
authorRichard M. Stallman <rms@gnu.org>
Mon, 11 Aug 1997 01:38:02 +0000 (01:38 +0000)
committerRichard M. Stallman <rms@gnu.org>
Mon, 11 Aug 1997 01:38:02 +0000 (01:38 +0000)
src/emacs.c

index 7e6ac1413fcee79565f1f61b52bd02df0b909614..05b044f57cfc3e550747873fc9dc070eb8574b9a 100644 (file)
@@ -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