[PATCH] D78903: [Driver] Add option -fproc-stat-report

Serge Pavlov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Sat May 2 06:51:45 PDT 2020


sepavloff marked an inline comment as done.
sepavloff added inline comments.


================
Comment at: clang/docs/UsersManual.rst:770
+   $ cat abc
+   clang-11,"/tmp/foo-123456.o",92000,84000,87536
+   ld,"a.out",900,8000,53568
----------------
aganea wrote:
> sepavloff wrote:
> > aganea wrote:
> > > Please add a header to the output .CSV, specifying the units of measure where relevant.
> > CSV was chosen because such file is a simple union of records. It is convenient if multiple processes write to it. A process locks the file, writes to it and unlock it.
> > 
> > If header is required, thing get more complicated. A process locks file, then moves to the end and get current position. If it is the beginning of the file, this process if the first writer, so it writes header. Then it writes line of data and unlock file.
> > 
> > On the other hand, CSV file is proposed for parsing by scripts. Does such complication really makes sense?
> Thanks for the explanation! Yes, it would be more complicated indeed if locking is required. Let's forget the header if it's not practical.
> 
> However that raises a question: is it up to the user/build system to delete the log file on startup? Otherwise each build would indefintely append, you wouldn't know where your last build started in the log? How do you address that currently?
> However that raises a question: is it up to the user/build system to delete the log file on startup? Otherwise each build would indefintely append, you wouldn't know where your last build started in the log? How do you address that currently?

Yes, the log file is only appended. Users need to delete it if they want it contains results of one run only. However this feature is also used to collect statistics. User runs the same build several times and average needed metric for the same output file.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D78903





More information about the cfe-commits mailing list