Skip to content

Commit 3dbdd01

Browse files
committed
nit
1 parent fc84a62 commit 3dbdd01

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

Include/internal/pycore_backoff.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ extern "C" {
1212
#include <assert.h>
1313
#include <stdbool.h>
1414
#include "pycore_structs.h" // _Py_BackoffCounter
15-
#include "pycore_tstate.h" // _PyOptimizationConfig
15+
#include "pycore_interp_structs.h" // _PyOptimizationConfig
1616

1717
/* 16-bit countdown counters using exponential backoff.
1818

Include/internal/pycore_interp_structs.h

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -398,6 +398,21 @@ typedef struct _rare_events {
398398
uint8_t func_modification;
399399
} _rare_events;
400400

401+
// Optimization configuration for the interpreter.
402+
// This groups all thresholds and optimization flags for both JIT and interpreter.
403+
typedef struct _PyOptimizationConfig {
404+
// Interpreter optimization thresholds
405+
uint16_t jump_backward_initial_value;
406+
uint16_t jump_backward_initial_backoff;
407+
408+
// JIT optimization thresholds
409+
uint16_t side_exit_initial_value;
410+
uint16_t side_exit_initial_backoff;
411+
412+
// Optimization flags
413+
bool specialization_enabled;
414+
} _PyOptimizationConfig;
415+
401416
struct
402417
Bigint {
403418
struct Bigint *next;

Include/internal/pycore_tstate.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -62,21 +62,6 @@ typedef struct _PyJitTracerState {
6262

6363
#endif
6464

65-
// Optimization configuration for the interpreter.
66-
// This groups all thresholds and optimization flags for both JIT and interpreter.
67-
typedef struct _PyOptimizationConfig {
68-
// Interpreter optimization thresholds
69-
uint16_t jump_backward_initial_value;
70-
uint16_t jump_backward_initial_backoff;
71-
72-
// JIT optimization thresholds
73-
uint16_t side_exit_initial_value;
74-
uint16_t side_exit_initial_backoff;
75-
76-
// Optimization flags
77-
bool specialization_enabled;
78-
} _PyOptimizationConfig;
79-
8065
// Every PyThreadState is actually allocated as a _PyThreadStateImpl. The
8166
// PyThreadState fields are exposed as part of the C API, although most fields
8267
// are intended to be private. The _PyThreadStateImpl fields not exposed.

0 commit comments

Comments
 (0)