emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: MPS: profiler


From: Helmut Eller
Subject: Re: MPS: profiler
Date: Fri, 21 Jun 2024 09:19:49 +0200
User-agent: Gnus/5.13 (Gnus v5.13)

On Fri, Jun 21 2024, Gerd Möllmann wrote:

> Eli Zaretskii <eliz@gnu.org> writes:
>
>> Also, can 'static struct profiler_log cpu', which is being worked on
>> by record_backtrace, be affected by MPS in any way?
>
> I'd guess that just "touching" Lisp objects in the SIGPROF handler can
> be problematic because these objects themselves can be behind a barrier,
> either the same that MPS is currently working on when it got interrupted
> or another one.

Perhaps dflt_scan should block SIGPROF while it is running.  Or perhaps
dflt_scan should set some global flag while it running so that the
profiler knows that it's too dangerous to touch anything.  Any better
ideas?

I can use this command to reproduce the problem:

run -Q -batch -eval '(progn
  (defvar *baz* nil)
  (defun bar (len)
    (let ((data (make-list len nil)))
      (setq *baz* (lambda () (bar len) data))))
  (defun foo ()
    (bar 1000)
    (dotimes (_ 10000)
      (funcall *baz*)))
  (profiler-start (quote cpu))
  (foo))'



reply via email to

[Prev in Thread] Current Thread [Next in Thread]