[PATCH] D24819: Statistic: Only print statistics on exit for -stats
Bruno Cardoso Lopes via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 23 11:29:47 PDT 2016
bruno added a comment.
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?
Repository:
rL LLVM
https://reviews.llvm.org/D24819
More information about the llvm-commits
mailing list