]> code.delx.au - gnu-emacs/blobdiff - src/profiler.c
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
[gnu-emacs] / src / profiler.c
index efdb1d9fe14f74d0bfe8202cf1876af028581fef..07e21aeab1057a277374179489a0ec9d8f174917 100644 (file)
@@ -1,13 +1,13 @@
 /* Profiler implementation.
 
-Copyright (C) 2012-2015 Free Software Foundation, Inc.
+Copyright (C) 2012-2016 Free Software Foundation, Inc.
 
 This file is part of GNU Emacs.
 
 GNU Emacs is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
-the Free Software Foundation, either version 3 of the License, or
-(at your option) any later version.
+the Free Software Foundation, either version 3 of the License, or (at
+your option) any later version.
 
 GNU Emacs is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -201,7 +201,12 @@ static bool profiler_timer_ok;
 
 /* Status of sampling profiler.  */
 static enum profiler_cpu_running
-  { NOT_RUNNING, TIMER_SETTIME_RUNNING, SETITIMER_RUNNING }
+  { NOT_RUNNING,
+#ifdef HAVE_ITIMERSPEC
+    TIMER_SETTIME_RUNNING,
+#endif
+    SETITIMER_RUNNING
+  }
   profiler_cpu_running;
 
 /* Hash-table log of CPU profiler.  */
@@ -224,7 +229,7 @@ static EMACS_INT current_sampling_interval;
 static void
 handle_profiler_signal (int signal)
 {
-  if (EQ (backtrace_top_function (), Qautomatic_gc))
+  if (EQ (backtrace_top_function (), QAutomatic_GC))
     /* Special case the time-count inside GC because the hash-table
        code is not prepared to be used while the GC is running.
        More specifically it uses ASIZE at many places where it does
@@ -418,7 +423,7 @@ Before returning, a new log is allocated for future samples.  */)
   cpu_log = (profiler_cpu_running
             ? make_log (profiler_log_size, profiler_max_stack_depth)
             : Qnil);
-  Fputhash (Fmake_vector (make_number (1), Qautomatic_gc),
+  Fputhash (Fmake_vector (make_number (1), QAutomatic_GC),
            make_number (cpu_gc_count),
            result);
   cpu_gc_count = 0;