[PATCH] D54217: Add total function byte size and inline function byte size to "llvm-dwarfdump --statistics"

Greg Clayton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 8 10:27:32 PST 2018


clayborg added a comment.

In https://reviews.llvm.org/D54217#1291834, @dblaikie wrote:

> In https://reviews.llvm.org/D54217#1291820, @clayborg wrote:
>
> > yeah, an easy code search indeed kicked up the tests. I will add one. Sorry about that
>
>
> No worries - still curious where you were looking for the tests initially, perhaps we can do something to make them more discoverable?


The only thing I could think of that could make it easier is to make a symlink from the tools/llvm-dwarfdump/test which points to ../../test/tools/llvm-dwarfdump

> (another way I find tests: Break something nearby/related (eg: remove one of the existing statistics) & see what tests fail)
> 
> In https://reviews.llvm.org/D54217#1291828, @clayborg wrote:
> 
>> Looks like I can piggy back on llvm/test/tools/llvm-dwarfdump/X86/statistics.ll
>>
>> Does anyone know how to run only this test from command line?
> 
> 
> from the build directory I usually run "./bin/llvm-lit -v test/tools/llvm-dwarfdump/X86/statistics.ll" for example (yeah, even though that relative path doesn't exist in the build directory, lit knows to also try resolving it from the source dir, etc)

Thanks! Will be an easy tests to add. One other FileCheck question. Seems like I would want to check that "total function size" and "total inlined function size" exist. Can I rely on the exact byte sizes from this .ll file on all systems? I guess I don't really care what the value is, but I would like to verify that "total function size" > "total inlined function size". Is there a way to do that?

CHECK: "total function size":[[BYTES:[0-9]+]]


Repository:
  rL LLVM

https://reviews.llvm.org/D54217





More information about the llvm-commits mailing list