Message82566
I found the reason for this problem: C function calls with keyword
arguments follow a different path than those without keywords in the
function "call_function" of ceval.c. They end up being handled by
"do_call", but there the call is not wrapped by C_TRACE, so a profiler
function registered through sys.setprofile() doesn't see such calls.
The same problem occurs in "ext_do_call", which gets called in the
handling of the opcodes CALL_FUNCTION_VAR and CALL_FUNCTION_KW, causing
omission of a function call like
>>> [].sort(**{'reverse':True})
from the profiler report.
The attached patch solves the problem, but I don't know if it's the best
solution. Handling calls with keyword arguments at the beginning of
"call_function" seems to have bigger performance drawbacks though. |
|
Date |
User |
Action |
Args |
2009-02-21 13:45:51 | hagen | set | recipients:
+ hagen |
2009-02-21 13:45:51 | hagen | set | messageid: <1235223951.77.0.503159703189.issue5330@psf.upfronthosting.co.za> |
2009-02-21 13:45:50 | hagen | link | issue5330 messages |
2009-02-21 13:45:49 | hagen | create | |
|