From ec3227c060f12ca137b5a5bd1e607b922a6dafec Mon Sep 17 00:00:00 2001 From: Helmut Eller Date: Fri, 3 Jan 2025 18:12:41 +0100 Subject: [PATCH 2/2] 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 31f7404cbd1..53c200e2c18 100644 --- a/src/bytecode.c +++ b/src/bytecode.c @@ -784,7 +784,6 @@ #define DEFINE(name, value) [name] = &&insn_ ## name, } } #endif - maybe_quit (); if (++lisp_eval_depth > max_lisp_eval_depth) { @@ -829,6 +828,7 @@ #define DEFINE(name, value) [name] = &&insn_ ## name, 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)); -- 2.39.5