chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] [PATCH] Fix #1414 by not mallocing in a signal han


From: Evan Hanson
Subject: Re: [Chicken-hackers] [PATCH] Fix #1414 by not mallocing in a signal handler
Date: Sun, 17 Sep 2017 17:43:07 +1200

Hi Peter,

I've applied this to both branches. Thanks for the explanation, it was
helpful in trying to figure out what will happen when the trace buffer
is filled more quickly than signals arrive. I also had to convince
myself that the behaviour is correct when signals outpace new trace
entries, and it seems to me that in this case the active trace entry
will remain the same across multiple invocations of
take_profile_sample() and no allocation is actually necessary due to the
early exit.

Attached is a tiny, unrelated change for something I noticed while
reviewing: I think we don't need to check for NULL trace buffer keys in
take_profile_sample() since the top pointer of that buffer is only ever
bumped *after* the whole entry has been populated, so that procedure
will never see a NULL value in the "raw" field.

Cheers,

Evan

Attachment: 0001-Drop-unnecessary-check-for-NULL-trace-buffer-keys.patch
Description: Text Data


reply via email to

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