emacs-devel
[Top][All Lists]
Advanced

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

Re: Any way of dumping strings?


From: Eli Zaretskii
Subject: Re: Any way of dumping strings?
Date: Wed, 02 Jun 2021 21:16:24 +0300

> From: Óscar Fuentes <ofv@wanadoo.es>
> Date: Wed, 02 Jun 2021 19:54:20 +0200
> 
> > Set a GDB breakpoint in mark_vectorlike, with commands that dump each
> > vector, then trigger GC?
> 
> I was hoping for something that could show at least thousands of
> instances. Going one by one would be extremely time-consuming and
> potentially deceptive.

That's not what I had in mind.  You can set up breakpoint commands
that dump the contents of the vector being marked, then continue
without stopping.  Then say "set logging on", so that the output goes
to a file, and let Emacs run.  Once GC finishes, you will have a file
with all the vectors in it; then you can examine them at your leisure.

> Does Emacs zero-initialize memory when it is garbage-collected?

You mean, those objects it recycles? it doesn't zero them, but why
would you be interested in the objects that get GCed -- those are not
your problem.  Your problem is those which aren't GCed, and
mark_vector marks each one of them.

> Even if it doesn't, maybe it is enough to dump the whole image to a
> file. Some part would be gc-ed data, but a comparatively small part
> among all the rest of hundreds of MB.

How would you tell the one from the other?



reply via email to

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