[prev in list] [next in list] [prev in thread] [next in thread] 

List:       python-bugs-list
Subject:    [issue44530] Propagate qualname from the compiler unit to code objects for finer grained profiling d
From:       Gabriele N Tornetta <report () bugs ! python ! org>
Date:       2021-06-29 20:16:24
Message-ID: 1624997784.35.0.709432212946.issue44530 () roundup ! psfhosted ! org
[Download RAW message or body]


Gabriele N Tornetta <phoenix1987@gmail.com> 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. Besides, in this respect, \
given the immutability of code objects, qualname behaves like name.

2. At the Python level it is already possible to get the __qualname__ of a function \
(but not of a code object). As this is all I needed, I kept my initial implementation \
to the bare minimum.

3. I agree with this analysis. Whilst this increases the memory footprint, it might \
have the benefit of making the derivation of __qualname__ faster as this would now be \
cached on code objects.

However, I also appreciate @pablogsal's point of view of evaluating the actual \
benefits. The extra point in favour of this change that I can make is that it would \
resolve name clashes in profiling data from tools that have minimal impact on the \
runtime. Whether this is enough to justify the extra memory cost is certainly up for \
debate. From my side, I don't have the numbers to make this case more concrete.

As a next step, I'll look into exposing the new field to Python to see what it \
actually ends up looking like.

----------

_______________________________________
Python tracker <report@bugs.python.org>
<https://bugs.python.org/issue44530>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/python-bugs-list%40marc.info



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic