Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-109329: Support for basic pystats for Tier 2 #109913

Merged
merged 17 commits into from
Oct 4, 2023
Merged
Prev Previous commit
Next Next commit
Remove unnecessary stuff
  • Loading branch information
mdboom committed Sep 26, 2023
commit b84f496e3b2b8616eb696f51cfc78e54412ea5d5
1 change: 0 additions & 1 deletion Include/cpython/pystats.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,6 @@ typedef struct _gc_stats {

typedef struct _uop_stats {
uint64_t execution_count;
uint64_t miss;
} UOpStats;

typedef struct _optimization_stats {
Expand Down
2 changes: 0 additions & 2 deletions Include/internal/pycore_code.h
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,6 @@ extern int _PyStaticCode_Init(PyCodeObject *co);
#define GC_STAT_ADD(gen, name, n) do { if (_Py_stats) _Py_stats->gc_stats[(gen)].name += (n); } while (0)
#define OPTIMIZATION_STAT_INC(name) do { if (_Py_stats) _Py_stats->optimization_stats.name++; } while (0)
#define UOP_EXE_INC(opname) do { if (_Py_stats) _Py_stats->optimization_stats.opcode[opname].execution_count++; } while (0)
#define UOP_STAT_INC(opname, name) do { if (_Py_stats) _Py_stats->optimization_stats.opcode[opname].name++; } while (0)

// Export for '_opcode' shared extension
PyAPI_FUNC(PyObject*) _Py_GetSpecializationStats(void);
Expand All @@ -301,7 +300,6 @@ PyAPI_FUNC(PyObject*) _Py_GetSpecializationStats(void);
#define GC_STAT_ADD(gen, name, n) ((void)0)
#define OPTIMIZATION_STAT_INC(name) ((void)0)
#define UOP_EXE_INC(opname) ((void)0)
#define UOP_STAT_INC(opname, name) ((void)0)
#endif // !Py_STATS

// Utility functions for reading/writing 32/64-bit values in the inline caches.
Expand Down