[PATCH] D146260: Make code size metric names independent of platform
Jessica Paquette via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 16 14:14:24 PDT 2023
paquette created this revision.
Herald added a project: All.
paquette requested review of this revision.
On Darwin/mach-o, llvm-size (and size) will output something like
__text
While on other platforms (e.g. GNU) you'll get
.text
codesize.py was basically pushing that platform-specific info along in its size
related output.
So, depending on the platform, we'd get
size.__text
size..text
Tools downstream from the test suite then would have to handle whatever output
the target-specific tools would produce.
Instead of doing that, let's just output something like
size_text
So all downstream consumers can just handle one single format.
This is in tandem with D146257 <https://reviews.llvm.org/D146257> in LNT.
Repository:
rT test-suite
https://reviews.llvm.org/D146260
Files:
litsupport/modules/codesize.py
Index: litsupport/modules/codesize.py
===================================================================
--- litsupport/modules/codesize.py
+++ litsupport/modules/codesize.py
@@ -34,9 +34,11 @@
if values[0] == 'Total':
continue
try:
- name = values[0]
+ # Strip leading underscores and periods, which are
+ # platform-dependent. E.g. __text -> text or .text -> text
+ name = values[0].lstrip("__").lstrip(".")
val = int(values[1])
- metrics['size.%s' % name] = val
+ metrics['size_%s' % name] = val
except ValueError:
logging.info("Ignoring malformed output line: %s", line)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D146260.505926.patch
Type: text/x-patch
Size: 806 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230316/b6b201fc/attachment.bin>
More information about the llvm-commits
mailing list