<div dir="ltr"><div class="gmail_default" style="font-family:monospace;font-size:small;color:#000000">Both Roland and Petr's suggestions are great.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Aug 26, 2021 at 10:00 AM Petr Hosek via Phabricator <<a href="mailto:reviews@reviews.llvm.org">reviews@reviews.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">phosek added a comment.<br>
<br>
Since these fields come from the binary and should be identical (profile runtime simply copies them into the raw profile),  a different approach would be to have a new subcommand in `llvm-profdata` to validate the profile against the binary to check if those fields are indeed the same, for example something like `llvm-profdata validate --object=<binary> <profile>.profraw` (alternatively it could also be just a flag, for example `llvm-profdata merge --validate=<binary> <profile>.profraw`).<br>
<br>
<br>
Repository:<br>
  rG LLVM Github Monorepo<br>
<br>
CHANGES SINCE LAST ACTION<br>
  <a href="https://reviews.llvm.org/D108747/new/" rel="noreferrer" target="_blank">https://reviews.llvm.org/D108747/new/</a><br>
<br>
<a href="https://reviews.llvm.org/D108747" rel="noreferrer" target="_blank">https://reviews.llvm.org/D108747</a><br>
<br>
</blockquote></div>