[PATCH] D24819: Statistic: Only print statistics on exit for -stats

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 23 11:34:50 PDT 2016


MatzeB added a comment.

In https://reviews.llvm.org/D24819#550994, @bruno wrote:

> In https://reviews.llvm.org/D24819#550968, @MatzeB wrote:
>
> > In https://reviews.llvm.org/D24819#550961, @bruno wrote:
> >
> > > Hi Matthias,
> > >
> > > Thanks for working on this.
> > >  You probably want to update Other/statistic.ll to remove the -stats-json tests?
> > >
> > > What's your plan regarding the forthcoming output on a file? It seems to me that we can default to JSON whenever the output is anything but the default stderr.
> >
> >
> > My plan is getting this: https://reviews.llvm.org/D24820. This leaves the choice to the frontend which can either call PrintStatistics(OS) or PrintStatisticsJSON(OS). I consider the -stats llvm option as an easy ad-hoc measure to get some statistics printed; For bigger data gathering you should have support from your frontend to choose a sensible filename to write the statistics to in a machine parseable format.
>
>
> It seems useful to me to allow json stats to be collected when running from llc and opt as well, don't you think?


I was thinking of -stats-json as a stopgap measure until we have frontend integration. But sure we can keep it in, I must admit we should probably have it for the unittest anyway.


Repository:
  rL LLVM

https://reviews.llvm.org/D24819





More information about the llvm-commits mailing list