File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -49,8 +49,8 @@ static perf_status_t perf_status = PERF_STATUS_NO_INIT;
49
49
static Py_ssize_t extra_code_index = -1 ;
50
50
static code_arena_t * code_arena ;
51
51
static trampoline_api_t trampoline_api ;
52
- static FILE * perf_map_file ;
53
52
53
+ static FILE * perf_map_file ;
54
54
void *
55
55
_Py_perf_map_get_file (void )
56
56
{
97
97
_Py_perf_map_write_entry (void * state , const void * code_addr ,
98
98
unsigned int code_size , PyCodeObject * co )
99
99
{
100
- assert (file != NULL );
100
+ assert (state != NULL );
101
101
FILE * method_file = (FILE * )state ;
102
102
const char * entry = PyUnicode_AsUTF8 (co -> co_qualname );
103
103
if (entry == NULL ) {
@@ -250,6 +250,7 @@ int _PyPerfTrampoline_SetCallbacks(
250
250
trampoline_state_write write_state ,
251
251
trampoline_state_free free_state
252
252
) {
253
+ #ifdef HAVE_PERF_TRAMPOLINE
253
254
if (trampoline_api .state ) {
254
255
Py_FatalError ("Trampoline state already initialized" );
255
256
return -1 ;
@@ -263,6 +264,7 @@ int _PyPerfTrampoline_SetCallbacks(
263
264
}
264
265
trampoline_api .state = state ;
265
266
perf_status = PERF_STATUS_OK ;
267
+ #endif
266
268
return 0 ;
267
269
}
268
270
You can’t perform that action at this time.
0 commit comments