[llvm-bugs] [Bug 51008] Broken JSON format when using markers
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Jul 10 05:15:16 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=51008
Andrea Di Biagio <andrea.dibiagio at gmail.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Fixed By Commit(s)|b11d31eb73a37f46a669e064b1a |b11d31eb73a37f46a669e064b1a
|ed77aff9f783a |ed77aff9f783a,
| |10cb03622325e699d53fbca819e
| |03dca2519f5aa
Resolution|FIXED |---
--- Comment #1 from Andrea Di Biagio <andrea.dibiagio at gmail.com> ---
The latest changes from Marcos are good, and now the JSON support is much
better.
However, we still cannot close this bug because there are cases where the JSON
output is still invalid.
Two problems:
1. There can be multiple unnamed code regions. So, the name must be optional.
2. Using "main" as the name for the default region is problematic when there is
another region with that same name.
Two observations:
Code regions are uniquely identified by a progressive ID number (starting from
0 for the first/default code region).
It may be worthy to store them as an array.
The name of a region is completely optional, and we shouldn't rely on its
presence.
To reproduce the issue, just define more than one unnamed region, and see how
only one (presumably the last one) is generated as JSON.
I am going to look into this. It might have a simple fix.
P.s.: the JSON output was also broken for -instruction-tables. I have fixed it
in "[llvm] 10cb036 - [llvm-mca] Refactor the logic that prints JSON files.".
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210710/a4827be3/attachment.html>
More information about the llvm-bugs
mailing list