Commit 704d3f45 authored by Tomohiro Matsuyama's avatar Tomohiro Matsuyama

* profiler.c (sigprof_handler): Fix race condition.

parent 96fb7170
2012-09-28 Tomohiro Matsuyama <tomo@cx4a.org>
* profiler.c (sigprof_handler): Fix race condition.
2012-09-28 Glenn Morris <rgm@gnu.org>
* lread.c (lisp_file_lexically_bound_p): Handle #! lines. (Bug#12528)
......
......@@ -24,6 +24,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */
#include <signal.h>
#include <setjmp.h>
#include "lisp.h"
#include "syssignal.h"
/* Logs. */
......@@ -214,7 +215,7 @@ static int current_sample_interval;
/* Signal handler for sample profiler. */
static void
sigprof_handler (int signal)
sigprof_handler_1 (int signal)
{
eassert (HASH_TABLE_P (cpu_log));
if (backtrace_list && EQ (*backtrace_list->function, Qautomatic_gc))
......@@ -229,6 +230,12 @@ sigprof_handler (int signal)
record_backtrace (XHASH_TABLE (cpu_log), current_sample_interval);
}
static void
sigprof_handler (int signal)
{
deliver_process_signal (signal, sigprof_handler_1);
}
DEFUN ("profiler-cpu-start", Fprofiler_cpu_start, Sprofiler_cpu_start,
1, 1, 0,
doc: /* Start or restart the cpu profiler.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment