summaryrefslogtreecommitdiffstats
path: root/Include/pystats.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/pystats.h')
-rw-r--r--Include/pystats.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/Include/pystats.h b/Include/pystats.h
index 4375614b..bea471b 100644
--- a/Include/pystats.h
+++ b/Include/pystats.h
@@ -10,6 +10,20 @@ extern "C" {
#define SPECIALIZATION_FAILURE_KINDS 32
+/* Stats for determining who is calling PyEval_EvalFrame */
+#define EVAL_CALL_TOTAL 0
+#define EVAL_CALL_VECTOR 1
+#define EVAL_CALL_GENERATOR 2
+#define EVAL_CALL_LEGACY 3
+#define EVAL_CALL_FUNCTION_VECTORCALL 4
+#define EVAL_CALL_BUILD_CLASS 5
+#define EVAL_CALL_SLOT 6
+#define EVAL_CALL_FUNCTION_EX 7
+#define EVAL_CALL_API 8
+#define EVAL_CALL_METHOD 9
+
+#define EVAL_CALL_KINDS 10
+
typedef struct _specialization_stats {
uint64_t success;
uint64_t failure;
@@ -31,6 +45,7 @@ typedef struct _call_stats {
uint64_t pyeval_calls;
uint64_t frames_pushed;
uint64_t frame_objects_created;
+ uint64_t eval_calls[EVAL_CALL_KINDS];
} CallStats;
typedef struct _object_stats {