Skip to content

Commit

Permalink
Address review
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn committed Nov 4, 2024
1 parent bf3e120 commit 0d35f60
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 12 deletions.
15 changes: 8 additions & 7 deletions Modules/_lsprof.c
Original file line number Diff line number Diff line change
Expand Up @@ -755,20 +755,20 @@ static const struct {
_lsprof.Profiler.enable
subcalls: bool = True
If True, also records for each function
statistics separated according to its current caller.
builtins: bool = True
If True, records the time spent in
built-in functions separately from their caller.
Start collecting profiling information.
If 'subcalls' is True, also records for each function
statistics separated according to its current caller.
If 'builtins' is True, records the time spent in
built-in functions separately from their caller.
[clinic start generated code]*/

static PyObject *
_lsprof_Profiler_enable_impl(ProfilerObject *self, int subcalls,
int builtins)
/*[clinic end generated code: output=1e747f9dc1edd571 input=0b6049b4e398781f]*/
/*[clinic end generated code: output=1e747f9dc1edd571 input=9ab81405107ab7f1]*/
{
int all_events = 0;
if (setSubcalls(self, subcalls) < 0 || setBuiltins(self, builtins) < 0) {
Expand Down Expand Up @@ -953,8 +953,9 @@ profiler_init_impl(ProfilerObject *self, PyObject *timer, double timeunit,
int subcalls, int builtins)
/*[clinic end generated code: output=ac523803ec9f9df2 input=8285ca746f96a414]*/
{
if (setSubcalls(self, subcalls) < 0 || setBuiltins(self, builtins) < 0)
if (setSubcalls(self, subcalls) < 0 || setBuiltins(self, builtins) < 0) {
return -1;
}
self->externalTimerUnit = timeunit;
Py_XSETREF(self->externalTimer, Py_XNewRef(timer));
self->tool_id = PY_MONITORING_PROFILER_ID;
Expand Down
12 changes: 7 additions & 5 deletions Modules/clinic/_lsprof.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0d35f60

Please sign in to comment.