[PATCH] D116783: [memprof] Print out the summary in YAML format.

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 7 15:06:30 PST 2022


tejohnson added a comment.

In D116783#3228553 <https://reviews.llvm.org/D116783#3228553>, @snehasish wrote:

> PTAL, thanks!
>
> I would really like to have a test to ensure that the YAML we generate is valid but it seems hard to implement without defining a document type to parse into as a unittest (see https://llvm.org/docs/YamlIO.html#input). Alternatively, I could also extend the lit based test to check if YAML is available like this usage in MLIR (https://git.io/J9ORA). Any suggestions?

I don't have a strong feeling. Looks like the tests that dump opt remarks to yaml format just manually check that the output lines look as expected but don't attempt to parse them via yaml itself.



================
Comment at: llvm/tools/llvm-profdata/llvm-profdata.cpp:2484
+
+  OS << "memprof_profile:\n";
   Reader->printSummaries(OS);
----------------
snehasish wrote:
> tejohnson wrote:
> > Can this be moved into printSummaries?
> Added a new printYAML method and moved the `OS << "memprof_profile:" statement there.
Is there a reason for not wanting to put it at the top of printSummaries?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116783



More information about the llvm-commits mailing list