NOTE: This patch has been committed.
src/ChangeLog addition:
2005-01-26  Ben Wing  <ben(a)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.
symlink source patch:
Diff command:   bash -ci "cvs-diff --show-c-function -no-changelog "
Files affected: src/profile.h src/profile.c
Index: src/profile.c
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/profile.c,v
retrieving revision 1.22
diff -u -p -r1.22 profile.c
--- src/profile.c	2004/12/06 03:52:16	1.22
+++ src/profile.c	2005/01/26 10:08:07
@@ -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 @@ int profiling_active;
 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;
 
@@ -672,6 +681,23 @@ value can be.
 #endif /* 0 */
 
   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);
Index: src/profile.h
===================================================================
RCS file: /pack/xemacscvs/XEmacs/xemacs/src/profile.h,v
retrieving revision 1.1
diff -u -p -r1.1 profile.h
--- src/profile.h	2003/02/13 09:57:08	1.1
+++ src/profile.h	2005/01/26 10:08:09
@@ -95,3 +95,30 @@ do							\
   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 */