summaryrefslogtreecommitdiffstats
path: root/llvm/utils/llvm-locstats/llvm-locstats.py
Commit message (Collapse)AuthorAgeFilesLines
* [llvm-locstats] Add the --draw-plot optionDjordje Todorovic2020-01-151-6/+52
| | | | | | | | When using the option, draw the histogram representing the debug location buckets. The resulting histogram will be saved in a png file. Differential Revision: https://reviews.llvm.org/D71869
* [llvm-locstats][NFC] Support OOP conceptDjordje Todorovic2020-01-151-92/+106
| | | | | | | | | | | | | | | Making these changes, the code becomes more robust and easier for adding the new features. -Introduce the LocationStats class representing the statistics -Add the pretty_print() method in the LocationStats class -Add additional '-' for the program options -Add the verify_program_inputs() function -Add the parse_locstats() function -Rename 'results' => 'opts' -Add more comments Differential Revision: https://reviews.llvm.org/D71868
* [llvm-dwarfdump][Statistics] Don't count coverage less than 1% as 0%Kristina Bessonova2019-12-131-1/+1
| | | | | | | | | | | | | | | | | | | | | Summary: This is a follow up for D70548. Currently, variables with debug info coverage between 0% and 1% are put into zero-bucket. D70548 changed the way statistics calculate a variable's coverage: we began to use enclosing scope rather than a possible variable life range. Thus more variables might be moved to zero-bucket despite they have some debug info coverage. The patch is to distinguish between a variable that has location info but it's significantly less than its enclosing scope and a variable that doesn't have it at all. Reviewers: djtodoro, aprantl, dblaikie, avl Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71070
* [llvm-dwarfdump][Statistics] Change the coverage buckets representation. NFCKristina Bessonova2019-12-131-4/+4
| | | | | | | | | | | | | | | | Summary: This changes the representation of 'coverage buckets' in llvm-dwarfdump and llvm-locstats to one that makes more clear what the buckets contain. See some related details in D71070. Reviewers: djtodoro, aprantl, cmtice, jhenderson Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71366
* [llvm-locstats] Avoid the locstats when no scope bytes coverage foundDjordje Todorovic2019-12-131-0/+4
| | | | | | | If the total number of PC range bytes in each variable's enclosing scope ('scope bytes total') is 0, we will have division by zero. Differential Revision: https://reviews.llvm.org/D71415
* [llvm-dwarfdump][Statistics] Unify coverage statistic computationKristina Bessonova2019-12-081-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The patch removes OffsetToFirstDefinition in the 'scope bytes total' statistic computation. Thus it unifies the way the scope and the coverage buckets are computed. The rationals behind that are the following: 1. OffsetToFirstDefinition was used to calculate the variable's life range. However, there is no simple way to do it accurately, so the scope calculated this way might be misleading. See D69027 for more details on the subject. 2. Both 'scope bytes total' and coverage buckets seem to be intended to represent the same data in different ways. Otherwise, the statistics might be controversial and confusing. Note that the approach gives up a thorough evaluation of debug information completeness (i.e. coverage buckets by themselves doesn't tell how good the debug information is). Only changes in coverage over time make a 'physical' sense. Reviewers: djtodoro, aprantl, vsk, dblaikie, avl Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70548
* [llvm-locstats] Fix 'only params' no entry value statsDjordje Todorovic2019-10-151-0/+1
| | | | | | Adding the missing line. llvm-svn: 374875
* Reland "[utils] Implement the llvm-locstats tool"Djordje Todorovic2019-10-021-0/+208
| | | | | | | | | | | | | | | | | | The tool reports verbose output for the DWARF debug location coverage. The llvm-locstats for each variable or formal parameter DIE computes what percentage from the code section bytes, where it is in scope, it has location description. The line 0 shows the number (and the percentage) of DIEs with no location information, but the line 100 shows the number (and the percentage) of DIEs where there is location information in all code section bytes (where the variable or parameter is in the scope). The line 50..59 shows the number (and the percentage) of DIEs where the location information is in between 50 and 59 percentage of its scope covered. Differential Revision: https://reviews.llvm.org/D66526 The cause of the test failure was resolved. llvm-svn: 373427
* Revert "Reland "[utils] Implement the llvm-locstats tool""Djordje Todorovic2019-10-011-208/+0
| | | | | | | This reverts commit rL373317 due to test failure on the clang-s390x-linux build bot. llvm-svn: 373336
* Reland "[utils] Implement the llvm-locstats tool"Djordje Todorovic2019-10-011-0/+208
| | | | | | | | | | | | | | | | The tool reports verbose output for the DWARF debug location coverage. The llvm-locstats for each variable or formal parameter DIE computes what percentage from the code section bytes, where it is in scope, it has location description. The line 0 shows the number (and the percentage) of DIEs with no location information, but the line 100 shows the number (and the percentage) of DIEs where there is location information in all code section bytes (where the variable or parameter is in the scope). The line 50..59 shows the number (and the percentage) of DIEs where the location information is in between 50 and 59 percentage of its scope covered. Differential Revision: https://reviews.llvm.org/D66526 llvm-svn: 373317
* Revert "Reland "[utils] Implement the llvm-locstats tool""Djordje Todorovic2019-09-301-208/+0
| | | | | | This reverts commit rL373183. llvm-svn: 373200
* Reland "[utils] Implement the llvm-locstats tool"Djordje Todorovic2019-09-301-0/+208
| | | | | | | | | | | | | | | | The tool reports verbose output for the DWARF debug location coverage. The llvm-locstats for each variable or formal parameter DIE computes what percentage from the code section bytes, where it is in scope, it has location description. The line 0 shows the number (and the percentage) of DIEs with no location information, but the line 100 shows the number (and the percentage) of DIEs where there is location information in all code section bytes (where the variable or parameter is in the scope). The line 50..59 shows the number (and the percentage) of DIEs where the location information is in between 50 and 59 percentage of its scope covered. Differential Revision: https://reviews.llvm.org/D66526 llvm-svn: 373183
* Revert "Reland "[utils] Implement the llvm-locstats tool""Djordje Todorovic2019-09-231-208/+0
| | | | | | This reverts commit rL372554. llvm-svn: 372580
* Reland "[utils] Implement the llvm-locstats tool"Djordje Todorovic2019-09-231-0/+208
| | | | | | | | | | | | | | | | The tool reports verbose output for the DWARF debug location coverage. The llvm-locstats for each variable or formal parameter DIE computes what percentage from the code section bytes, where it is in scope, it has location description. The line 0 shows the number (and the percentage) of DIEs with no location information, but the line 100 shows the number (and the percentage) of DIEs where there is location information in all code section bytes (where the variable or parameter is in the scope). The line 50..59 shows the number (and the percentage) of DIEs where the location information is in between 50 and 59 percentage of its scope covered. Differential Revision: https://reviews.llvm.org/D66526 llvm-svn: 372554
* Revert "[utils] Implement the llvm-locstats tool"Djordje Todorovic2019-09-101-208/+0
| | | | | | This reverts commit rL371520. llvm-svn: 371527
* [utils] Implement the llvm-locstats toolDjordje Todorovic2019-09-101-0/+208
The tool reports verbose output for the DWARF debug location coverage. The llvm-locstats for each variable or formal parameter DIE computes what percentage from the code section bytes, where it is in scope, it has location description. The line 0 shows the number (and the percentage) of DIEs with no location information, but the line 100 shows the number (and the percentage) of DIEs where there is location information in all code section bytes (where the variable or parameter is in the scope). The line 50..59 shows the number (and the percentage) of DIEs where the location information is in between 50 and 59 percentage of its scope covered. The tool will be very useful for tracking improvements regarding the "debugging optimized code" support with LLVM ecosystem. Differential Revision: https://reviews.llvm.org/D66526 llvm-svn: 371520
OpenPOWER on IntegriCloud