-
Notifications
You must be signed in to change notification settings - Fork 448
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow attaching co_firstlineno to frame name (#428)
Before this PR, we had 2 modes: * --function NOT passed: attach the line number from frame->f_lasti to the frame name * --function passed: do not attach any line number The main reason to avoid attaching f_lasti is to have frames aggregated by the function name only; so different "lines" of the same function are aggregated as a single frame. However, line numbers are useful as identifiers for functions, especially in large files / for common function names such as "__init__", which are likely to appear multiple times in the same file. This PR allows attaching code->co_firstlineno instead, which can serve to help in identification, while not preventing frames of the same function from being aggregated together. After this PR, we have these options: * --function, --nolineno NOT passed: same as before - attach f_lasti to the frame name * --function passed: attach co_firstlineno to the frame name * --nolineno: do not attach any line number (also, do not spend time on retrieving the line number from the remote process). Closes: #424
- Loading branch information
Showing
3 changed files
with
40 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters