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: Óscar Fuentes
Subject: Re: Any way of dumping strings?
Date: Wed, 02 Jun 2021 20:33:22 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

Eli Zaretskii <eliz@gnu.org> writes:

>> 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.

That looks quite useful for this purpose, thanks.

Now that I think of it, my impression on the past session was that
performance degraded quite a bit, which could indicate that a very large
number of objects was live (which implies that the leaked objects are
relatively small, right?).

>> 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?

I wouldn't. I'll just do some crude frequency analysis expecting that
GCed data is noise among the much larger signal of live data.




reply via email to

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