[Top][All Lists]

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

bug#22114: 24.5; [PATCH] Allow profiler.el to display reports after stop

From: Stefan Monnier
Subject: bug#22114: 24.5; [PATCH] Allow profiler.el to display reports after stopping
Date: Mon, 14 Dec 2015 09:43:44 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

>> Your testing was too superficial.  IIRC The problem to which the comments
>> refer can only show up if you modify the hash-table.
>> The problem is corner-case, but real.  And there's no reason not to plug
>> that hole.
> I see, I can trigger this by removing a key from the log.  I haven't
> thought about that possibility yet, because, why would you do that?
> Nevertheless, if I'd want to fix this, I'd just need to use
> `copy-hash-table` on the log and return its result?

Yes, copying the hash table would solve this, tho if you still share the
keys there's a risk of interference (e.g. if you go and modify one of
the arrays used as keys), but there shouldn't be any risk of a crash,
at least.

> Before stopping the profiler or accessing the log while it's still
> running, the log is saved to a variable, the other code just accesses
> that variable instead of retrieving the log directly.
> In case you haven't seen it yet, I'll attach it to this message.

That looks OK to me.

> I'm not really happy with it though as it does need more code than the
> other variant and does only fix the UI aspect of viewing a report
> after the profiler has been stopped.

What are the other aspects that worry you?


reply via email to

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