On Sun, Sep 17, 2017 at 05:43:07PM +1200, Evan Hanson wrote: > 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.
Yeah, this is a bit subtle, and maybe overly clever. But it helps a lot to keep this code relatively short and simple. > 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. Well spotted, I've applied it. Cheers, Peter
signature.asc
Description: PGP signature
_______________________________________________ Chicken-hackers mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/chicken-hackers
