@@ -471,16 +471,6 @@ _PyPerfTrampoline_SetCallbacks(_PyPerf_Callbacks *callbacks)
471
471
return 0 ;
472
472
}
473
473
474
- #ifdef PY_HAVE_PERF_TRAMPOLINE
475
- static void
476
- set_eval_frame (PyThreadState * tstate , _PyFrameEvalFunction eval_frame )
477
- {
478
- _PyEval_StopTheWorld (tstate -> interp );
479
- tstate -> interp -> eval_frame = eval_frame ;
480
- _PyEval_StartTheWorld (tstate -> interp );
481
- }
482
- #endif
483
-
484
474
int
485
475
_PyPerfTrampoline_Init (int activate )
486
476
{
@@ -494,11 +484,11 @@ _PyPerfTrampoline_Init(int activate)
494
484
return -1 ;
495
485
}
496
486
if (!activate ) {
497
- set_eval_frame (tstate , NULL );
487
+ _PyInterpreterState_SetEvalFrameFunc (tstate -> interp , NULL );
498
488
perf_status = PERF_STATUS_NO_INIT ;
499
489
}
500
490
else {
501
- set_eval_frame (tstate , py_trampoline_evaluator );
491
+ _PyInterpreterState_SetEvalFrameFunc (tstate -> interp , py_trampoline_evaluator );
502
492
if (new_code_arena () < 0 ) {
503
493
return -1 ;
504
494
}
@@ -524,7 +514,7 @@ _PyPerfTrampoline_Fini(void)
524
514
}
525
515
PyThreadState * tstate = _PyThreadState_GET ();
526
516
if (tstate -> interp -> eval_frame == py_trampoline_evaluator ) {
527
- set_eval_frame (tstate , NULL );
517
+ _PyInterpreterState_SetEvalFrameFunc (tstate -> interp , NULL );
528
518
}
529
519
if (perf_status == PERF_STATUS_OK ) {
530
520
trampoline_api .free_state (trampoline_api .state );
0 commit comments