summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2021-06-15 12:01:42 (GMT)
committerGitHub <noreply@github.com>2021-06-15 12:01:42 (GMT)
commit8ebd9447e9618240ee3b955888d114376f64117b (patch)
tree376e4e1a18260b80644c00d074b2ab79677e15a0 /Include
parent689a84475e7b1da79d5ae82df67ab8897316f98c (diff)
downloadcpython-8ebd9447e9618240ee3b955888d114376f64117b.zip
cpython-8ebd9447e9618240ee3b955888d114376f64117b.tar.gz
cpython-8ebd9447e9618240ee3b955888d114376f64117b.tar.bz2
Add extra stats for attribute misses (GH-26732)
Diffstat (limited to 'Include')
-rw-r--r--Include/internal/pycore_code.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/Include/internal/pycore_code.h b/Include/internal/pycore_code.h
index 098fbe4..a471c20 100644
--- a/Include/internal/pycore_code.h
+++ b/Include/internal/pycore_code.h
@@ -325,6 +325,8 @@ int _Py_Specialize_LoadAttr(PyObject *owner, _Py_CODEUNIT *instr, PyObject *name
int _Py_Specialize_LoadGlobal(PyObject *globals, PyObject *builtins, _Py_CODEUNIT *instr, PyObject *name, SpecializedCacheEntry *cache);
#define SPECIALIZATION_STATS 0
+#define SPECIALIZATION_STATS_DETAILED 0
+
#if SPECIALIZATION_STATS
typedef struct _stats {
@@ -334,6 +336,9 @@ typedef struct _stats {
uint64_t deferred;
uint64_t miss;
uint64_t deopt;
+#if SPECIALIZATION_STATS_DETAILED
+ PyObject *miss_types;
+#endif
} SpecializationStats;
extern SpecializationStats _specialization_stats[256];