Message335677
From Cython's point of view, the important fields in PyThreadState are the tracing/profiling and exception related ones. We're not using anything else. Users can explicitly opt out of the access to the exception fields by defining a C macro, at the expense of a bit of performance. I doubt that anyone is really doing that, though, because, why would they?
I'm not sure if we could avoid direct field access for profiling and tracing at all. You can look at the code, it's a whole bunch of macros that mimic what CPython does in ceval:
https://github.com/cython/cython/blob/master/Cython/Utility/Profile.c
I should note that both features are not enabled by default. Users have to explicitly enable profiling support via a directive, and even doubly opt in to tracing by enabling a compiler directive and a C macro. So production code will often not rely on these fields, but developers would want to use them and some might keep profiling support enabled also in their production code. My guess is that tracing is most often used for test coverage analysis. |
|
Date |
User |
Action |
Args |
2019-02-16 09:48:09 | scoder | set | recipients:
+ scoder, ncoghlan, vstinner, eric.snow |
2019-02-16 09:48:09 | scoder | set | messageid: <1550310489.5.0.93932202289.issue35949@roundup.psfhosted.org> |
2019-02-16 09:48:09 | scoder | link | issue35949 messages |
2019-02-16 09:48:09 | scoder | create | |
|