Message82566
| Author |
hagen |
| Recipients |
hagen |
| Date |
2009年02月21日.13:45:48 |
| SpamBayes Score |
5.8760774e-12 |
| Marked as misclassified |
No |
| Message-id |
<1235223951.77.0.503159703189.issue5330@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|
History
|
|---|
| 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 |
|