[test-suite] r262306 - lit: Add simple codesize module

Sean Silva via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 23 21:38:43 PDT 2016


Thanks!

On Wed, Mar 23, 2016 at 8:45 PM, Matthias Braun <matze at braunis.de> wrote:

> Turns out I needed per-segment tracking for my work, so I implemented it
> in r264240. (I don't think these numbers are recorded by lnt yet though)
>
> - Matthias
>
> On Mar 1, 2016, at 12:30 PM, Sean Silva <chisophugis at gmail.com> wrote:
>
>
>
> On Tue, Mar 1, 2016 at 12:00 PM, Matthias Braun <matze at braunis.de> wrote:
>
>> patches welcome (sorry I couldn't resist).
>>
>> This commit was meant to demonstrate how additional metrics can be
>> collected and that the infrastructure is there.
>>
>
> That it did! The fact that I was inspired to want to plug in llvm-size
> shows that you did a good job :)
>
> -- Sean Silva
>
>
>> I hope that fine grained metrics will be added over time. I have no plans
>> myself yet at the moment to figure out what metrics are actually useful,
>> testing it on different targets making sure we don't fail when llvm-size is
>> not in the PATH...
>>
>> - Matthias
>>
>> On Mar 1, 2016, at 11:47 AM, Sean Silva via llvm-commits <
>> llvm-commits at lists.llvm.org> wrote:
>>
>> Do you have llvm-size available? You could get some more fine-grained
>> text/data/etc. information which might be more useful to track.
>>
>> -- Sean Silva
>>
>> On Mon, Feb 29, 2016 at 10:05 PM, Matthias Braun via llvm-commits <
>> llvm-commits at lists.llvm.org> wrote:
>>
>>> Author: matze
>>> Date: Tue Mar  1 00:05:27 2016
>>> New Revision: 262306
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=262306&view=rev
>>> Log:
>>> lit: Add simple codesize module
>>>
>>> This simply records the filesize of the executable.
>>>
>>> Added:
>>>     test-suite/trunk/litsupport/codesize.py
>>> Modified:
>>>     test-suite/trunk/litsupport/test.py
>>>
>>> Added: test-suite/trunk/litsupport/codesize.py
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/test-suite/trunk/litsupport/codesize.py?rev=262306&view=auto
>>>
>>> ==============================================================================
>>> --- test-suite/trunk/litsupport/codesize.py (added)
>>> +++ test-suite/trunk/litsupport/codesize.py Tue Mar  1 00:05:27 2016
>>> @@ -0,0 +1,13 @@
>>> +import lit.Test
>>> +import logging
>>> +import shellcommand
>>> +import os.path
>>> +
>>> +
>>> +def collect(context, result):
>>> +    try:
>>> +        size = os.path.getsize(context.executable)
>>> +        result.addMetric('size', lit.Test.toMetricValue(size))
>>> +    except:
>>> +        logging.info('Could not calculate filesize for %s' %
>>> +                     context.executable)
>>>
>>> Modified: test-suite/trunk/litsupport/test.py
>>> URL:
>>> http://llvm.org/viewvc/llvm-project/test-suite/trunk/litsupport/test.py?rev=262306&r1=262305&r2=262306&view=diff
>>>
>>> ==============================================================================
>>> --- test-suite/trunk/litsupport/test.py (original)
>>> +++ test-suite/trunk/litsupport/test.py Tue Mar  1 00:05:27 2016
>>> @@ -8,6 +8,7 @@ from lit.TestRunner import executeScript
>>>  from lit import Test
>>>  from lit.util import to_bytes, to_string
>>>
>>> +import codesize
>>>  import compiletime
>>>  import hash
>>>  import perf
>>> @@ -151,5 +152,6 @@ class TestSuiteTest(FileBasedTest):
>>>              result.addMetric(metric, lit.Test.toMetricValue(values[0]))
>>>          compiletime.collect(context, result)
>>>          hash.collect(context, result)
>>> +        codesize.collect(context, result)
>>>
>>>          return result
>>>
>>>
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at lists.llvm.org
>>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>>
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160323/31d20c5f/attachment.html>


More information about the llvm-commits mailing list