@@ -534,6 +534,7 @@ static int statsForEntry(rotating_node_t *node, void *arg)
534
534
}
535
535
536
536
/*[clinic input]
537
+ @critical_section
537
538
_lsprof.Profiler.getstats
538
539
539
540
cls: defining_class
@@ -565,7 +566,7 @@ profiler_subentry objects:
565
566
566
567
static PyObject *
567
568
_lsprof_Profiler_getstats_impl (ProfilerObject * self , PyTypeObject * cls )
568
- /*[clinic end generated code: output=1806ef720019ee03 input=445e193ef4522902 ]*/
569
+ /*[clinic end generated code: output=1806ef720019ee03 input=3dc69eb85ed73d91 ]*/
569
570
{
570
571
statscollector_t collect ;
571
572
collect .state = _PyType_GetModuleState (cls );
@@ -613,6 +614,7 @@ setBuiltins(ProfilerObject *pObj, int nvalue)
613
614
}
614
615
615
616
/*[clinic input]
617
+ @critical_section
616
618
_lsprof.Profiler._pystart_callback
617
619
618
620
code: object
@@ -624,14 +626,15 @@ _lsprof.Profiler._pystart_callback
624
626
static PyObject *
625
627
_lsprof_Profiler__pystart_callback_impl (ProfilerObject * self , PyObject * code ,
626
628
PyObject * instruction_offset )
627
- /*[clinic end generated code: output=5fec8b7ad5ed25e8 input=b166e6953c579cda ]*/
629
+ /*[clinic end generated code: output=5fec8b7ad5ed25e8 input=b61a0e79cf1f8499 ]*/
628
630
{
629
631
ptrace_enter_call ((PyObject * )self , (void * )code , code );
630
632
631
633
Py_RETURN_NONE ;
632
634
}
633
635
634
636
/*[clinic input]
637
+ @critical_section
635
638
_lsprof.Profiler._pythrow_callback
636
639
637
640
code: object
@@ -645,14 +648,15 @@ static PyObject *
645
648
_lsprof_Profiler__pythrow_callback_impl (ProfilerObject * self , PyObject * code ,
646
649
PyObject * instruction_offset ,
647
650
PyObject * exception )
648
- /*[clinic end generated code: output=0a32988919dfb94c input=fd728fc2c074f5e6 ]*/
651
+ /*[clinic end generated code: output=0a32988919dfb94c input=60c7f272206d3758 ]*/
649
652
{
650
653
ptrace_enter_call ((PyObject * )self , (void * )code , code );
651
654
652
655
Py_RETURN_NONE ;
653
656
}
654
657
655
658
/*[clinic input]
659
+ @critical_section
656
660
_lsprof.Profiler._pyreturn_callback
657
661
658
662
code: object
@@ -667,7 +671,7 @@ _lsprof_Profiler__pyreturn_callback_impl(ProfilerObject *self,
667
671
PyObject * code ,
668
672
PyObject * instruction_offset ,
669
673
PyObject * retval )
670
- /*[clinic end generated code: output=9e2f6fc1b882c51e input=667ffaeb2fa6fd1f ]*/
674
+ /*[clinic end generated code: output=9e2f6fc1b882c51e input=0ddcc1ec53faa928 ]*/
671
675
{
672
676
ptrace_leave_call ((PyObject * )self , (void * )code );
673
677
@@ -703,6 +707,7 @@ PyObject* get_cfunc_from_callable(PyObject* callable, PyObject* self_arg, PyObje
703
707
}
704
708
705
709
/*[clinic input]
710
+ @critical_section
706
711
_lsprof.Profiler._ccall_callback
707
712
708
713
code: object
@@ -717,7 +722,7 @@ static PyObject *
717
722
_lsprof_Profiler__ccall_callback_impl (ProfilerObject * self , PyObject * code ,
718
723
PyObject * instruction_offset ,
719
724
PyObject * callable , PyObject * self_arg )
720
- /*[clinic end generated code: output=152db83cabd18cad input=0e66687cfb95c001 ]*/
725
+ /*[clinic end generated code: output=152db83cabd18cad input=2fc1e0630ee5e32b ]*/
721
726
{
722
727
if (self -> flags & POF_BUILTINS ) {
723
728
PyObject * cfunc = get_cfunc_from_callable (callable , self_arg , self -> missing );
@@ -733,6 +738,7 @@ _lsprof_Profiler__ccall_callback_impl(ProfilerObject *self, PyObject *code,
733
738
}
734
739
735
740
/*[clinic input]
741
+ @critical_section
736
742
_lsprof.Profiler._creturn_callback
737
743
738
744
code: object
@@ -748,7 +754,7 @@ _lsprof_Profiler__creturn_callback_impl(ProfilerObject *self, PyObject *code,
748
754
PyObject * instruction_offset ,
749
755
PyObject * callable ,
750
756
PyObject * self_arg )
751
- /*[clinic end generated code: output=1e886dde8fed8fb0 input=b18afe023746923a ]*/
757
+ /*[clinic end generated code: output=1e886dde8fed8fb0 input=bdc246d6b5b8714a ]*/
752
758
{
753
759
if (self -> flags & POF_BUILTINS ) {
754
760
PyObject * cfunc = get_cfunc_from_callable (callable , self_arg , self -> missing );
@@ -780,6 +786,7 @@ static const struct {
780
786
781
787
782
788
/*[clinic input]
789
+ @critical_section
783
790
_lsprof.Profiler.enable
784
791
785
792
subcalls: bool = True
@@ -796,7 +803,7 @@ Start collecting profiling information.
796
803
static PyObject *
797
804
_lsprof_Profiler_enable_impl (ProfilerObject * self , int subcalls ,
798
805
int builtins )
799
- /*[clinic end generated code: output=1e747f9dc1edd571 input=9ab81405107ab7f1 ]*/
806
+ /*[clinic end generated code: output=1e747f9dc1edd571 input=0b88115b1c796173 ]*/
800
807
{
801
808
int all_events = 0 ;
802
809
if (setSubcalls (self , subcalls ) < 0 || setBuiltins (self , builtins ) < 0 ) {
@@ -869,14 +876,15 @@ flush_unmatched(ProfilerObject *pObj)
869
876
870
877
871
878
/*[clinic input]
879
+ @critical_section
872
880
_lsprof.Profiler.disable
873
881
874
882
Stop collecting profiling information.
875
883
[clinic start generated code]*/
876
884
877
885
static PyObject *
878
886
_lsprof_Profiler_disable_impl (ProfilerObject * self )
879
- /*[clinic end generated code: output=838cffef7f651870 input=05700b3fc68d1f50 ]*/
887
+ /*[clinic end generated code: output=838cffef7f651870 input=f7e4787cae20f7f6 ]*/
880
888
{
881
889
if (self -> flags & POF_EXT_TIMER ) {
882
890
PyErr_SetString (PyExc_RuntimeError ,
@@ -928,14 +936,15 @@ _lsprof_Profiler_disable_impl(ProfilerObject *self)
928
936
}
929
937
930
938
/*[clinic input]
939
+ @critical_section
931
940
_lsprof.Profiler.clear
932
941
933
942
Clear all profiling information collected so far.
934
943
[clinic start generated code]*/
935
944
936
945
static PyObject *
937
946
_lsprof_Profiler_clear_impl (ProfilerObject * self )
938
- /*[clinic end generated code: output=dd1c668fb84b1335 input=fbe1f88c28be4f98 ]*/
947
+ /*[clinic end generated code: output=dd1c668fb84b1335 input=4aab219d5d7a9bec ]*/
939
948
{
940
949
if (self -> flags & POF_EXT_TIMER ) {
941
950
PyErr_SetString (PyExc_RuntimeError ,
0 commit comments