From c2d0be1177c1e76c19250cfd8bdccc19e372c06e Mon Sep 17 00:00:00 2001 From: Helmut Eller Date: Fri, 3 Jan 2025 18:12:41 +0100 Subject: [PATCH] Call maybe_quit at a different point to the help the profiler. * src/bytecode.c (exec_byte_code): In the docall sequence, move the to maybe_quit forward immediately before lisp_eval_depth--. This helps the profiler to see the function that was interrupted by the SIGPROF signal. --- src/bytecode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bytecode.c b/src/bytecode.c index b57ead17a09..9b9a04bff01 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -784,7 +784,6 @@ exec_byte_code (Lisp_Object fun, ptrdiff_t args_template, } } #endif - maybe_quit (); if (++lisp_eval_depth > max_lisp_eval_depth) { @@ -829,6 +828,7 @@ exec_byte_code (Lisp_Object fun, ptrdiff_t args_template, else val = funcall_general (original_fun, call_nargs, call_args); + maybe_quit (); lisp_eval_depth--; if (backtrace_debug_on_exit (specpdl_ptr - 1)) val = call_debugger (list2 (Qexit, val));