[PATCH] D111750: [llvm-profgen] Allow unsymbolized profile as perf input

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 25 12:10:29 PDT 2021


hoy added inline comments.


================
Comment at: llvm/tools/llvm-profgen/PerfReader.h:659
+*/
+class UnsymbolizedProfileReader : public PerfReaderBase {
+public:
----------------
wenlei wrote:
> hoy wrote:
> > What is the main reason of making this type hierarchy? It looks like `UnsymbolizedProfileReader` doesn't need most of the interfaces `PerfReaderBase` provides. Conceptually it sounds to me that the two classes function independently, and if we'd like code sharing,  `UnsymbolizedProfileReader` can be made the base class of `PerfReaderBase` or make a new base class that simply reads in something and outputs an symbolized profile?
> > UnsymbolizedProfileReader can be made the base class of PerfReaderBase
> 
> I don't think this is a good idea. Conceptually, PerfReader is not a special kind of UnsymbolizedProfileReader.
Right, they are independent of each other. PerfReader really deals with perf input. They only share in the raw output writting. A new base class makes more sense?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111750



More information about the llvm-commits mailing list