[issue29502] Should PyObject_Call() call the profiler on C functions, use C_TRACE() macro?

2021-09-21 Thread STINNER Victor


STINNER Victor  added the comment:

This issue has no activity for 3 years and was created 4 years ago. I close it.

--
resolution:  -> out of date
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29502] Should PyObject_Call() call the profiler on C functions, use C_TRACE() macro?

2018-08-02 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

I would prefer to wait with this issue until PEP 580 has been decided. If it's 
accepted, it will change function calling code a lot. As I wrote in PEP 580, I 
was planning to have a PEP on profiling anyway.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29502] Should PyObject_Call() call the profiler on C functions, use C_TRACE() macro?

2018-07-31 Thread INADA Naoki


INADA Naoki  added the comment:

FYI, _lsprof uses PyObject_Call()
https://github.com/python/cpython/blob/ea68d83933e6de6cabfb115ec1b301947369/Modules/_lsprof.c#L120-L123

If PyObject_Call() trigger profiler, lsprof should avoid recursion.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29502] Should PyObject_Call() call the profiler on C functions, use C_TRACE() macro?

2018-07-31 Thread ppperry


ppperry  added the comment:

issue30990 is related

--
nosy: +ppperry

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29502] Should PyObject_Call() call the profiler on C functions, use C_TRACE() macro?

2018-07-31 Thread Jeroen Demeyer


Jeroen Demeyer  added the comment:

I always assumed that enabling profiling only from the Python bytecode 
interpreter was a deliberate choice.

--
nosy: +jdemeyer

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29502] Should PyObject_Call() call the profiler on C functions, use C_TRACE() macro?

2017-02-09 Thread STINNER Victor

STINNER Victor added the comment:

Output of attached profiler_c_code.py example:
---
haypo@selma$ ./python profiler_c_code.py 
(, 'call', None)
(, 'return', 'h')
(, 'call', None)
(, 'return', 'e')
(, 'call', None)
(, 'return', 'l')
(, 'call', None)
(, 'return', 'l')
(, 'call', None)
(, 'return', 'o')
(, 'c_call', )
---

Except of sys.setprofile(), the profiler doesn't see any C calls! list() and 
map() are simply "hidden".

So tools like coverage miss a lot of C call? Again, is it a compromise between 
performance and correctness, or just a regular bug?

--
Added file: http://bugs.python.org/file46604/profiler_c_code.py

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue29502] Should PyObject_Call() call the profiler on C functions, use C_TRACE() macro?

2017-02-08 Thread STINNER Victor

New submission from STINNER Victor:

call_function() and do_call_core() functions of Python/ceval.c use C_TRACE() 
macro to call the profiler, but PyObject_Call() and similar functions like 
_PyObject_FastCallKeywords() don't.

Is it a bug or a deliberate choice for performance?

Since PyObject_Call() and similar functions have now fast paths, I don't think 
that it's still needed to have these fast paths in ceval.c too. But I kept fast 
paths in ceval.c because of C_TRACE().

--
components: Interpreter Core
messages: 287343
nosy: haypo, inada.naoki, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Should PyObject_Call() call the profiler on C functions, use C_TRACE() 
macro?
type: behavior
versions: Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com