<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><span class="vcard"><a class="email" href="mailto:andrea.dibiagio@gmail.com" title="Andrea Di Biagio <andrea.dibiagio@gmail.com>"> <span class="fn">Andrea Di Biagio</span></a>
</span> changed
          <a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED - Broken JSON format when using markers"
   href="https://bugs.llvm.org/show_bug.cgi?id=51008">bug 51008</a>
          <br>
             <table border="1" cellspacing="0" cellpadding="8">
          <tr>
            <th>What</th>
            <th>Removed</th>
            <th>Added</th>
          </tr>

         <tr>
           <td style="text-align:right;">Status</td>
           <td>RESOLVED
           </td>
           <td>REOPENED
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Fixed By Commit(s)</td>
           <td>b11d31eb73a37f46a669e064b1aed77aff9f783a
           </td>
           <td>b11d31eb73a37f46a669e064b1aed77aff9f783a, 10cb03622325e699d53fbca819e03dca2519f5aa
           </td>
         </tr>

         <tr>
           <td style="text-align:right;">Resolution</td>
           <td>FIXED
           </td>
           <td>---
           </td>
         </tr></table>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED - Broken JSON format when using markers"
   href="https://bugs.llvm.org/show_bug.cgi?id=51008#c1">Comment # 1</a>
              on <a class="bz_bug_link 
          bz_status_REOPENED "
   title="REOPENED - Broken JSON format when using markers"
   href="https://bugs.llvm.org/show_bug.cgi?id=51008">bug 51008</a>
              from <span class="vcard"><a class="email" href="mailto:andrea.dibiagio@gmail.com" title="Andrea Di Biagio <andrea.dibiagio@gmail.com>"> <span class="fn">Andrea Di Biagio</span></a>
</span></b>
        <pre>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.".</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>