mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
PyStats: Make sure that the failure_kinds
array is big enough. (#133245)
This commit is contained in:
parent
fe3c7e10d9
commit
3831752689
2 changed files with 4 additions and 2 deletions
|
@ -31,7 +31,7 @@
|
|||
|
||||
#define PYSTATS_MAX_UOP_ID 512
|
||||
|
||||
#define SPECIALIZATION_FAILURE_KINDS 50
|
||||
#define SPECIALIZATION_FAILURE_KINDS 60
|
||||
|
||||
/* Stats for determining who is calling PyEval_EvalFrame */
|
||||
#define EVAL_CALL_TOTAL 0
|
||||
|
|
|
@ -440,7 +440,9 @@ _Py_PrintSpecializationStats(int to_file)
|
|||
#define SPECIALIZATION_FAIL(opcode, kind) \
|
||||
do { \
|
||||
if (_Py_stats) { \
|
||||
_Py_stats->opcode_stats[opcode].specialization.failure_kinds[kind]++; \
|
||||
int _kind = (kind); \
|
||||
assert(_kind < SPECIALIZATION_FAILURE_KINDS); \
|
||||
_Py_stats->opcode_stats[opcode].specialization.failure_kinds[_kind]++; \
|
||||
} \
|
||||
} while (0)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue