[PATCH] D73788: [yaml2obj/obj2yaml] - Add support for the SHT_LLVM_CALL_GRAPH_PROFILE sections.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 3 04:24:23 PST 2020


grimar added inline comments.


================
Comment at: llvm/test/tools/obj2yaml/call-graph-profile-section.yaml:111
+
+## Check how we handle broken cases.
+
----------------
jhenderson wrote:
> I think this is missing a non-16 sh_entsize test case.
Reasonable. Done.


================
Comment at: llvm/test/tools/yaml2obj/ELF/call-graph-profile-section.yaml:162-163
+
+## Check we can describe SHT_LLVM_CALL_GRAPH_PROFILE sections using the "Entries" tag.
+## We can specify symbols either using names or indexes.
+# RUN: yaml2obj --docnum=7 %s -o %t.sym
----------------
jhenderson wrote:
> Isn't this test case at least partially a duplicate of the "main" test case? Could the two be combined?
> Could the two be combined?
I would not combine them. The intention of the main test is to check we encode 32/64/LE/BE bytes correctly.
That is why I used raw data check there.

Here I check how we can use "Entires" and I use `--elf-cg-profile`. Using of `--elf-cg-profile` would be unreasonable
until we know that encode section data correctly. 

Probably we can remove the "Case 2" from here as the same case was tested in the main case.
I would leave it as is though as it complements the rest of this test case which tries to test all valid cases
related to "Entries" at once.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73788/new/

https://reviews.llvm.org/D73788





More information about the llvm-commits mailing list