[issue44530] Propagate qualname from the compiler unit to code objects for finer grained profiling data

2021-12-03 Thread Steve Dower
Change by Steve Dower : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue44530] Propagate qualname from the compiler unit to code objects for finer grained profiling data

2021-11-26 Thread Steve Dower
Steve Dower added the comment: New changeset db55f3fabafc046e4fca907210ced4ce16bf58d6 by Steve Dower in branch 'main': bpo-44530: Reverts a change to the 'code.__new__' audit event (GH-29809) https://github.com/python/cpython/commit/db55f3fabafc046e4fca907210ced4ce16bf58d6 --

[issue44530] Propagate qualname from the compiler unit to code objects for finer grained profiling data

2021-11-26 Thread Steve Dower
Change by Steve Dower : -- pull_requests: +28041 stage: resolved -> patch review pull_request: https://github.com/python/cpython/pull/29809 ___ Python tracker ___

[issue44530] Propagate qualname from the compiler unit to code objects for finer grained profiling data

2021-11-26 Thread Steve Dower
Steve Dower added the comment: Correction: the event is `code.__new__` -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue44530] Propagate qualname from the compiler unit to code objects for finer grained profiling data

2021-11-26 Thread Steve Dower
Steve Dower added the comment: This change modified the audit event 'code.__name__', which requires a deprecation period (all events are public API, as per PEP 578). We need to revert that part of the change. I don't think we need to add a new event to report the qualname here, so just

[issue44530] Propagate qualname from the compiler unit to code objects for finer grained profiling data

2021-07-07 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 8363c53369a582ff9ae4e797a80cdce12624a278 by Pablo Galindo in branch 'main': bpo-44530: Document the new CodeObject.co_qualname attribute (GH-27052) https://github.com/python/cpython/commit/8363c53369a582ff9ae4e797a80cdce12624a278

[issue44530] Propagate qualname from the compiler unit to code objects for finer grained profiling data

2021-07-07 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- pull_requests: +25608 pull_request: https://github.com/python/cpython/pull/27052 ___ Python tracker ___

[issue44530] Propagate qualname from the compiler unit to code objects for finer grained profiling data

2021-07-07 Thread Pablo Galindo Salgado
Change by Pablo Galindo Salgado : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue44530] Propagate qualname from the compiler unit to code objects for finer grained profiling data

2021-07-07 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: New changeset 2f180ce2cb6e6a7e3c517495e0f4873d6aaf5f2f by Gabriele N. Tornetta in branch 'main': bpo-44530: Add co_qualname field to PyCodeObject (GH-26941) https://github.com/python/cpython/commit/2f180ce2cb6e6a7e3c517495e0f4873d6aaf5f2f --

[issue44530] Propagate qualname from the compiler unit to code objects for finer grained profiling data

2021-07-07 Thread Mark Shannon
Mark Shannon added the comment: I suspect that the 0.1% increase is noise. The size of importlib.h etc show a small decrease, suggesting that the information content of the code object has *decreased*. After all, the qualname has to stored somewhere and moving it from caller to callee

[issue44530] Propagate qualname from the compiler unit to code objects for finer grained profiling data

2021-07-04 Thread Gabriele N Tornetta
Gabriele N Tornetta added the comment: With commit 7a12d31a8c22cae7a9c1a2239a1bb54adee33622 the new figures are # main (7569c0fe91): 25_059_438 bytes # bpo-445303-code-qualname (7a12d31a8c): 25_089_917 bytes which is a 0.1% relative increase :). This is likely due to the fact that with the

[issue44530] Propagate qualname from the compiler unit to code objects for finer grained profiling data

2021-07-03 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > So that seems to be about half a MB increase over 25 MB (about 2% relative > increase). I personally think that is acceptable, so I would be supportive of the patch but for context, many folks have indicated that they are worried about this size

[issue44530] Propagate qualname from the compiler unit to code objects for finer grained profiling data

2021-07-03 Thread Gabriele N Tornetta
Gabriele N Tornetta added the comment: > That is a pointer size per code object. The most standard way is to calculate > the size of all pyc files in the stdlib after compiling them all with "-m > compileall -r 1000 Lib". This yields the following numbers between what was main when I

[issue44530] Propagate qualname from the compiler unit to code objects for finer grained profiling data

2021-07-03 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: > Is there a "standard" way for me to quantify the memory impact of these kinds > of changes? That is a pointer size per code object. The most standard way is to calculate the size of all pyc files in the stdlib after compiling them all with "-m

[issue44530] Propagate qualname from the compiler unit to code objects for finer grained profiling data

2021-07-03 Thread Gabriele N Tornetta
Gabriele N Tornetta added the comment: @pablogsal Commit a0252ab9add7d48e9e0604ebf97342e46cf00419 exposes co_qualname to Python. I've added a test case to check that the result coincides with the current implementation of __qualname__. Is there a "standard" way for me to quantify the

[issue44530] Propagate qualname from the compiler unit to code objects for finer grained profiling data

2021-06-29 Thread Gabriele N Tornetta
Gabriele N Tornetta added the comment: Thanks for the feedback. I certainly appreciate all the concerns around this proposed change. @Mark.Shannon 1. This is the desired behaviour as profiling data should be attached to the actual code objects that correlate with the actual source content.

[issue44530] Propagate qualname from the compiler unit to code objects for finer grained profiling data

2021-06-29 Thread Pablo Galindo Salgado
Pablo Galindo Salgado added the comment: This also has the side effect of making marshalled code objects bigger, and we keep adding to this in 3.11 with the new exception table and soon with PEP 657. Given that a lot of people are concerned about this and that this change only affects a

[issue44530] Propagate qualname from the compiler unit to code objects for finer grained profiling data

2021-06-29 Thread Mark Shannon
Mark Shannon added the comment: I think this is a worthwhile improvement. A few comments on this issue and your PR. 1. We already have qualified names on functions and generators and those can be modified by @decorators. In those cases, the code object and the function would disagree. Code

[issue44530] Propagate qualname from the compiler unit to code objects for finer grained profiling data

2021-06-28 Thread Gabriele N Tornetta
Change by Gabriele N Tornetta : -- keywords: +patch pull_requests: +25508 stage: -> patch review pull_request: https://github.com/python/cpython/pull/26941 ___ Python tracker

[issue44530] Propagate qualname from the compiler unit to code objects for finer grained profiling data

2021-06-28 Thread Gabriele N Tornetta
New submission from Gabriele N Tornetta : When dumping profiling data out of code objects using out-of-process tools like Austin (https://github.com/p403n1x87/austin) one has access only to file name, function name, and line number. Consider the flame graph generated by running the following