mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-19 03:17:36 +00:00
(main) [__FreeBSD__ && PROFILING]: Add code for profiling.
This commit is contained in:
parent
c13c88d74d
commit
e610ea4305
1 changed files with 18 additions and 0 deletions
18
src/emacs.c
18
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
|
||||
|
|
|
|||
Loading…
Reference in a new issue