[PATCH] D150644: [lld][ELF] Implement –print-memory-usage
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 24 12:17:08 PDT 2023
MaskRay accepted this revision.
MaskRay added a comment.
Some nits.
================
Comment at: lld/ELF/LinkerScript.h:340
+ // Describe memory region usage.
+ void printMemoryUsage(raw_ostream& os);
+
----------------
================
Comment at: lld/test/ELF/linkerscript/print-memory-usage.s:4
+# RUN: rm -rf %t && split-file %s %t
+# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %t/a1.s -o %t/a1.o
+# RUN: ld.lld -T %t/1.t %t/a1.o -o %t/a1 --print-memory-usage \
----------------
================
Comment at: lld/test/ELF/linkerscript/print-memory-usage.s:13
+
+# CHECK1: Memory region Used Size Region Size %age Used
+# CHECK1: ROM: 4 B 1 KB 0.39%
----------------
When testing whitespace formatting, we should use `--match-full-lines --strict-whitespace`. See `why-extract.s`
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D150644/new/
https://reviews.llvm.org/D150644
More information about the llvm-commits
mailing list