Closed GoogleCodeExporter closed 9 years ago
Hi. This problem seems to occur when a thread exists, but has not actually done
anything while yappi is running. I've dropped a kind of hacky fix for this
issue into our checkout of the code -- patch file attached.
The hack: in _ctxenumstat, if ctx->last_pit doesn't exist, you currently fill
in NULL values for last_func_name and last_mod_name. This makes
PyObject_CallFunction unhappy, which makes _ctxenumstat return with an error,
which tells the enumerator to bail. I just dropped in PyStr_FromString("None")
in place of the NULL, which made everything work. We get output, albeit with
odd "None.None" lines for the quiet threads.
That's not a very pretty fix, and someone more familiar with the code can
probably suggest a better one. lmk if you'd like any more info from me.
Original comment by pet...@gmail.com
on 20 Aug 2013 at 7:33
Attachments:
Hi. This is a valid fix. Not a hacky one, the situation can happen from time to
time and we need to handle the timeframe that you have mentioned. So thanks.
Will include asap.
Original comment by sum...@gmail.com
on 27 Aug 2013 at 8:24
changed the fix a bit and pushed the changes.
Original comment by sum...@gmail.com
on 27 Aug 2013 at 10:41
Original comment by sum...@gmail.com
on 15 Sep 2013 at 8:51
Original issue reported on code.google.com by
sc...@cloudpic.com
on 7 Aug 2013 at 4:17Attachments: