You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tracing C function calls and keyword arguments #42142
bpo-5330: profile and cProfile do not report C functions called with keyword arguments
Files
trace_call.c: Test case for tracing c function calls with keyword arguments
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
assignee=Noneclosed_at=<Date2009-04-05.17:35:57.480>created_at=<Date2005-06-29.13:00:31.000>labels= ['interpreter-core', 'type-feature']
title='Tracing C function calls and keyword arguments'updated_at=<Date2009-04-05.17:35:57.478>user='https://bugs.python.org/fcieslok'
When a tracing/profiling function is registered via
'PyEval_SetTrace()' or 'PyEval_SetProfile()',
calling registered C functions should lead to calls of
the tracing function with reason
'PyTrace_C_CALL' and 'PyTrace_C_RETURN'.
This does not work if the function call uses keyword
arguments (test case attached) !
The reason seems to be that in
'Python/ceval.c:call_function ()' the macro 'C_TRACE'
is used to wrap the calling of build-in functions into
the corresponding calls of the tracing function. This
does not apply if keyword arguments are used, in that
case 'do_call ()' is called directly without being
wrapped into that macro.
Activity
fcieslok commentedon Jun 29, 2005
When a tracing/profiling function is registered via
'PyEval_SetTrace()' or 'PyEval_SetProfile()',
calling registered C functions should lead to calls of
the tracing function with reason
'PyTrace_C_CALL' and 'PyTrace_C_RETURN'.
This does not work if the function call uses keyword
arguments (test case attached) !
The reason seems to be that in
'Python/ceval.c:call_function ()' the macro 'C_TRACE'
is used to wrap the calling of build-in functions into
the corresponding calls of the tracing function. This
does not apply if keyword arguments are used, in that
case 'do_call ()' is called directly without being
wrapped into that macro.
mwhudson commentedon Jun 29, 2005
Logged In: YES
user_id=6656
I think this is the right assignment!
nbastin commentedon Jun 29, 2005
Logged In: YES
user_id=430343
Yep, I'll take a look into fixing this ASAP.
birkenfeld commentedon Apr 5, 2009
Setting bpo-5330 as a superseder, which also has a patch.