delete_temp_file fix
[bpt/emacs.git] / src / profiler.c
index ff97fe8..f1b6245 100644 (file)
@@ -35,6 +35,7 @@ saturated_add (EMACS_INT a, EMACS_INT b)
 
 typedef struct Lisp_Hash_Table log_t;
 
+static Lisp_Object Qautomatic_gc;
 static Lisp_Object Qprofiler_backtrace_equal;
 static struct hash_table_test hashtest_profiler;
 
@@ -384,7 +385,7 @@ Return non-nil if the profiler was running.  */)
 DEFUN ("profiler-cpu-running-p",
        Fprofiler_cpu_running_p, Sprofiler_cpu_running_p,
        0, 0, 0,
-       doc: /* Return non-nil iff cpu profiler is running.  */)
+       doc: /* Return non-nil if cpu profiler is running.  */)
   (void)
 {
   return profiler_cpu_running ? Qt : Qnil;
@@ -558,6 +559,8 @@ hashfn_profiler (struct hash_table_test *ht, Lisp_Object bt)
 void
 syms_of_profiler (void)
 {
+#include "profiler.x"
+
   DEFVAR_INT ("profiler-max-stack-depth", profiler_max_stack_depth,
              doc: /* Number of elements from the call-stack recorded in the log.  */);
   profiler_max_stack_depth = 16;
@@ -567,6 +570,7 @@ If the log gets full, some of the least-seen call-stacks will be evicted
 to make room for new entries.  */);
   profiler_log_size = 10000;
 
+  DEFSYM (Qautomatic_gc, "Automatic GC");
   DEFSYM (Qprofiler_backtrace_equal, "profiler-backtrace-equal");
 
   hashtest_profiler.name = Qprofiler_backtrace_equal;
@@ -575,22 +579,12 @@ to make room for new entries.  */);
   hashtest_profiler.cmpfn = cmpfn_profiler;
   hashtest_profiler.hashfn = hashfn_profiler;
 
-  defsubr (&Sfunction_equal);
-
 #ifdef PROFILER_CPU_SUPPORT
   profiler_cpu_running = NOT_RUNNING;
   cpu_log = Qnil;
   staticpro (&cpu_log);
-  defsubr (&Sprofiler_cpu_start);
-  defsubr (&Sprofiler_cpu_stop);
-  defsubr (&Sprofiler_cpu_running_p);
-  defsubr (&Sprofiler_cpu_log);
 #endif
   profiler_memory_running = false;
   memory_log = Qnil;
   staticpro (&memory_log);
-  defsubr (&Sprofiler_memory_start);
-  defsubr (&Sprofiler_memory_stop);
-  defsubr (&Sprofiler_memory_running_p);
-  defsubr (&Sprofiler_memory_log);
 }