changeset 2514:b49d38bc659d

[xemacs-hg @ 2005-01-26 10:09:19 by ben] Minor changes to profile code profile.c, profile.h: Add fillers for easier temporary profiling. Add RETURN_UNGCPRO_EXIT_PROFILING, RETURN_EXIT_PROFILING.
author ben
date Wed, 26 Jan 2005 10:09:20 +0000
parents d8595adfc810
children de9952d2ed18
files src/ChangeLog src/profile.c src/profile.h
diffstat 3 files changed, 177 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Wed Jan 26 10:05:03 2005 +0000
+++ b/src/ChangeLog	Wed Jan 26 10:09:20 2005 +0000
@@ -1,3 +1,126 @@
+2005-01-26  Ben Wing  <ben@xemacs.org>
+
+	* profile.c:
+	* profile.c (vars_of_profile):
+	* profile.h:
+	Add fillers for easier temporary profiling.
+	Add RETURN_UNGCPRO_EXIT_PROFILING, RETURN_EXIT_PROFILING.
+
+2004-11-17  Ben Wing  <ben@xemacs.org>
+
+	* emacs.c:
+	Update history section.
+	
+	* emacs-marshals.c:
+	* emacs-marshals.c (initialize_marshaller_storage):
+	* hash.c:
+	* hash.c (string_equal):
+	* hash.c (make_hash_table):
+	* hash.h:
+	* ui-gtk.c (type_already_imported_p):
+	Clean up and generalize creation of string hash tables.
+	
+	* profile.c:
+	* profile.c (vars_of_profile):
+	* profile.h:
+	
+2004-11-13  Ben Wing  <ben@xemacs.org>
+
+	* nt.c:
+	* fileio.c:
+	Fix sync comments.
+	
+	* free-hook.c (check_free):
+	Fix aliasing warning.
+	
+	* config.h.in:
+	* dired-msw.c (mswindows_get_files):
+	* emacs.c (main_1):
+	* event-msw.c (mswindows_wnd_proc):
+	* fileio.c:
+	* fileio.c (find_end_of_directory_component):
+	* fileio.c (Ffile_name_directory):
+	* fileio.c (Ffile_name_as_directory):
+	* fileio.c (if):
+	* fileio.c (Ffile_truename):
+	* fileio.c (Ffile_readable_p):
+	* fileio.c (Ffile_symlink_p):
+	* fileio.c (Ffile_accessible_directory_p):
+	* fileio.c (vars_of_fileio):
+	* glyphs.c:
+	* glyphs.c (pixmap_to_lisp_data):
+	* lisp.h:
+	* nt.c:
+	* nt.c (get_long_basename):
+	* nt.c (get_cached_volume_information):
+	* nt.c (mswindows_readdir):
+	* nt.c (open_unc_volume):
+	* nt.c (mswindows_access):
+	* nt.c (mswindows_link):
+	* nt.c (mswindows_rename):
+	* nt.c (mswindows_unlink):
+	* nt.c (mswindows_stat):
+	* nt.c (mswindows_utime):
+	* nt.c (open_input_file):
+	* nt.c (open_output_file):
+	* nt.c (Fmswindows_short_file_name):
+	* nt.c (init_nt):
+	* process-nt.c (nt_create_process):
+	* realpath.c:
+	* realpath.c (readlink_or_correct_case):
+	* realpath.c (qxe_realpath):
+	* sound.c (Fplay_sound_file):
+	* symsinit.h:
+	* sysdep.c:
+	* sysdep.c (qxe_lstat):
+	* sysdep.c (qxe_stat):
+	* sysfile.h:
+	* syswindows.h:
+	* syswindows.h (LOCAL_FILE_FORMAT_TO_TSTR):
+	* syswindows.h (LOCAL_FILE_FORMAT_MAYBE_URL_TO_TSTR):
+	* win32.c:
+	* win32.c (Fmswindows_shell_execute):
+	* win32.c (struct read_link_hash):
+	* win32.c (mswindows_read_link_1):
+	* win32.c (mswindows_read_link):
+	* win32.c (vars_of_win32):
+	* win32.c (init_win32):
+	Add support for treating shortcuts under Windows as symbolic links.
+	Enabled with mswindows-shortcuts-are-links (t by default).  Rewrite
+	lots of places to use PATHNAME_CONVERT_OUT, which is moved to
+	sysfile.h.  Add PATHNAME_RESOLVE_LINKS, which only does things
+	under Windows.
+
+	* nt.c (mswindows_rename):
+	* nt.c (mswindows_unlink):
+	* sysdep.c (sys_subshell):
+	Unicode-ize.
+	
+	* realpath.c (readlink_or_correct_case):
+	Renamed from readlink_and_correct_case.  Fix some problems with
+	Windows implementation due to incorrect understanding of workings
+	of the function.
+
+	* redisplay.c:
+	* redisplay.c (generate_displayable_area):
+	* redisplay.c (regenerate_window):
+	* redisplay.h:
+	* signal.c:
+	* signal.c (check_quit):
+	Move backtraces to internals manual.  Fix some race conditions
+	leading to crashes due to incomplete protection of critical
+	sections.  In signal.c, be more aggressive in catching incomplete
+	critical section protection -- we cannot even check for QUIT,
+	*EVER*, in a critical section.
+	
+	* sound.c (Fplay_sound_file):
+	* ntplay.c (nt_play_sound_file):
+	* sound.c:
+	* sound.h:
+	Rename play_sound_file to nt_play_sound_file and pass
+	internally-formatted data to it to avoid converting out and back
+	again.
+
 2005-01-25  Ben Wing  <ben@xemacs.org>
 
 	* extents.c:
--- a/src/profile.c	Wed Jan 26 10:05:03 2005 +0000
+++ b/src/profile.c	Wed Jan 26 10:09:20 2005 +0000
@@ -1,5 +1,5 @@
 /* Why the hell is XEmacs so fucking slow?
-   Copyright (C) 1996, 2002, 2003 Ben Wing.
+   Copyright (C) 1996, 2002, 2003, 2004 Ben Wing.
    Copyright (C) 1998 Free Software Foundation, Inc.
 
 This file is part of XEmacs.
@@ -68,6 +68,15 @@
 static Lisp_Object QSprocessing_events_at_top_level;
 static Lisp_Object QSunknown, QSprofile_overhead;
 
+#ifdef DEBUG_XEMACS
+/* For temporary profiling */
+Lisp_Object QSin_temp_spot_1;
+Lisp_Object QSin_temp_spot_2;
+Lisp_Object QSin_temp_spot_3;
+Lisp_Object QSin_temp_spot_4;
+Lisp_Object QSin_temp_spot_5;
+#endif /* DEBUG_XEMACS */
+
 static Lisp_Object Qtiming, Qtotal_timing, Qcall_count;
 static Lisp_Object Qgc_usage, Qtotal_gc_usage;
 
@@ -673,6 +682,23 @@
 
   profiling_lock = 0;
 
+#ifdef DEBUG_XEMACS
+  QSin_temp_spot_1 = build_msg_string ("(in temp spot 1)");
+  staticpro (&QSin_temp_spot_1);
+
+  QSin_temp_spot_2 = build_msg_string ("(in temp spot 2)");
+  staticpro (&QSin_temp_spot_2);
+
+  QSin_temp_spot_3 = build_msg_string ("(in temp spot 3)");
+  staticpro (&QSin_temp_spot_3);
+
+  QSin_temp_spot_4 = build_msg_string ("(in temp spot 4)");
+  staticpro (&QSin_temp_spot_4);
+
+  QSin_temp_spot_5 = build_msg_string ("(in temp spot 5)");
+  staticpro (&QSin_temp_spot_5);
+#endif /* DEBUG_XEMACS */
+
   QSunknown = build_msg_string ("(unknown)");
   staticpro (&QSunknown);
   QSprocessing_events_at_top_level =
--- a/src/profile.h	Wed Jan 26 10:05:03 2005 +0000
+++ b/src/profile.h	Wed Jan 26 10:09:20 2005 +0000
@@ -95,3 +95,30 @@
   if (do_backtrace)					\
     POP_BACKTRACE (backtrace);				\
 } while (0)
+
+#define RETURN_EXIT_PROFILING(tag, type, expr)	\
+do						\
+{						\
+  type _ret_exitpr_ = (expr);			\
+  PROFILE_RECORD_EXITING_SECTION (tag);		\
+  RETURN_SANS_WARNINGS _ret_exitpr_;		\
+} while (0)
+
+#define RETURN_LISP_EXIT_PROFILING(tag, expr)		\
+  RETURN_EXIT_PROFILING (tag, Lisp_Object, expr)
+  
+#define RETURN_UNGCPRO_EXIT_PROFILING(tag, expr)	\
+{							\
+  Lisp_Object ret_ungc_val = (expr);			\
+  UNGCPRO;						\
+  PROFILE_RECORD_EXITING_SECTION (tag);			\
+  RETURN_SANS_WARNINGS ret_ungc_val;			\
+} while (0)
+
+#ifdef DEBUG_XEMACS
+extern Lisp_Object QSin_temp_spot_1;
+extern Lisp_Object QSin_temp_spot_2;
+extern Lisp_Object QSin_temp_spot_3;
+extern Lisp_Object QSin_temp_spot_4;
+extern Lisp_Object QSin_temp_spot_5;
+#endif /* DEBUG_XEMACS */