This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Tracing C function calls and keyword arguments
Type: enhancement Stage: test needed
Components: Interpreter Core Versions: Python 2.7
process
Status: closed Resolution: duplicate
Dependencies: Superseder: profile and cProfile do not report C functions called with keyword arguments
View: 5330
Assigned To: nbastin Nosy List: fcieslok, georg.brandl, mwh, nbastin
Priority: low Keywords:

Created on 2005-06-29 13:00 by fcieslok, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
trace_call.c fcieslok, 2005-06-29 13:00 Test case for tracing c function calls with keyword arguments
Messages (4)
msg25679 - (view) Author: Frank Cieslok (fcieslok) Date: 2005-06-29 13:00
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.
msg25680 - (view) Author: Michael Hudson (mwh) (Python committer) Date: 2005-06-29 13:52
Logged In: YES 
user_id=6656

I think this is the right assignment!
msg25681 - (view) Author: Nick Bastin (nbastin) * (Python committer) Date: 2005-06-29 20:12
Logged In: YES 
user_id=430343

Yep, I'll take a look into fixing this ASAP.
msg85536 - (view) Author: Georg Brandl (georg.brandl) * (Python committer) Date: 2009-04-05 17:35
Setting #5330 as a superseder, which also has a patch.
History
Date User Action Args
2022-04-11 14:56:12adminsetgithub: 42142
2009-04-05 17:35:57georg.brandlsetstatus: open -> closed

nosy: + georg.brandl
messages: + msg85536

superseder: profile and cProfile do not report C functions called with keyword arguments
resolution: duplicate
2009-02-16 02:25:46ajaksu2setpriority: normal -> low
stage: test needed
type: enhancement
versions: + Python 2.7, - Python 2.4
2005-06-29 13:00:31fcieslokcreate