gh-111652: Fix --enable-pystats build (GH-111653)

This commit is contained in:
Michael Droettboom 2023-11-03 11:21:16 -04:00 committed by GitHub
parent 5add7a6724
commit 2bc01cc0c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -271,6 +271,8 @@ extern int _PyStaticCode_Init(PyCodeObject *co);
#ifdef Py_STATS
#include "pycore_bitutils.h" // _Py_bit_length
#define STAT_INC(opname, name) do { if (_Py_stats) _Py_stats->opcode_stats[opname].specialization.name++; } while (0)
#define STAT_DEC(opname, name) do { if (_Py_stats) _Py_stats->opcode_stats[opname].specialization.name--; } while (0)
#define OPCODE_EXE_INC(opname) do { if (_Py_stats) _Py_stats->opcode_stats[opname].execution_count++; } while (0)