[PATCH] D86644: [llvm-mca] Initial implementation of output serialization using JSON
Wolfgang Pieb via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 26 10:37:19 PDT 2020
wolfgangp created this revision.
wolfgangp added reviewers: andreadb, lebedev.ri.
Herald added subscribers: gbedwell, javed.absar.
Herald added a project: LLVM.
wolfgangp requested review of this revision.
This is a first cut at creating JSON output for MCA views.
Generate JSON by using --json on the command line. llvm-mca generates either its readable output as before or JSON. At the moment they cannot be both generated with just one run.
4 views are implemented:
- Summary
- InstructionInfo
- Timeline
- ResourcePressure
There is a major and minor version included as key/value pairs in the output. The views appear in alphabetical order.
The test case is rather rigid. It checks for every single line emitted. It can possibly be shortened, but I don't know what a compromise would be. There is also a need to check that regular output and JSON output match from a data point of view. This would involve creating a tool that would check the 2 different outputs for deviations.
Let me know what you think.
https://reviews.llvm.org/D86644
Files:
llvm/test/tools/llvm-mca/JSON/X86/views.s
llvm/tools/llvm-mca/PipelinePrinter.cpp
llvm/tools/llvm-mca/PipelinePrinter.h
llvm/tools/llvm-mca/Views/BottleneckAnalysis.cpp
llvm/tools/llvm-mca/Views/BottleneckAnalysis.h
llvm/tools/llvm-mca/Views/DispatchStatistics.h
llvm/tools/llvm-mca/Views/InstructionInfoView.cpp
llvm/tools/llvm-mca/Views/InstructionInfoView.h
llvm/tools/llvm-mca/Views/RegisterFileStatistics.h
llvm/tools/llvm-mca/Views/ResourcePressureView.cpp
llvm/tools/llvm-mca/Views/ResourcePressureView.h
llvm/tools/llvm-mca/Views/RetireControlUnitStatistics.h
llvm/tools/llvm-mca/Views/SchedulerStatistics.h
llvm/tools/llvm-mca/Views/SummaryView.cpp
llvm/tools/llvm-mca/Views/SummaryView.h
llvm/tools/llvm-mca/Views/TimelineView.cpp
llvm/tools/llvm-mca/Views/TimelineView.h
llvm/tools/llvm-mca/Views/View.h
llvm/tools/llvm-mca/llvm-mca.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86644.288029.patch
Type: text/x-patch
Size: 37252 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200826/4d478531/attachment.bin>
More information about the llvm-commits
mailing list