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;
4949static Py_ssize_t extra_code_index = -1 ;
5050static code_arena_t * code_arena ;
5151static trampoline_api_t trampoline_api ;
52- static FILE * perf_map_file ;
5352
53+ static FILE * perf_map_file ;
5454void *
5555_Py_perf_map_get_file (void )
5656{
9797_Py_perf_map_write_entry (void * state , const void * code_addr ,
9898 unsigned int code_size , PyCodeObject * co )
9999{
100- assert (file != NULL );
100+ assert (state != NULL );
101101 FILE * method_file = (FILE * )state ;
102102 const char * entry = PyUnicode_AsUTF8 (co -> co_qualname );
103103 if (entry == NULL ) {
@@ -250,6 +250,7 @@ int _PyPerfTrampoline_SetCallbacks(
250250 trampoline_state_write write_state ,
251251 trampoline_state_free free_state
252252) {
253+ #ifdef HAVE_PERF_TRAMPOLINE
253254 if (trampoline_api .state ) {
254255 Py_FatalError ("Trampoline state already initialized" );
255256 return -1 ;
@@ -263,6 +264,7 @@ int _PyPerfTrampoline_SetCallbacks(
263264 }
264265 trampoline_api .state = state ;
265266 perf_status = PERF_STATUS_OK ;
267+ #endif
266268 return 0 ;
267269}
268270
You can’t perform that action at this time.
0 commit comments