[issue5330] profile and cProfile do not report C functions called with keyword arguments

2009-05-30 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Updated patch, with test.

--
nosy: +pitrou
Added file: http://bugs.python.org/file14122/issue5330.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5330
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5330] profile and cProfile do not report C functions called with keyword arguments

2009-05-30 Thread Antoine Pitrou

Antoine Pitrou pit...@free.fr added the comment:

Committed in r73064, r73065, r73066, r73067. Thanks!

--
resolution:  - fixed
status: open - closed

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5330
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5330] profile and cProfile do not report C functions called with keyword arguments

2009-04-15 Thread Antoine Pitrou

Changes by Antoine Pitrou pit...@free.fr:


--
stage:  - patch review
versions: +Python 2.7, Python 3.1

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5330
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5330] profile and cProfile do not report C functions called with keyword arguments

2009-04-05 Thread Georg Brandl

Changes by Georg Brandl ge...@python.org:


--
priority:  - critical

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5330
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5330] profile and cProfile do not report C functions called with keyword arguments

2009-04-05 Thread Georg Brandl

Changes by Georg Brandl ge...@python.org:


--
assignee:  - nbastin
nosy: +nbastin

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5330
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5330] profile and cProfile do not report C functions called with keyword arguments

2009-02-21 Thread Hagen Fürstenau

Hagen Fürstenau hfuerste...@gmx.net added the comment:

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.

--
keywords: +patch
Added file: http://bugs.python.org/file13146/ceval.patch

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5330
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5330] profile and cProfile do not report C functions called with keyword arguments

2009-02-20 Thread Hagen Fürstenau

New submission from Hagen Fürstenau hfuerste...@gmx.net:

A C function or method call without keyword arguments gets reported by
the profiler as expected (in the line with {method 'sort' of 'list'
object}):

 cProfile.run([].sort())
 4 function calls in 0.000 CPU seconds

   Ordered by: standard name

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
10.0000.0000.0000.000 string:1(module)
10.0000.0000.0000.000 {built-in method exec}
10.0000.0000.0000.000 {method 'disable' of
'_lsprof.Profiler' objects}
10.0000.0000.0000.000 {method 'sort' of 'list'
objects}


However, once a keyword argument is given, the relevant line is missing:

 cProfile.run([].sort(reverse=True))
 3 function calls in 0.000 CPU seconds

   Ordered by: standard name

   ncalls  tottime  percall  cumtime  percall filename:lineno(function)
10.0000.0000.0000.000 string:1(module)
10.0000.0000.0000.000 {built-in method exec}
10.0000.0000.0000.000 {method 'disable' of
'_lsprof.Profiler' objects}


This happens with profile and cProfile in 2.6 and 3.0.

--
components: Library (Lib)
messages: 82530
nosy: hagen
severity: normal
status: open
title: profile and cProfile do not report C functions called with keyword 
arguments
type: behavior
versions: Python 2.6, Python 3.0

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue5330
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com