<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/65416>65416</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
llvm-profdata should report errors on unreasonable block counts
</td>
</tr>
<tr>
<th>Labels</th>
<td>
new issue
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
aeubanks
</td>
</tr>
</table>
<pre>
https://crbug.com/1473604 is a bug where a miscompile resulted in instrumented profiles having very unreasonable block counts, e.g.
```
% ~/src/llvm-project/out/gn/bin/llvm-profdata show --detailed-summary /tmp/bad/default-6392451879272816540_0.profraw
Instrumentation level: IR entry_first = 0
Total functions: 871932
Maximum function count: 49315915
Maximum internal block count: 12297832523381840770
Total number of blocks: 4448106
Total count: 6148943734960307878
Detailed summary:
2 blocks with count >= 12297832523381840770 account for 1 percentage of the total counts.
2 blocks with count >= 12297832523381840770 account for 10 percentage of the total counts.
2 blocks with count >= 12297832523381840770 account for 20 percentage of the total counts.
2 blocks with count >= 12297832523381840770 account for 30 percentage of the total counts.
2 blocks with count >= 12297832523381840770 account for 40 percentage of the total counts.
2 blocks with count >= 12297832523381840770 account for 50 percentage of the total counts.
2 blocks with count >= 12297832523381840770 account for 60 percentage of the total counts.
2 blocks with count >= 12297832523381840770 account for 70 percentage of the total counts.
2 blocks with count >= 12297832523381840770 account for 80 percentage of the total counts.
2 blocks with count >= 12297832523381840770 account for 90 percentage of the total counts.
2 blocks with count >= 12297832523381840770 account for 95 percentage of the total counts.
2 blocks with count >= 12297832523381840770 account for 99 percentage of the total counts.
2 blocks with count >= 12297832523381840770 account for 99.9 percentage of the total counts.
2 blocks with count >= 12297832523381840770 account for 99.99 percentage of the total counts.
2 blocks with count >= 12297832523381840770 account for 99.999 percentage of the total counts.
4 blocks with count >= 8727880088090 account for 99.9999 percentage of the total counts.
```
this would have been easier to debug if llvm-profdata reported unreasonable block counts
@huangjd (not sure who else to cc)
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJy8lk-L5DYQxT-N-lJ0I0uyLR18mGRi2EMuIfdFtsu2dmWp0Z_pzCWfPai7mZ3Z3YE5ZA1GIKpUv1cPH56O0SwOsSP1b6R-POicVh86jXnQ7ms8DH567taUzpHwB8J6wvoxDHk5jX4jrK9EyxsqwETQMOQFLisGBA2biaPfzsYiBIzZJpzAODAuppA3dOV-Dn42FiOs-sm4BZ4wPEN2AXX0Tg8WYbB-_Aqjzy5Fwn4HPC0nQh8JfbifDb1_tyur4V_C-hhGwnprn7bjOfgvOCbCep_LuTjC-sG4V_V50klDXP0FjscJkzYWp2PM26bDMxDWp-1cHumJsH7CWWebjg1XTNSVbBVrmayaWtDP9FSmBX2Bm5xPL8vqZLwDi09oCX-AT38BoEvh-fNsQkxA-CPcV_jbJ21hzm4sT4rpINtKcXYr_6n_MVveXhpu3pQuoXhVq6p-22dcwuC0fe1k6a4YU63krGacy0oK2rZvBLi8DRjAz7eHVx1CCFnR5nXby7ymElIJ3nKhGsppK1t563u8-wl3P8tfdC2w-2S4mLTeBgHhfxQrfiYO9HjrmX2ACs4YxuLrgkVjWhHSN0Hx9D8g6K9nsB0YfAeG2IFR78BodmC0OzDkDgy1B6PegaH2YJx2ouyF-SBHvM-RLWulpFRKqn4G-CDh-wBwPdNqIlx8tlNJFggDogPU0WCA5GHCElTMDG8DQMCzDyWWvJ9AXicPQdes3fJlAsKk8wliDgiX1QPaWLTCOBKmDlPHJ8WVPmBXNYqrmla8Paxdo6ap4dOgULdcDVWtJ87U0IimlbRq6MF0jDJOFa1ZJVjVnsZZiEFP9VwNctJUEkFx08aeyh4nH5aDiTFj19Siag5WD2jjNdYx5vAC1yJhrKS80F13H_ISiaDWxBS_TUkmWex-SEfFzptHgCH4EMG797065GC_y42LSWse7sGxjP8xo101RsL66w7_BQAA__8-2FM7">