diff options
author | Mark Shannon <mark@hotpy.org> | 2021-08-10 13:53:05 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-10 13:53:05 (GMT) |
commit | 9816777861a3f19ea9faa5b98c9b7024f13c6b73 (patch) | |
tree | de8ab8ed96d053fb5dcc1ac70fee634941892c74 /Include/internal | |
parent | c7ea1e3dcea6fbc9842463ce2b785b43501b1eaa (diff) | |
download | cpython-9816777861a3f19ea9faa5b98c9b7024f13c6b73.zip cpython-9816777861a3f19ea9faa5b98c9b7024f13c6b73.tar.gz cpython-9816777861a3f19ea9faa5b98c9b7024f13c6b73.tar.bz2 |
Classify specialization failures. Provides more useful stats, with lower overhead. (GH-27701)
Diffstat (limited to 'Include/internal')
-rw-r--r-- | Include/internal/pycore_code.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Include/internal/pycore_code.h b/Include/internal/pycore_code.h index 3d8f9c2..7ae7aee 100644 --- a/Include/internal/pycore_code.h +++ b/Include/internal/pycore_code.h @@ -305,6 +305,8 @@ int _Py_Specialize_BinarySubscr(PyObject *sub, PyObject *container, _Py_CODEUNIT #define SPECIALIZATION_STATS_DETAILED 0 #define SPECIALIZATION_STATS_TO_FILE 0 +#define SPECIALIZATION_FAILURE_KINDS 20 + #if SPECIALIZATION_STATS typedef struct _stats { @@ -316,7 +318,7 @@ typedef struct _stats { uint64_t deopt; uint64_t unquickened; #if SPECIALIZATION_STATS_DETAILED - PyObject *miss_types; + uint64_t specialization_failure_kinds[SPECIALIZATION_FAILURE_KINDS]; #endif } SpecializationStats; |