[PATCH] D20995: Statistic: Add machine parseable name, value pair output

Matthias Braun via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 3 21:21:16 PDT 2016


MatzeB created this revision.
MatzeB added a reviewer: bruno.
MatzeB added a subscriber: llvm-commits.
MatzeB set the repository for this revision to rL LLVM.
Herald added a subscriber: mcrosier.

This adds an option to output statistics in a form that easily parseable
by machines:
- We lacked a short unique identifier for a statistics, so I renamed the
  current "Name" field that just contained the DEBUG_TYPE name of the
  current file to DebugType and added a new "Name" field that contains
  the C++ identifier of the statistic variable.
- Add the -stats-csv option which outputs one statistic per line as:
  "debugtype.name,value"


I have heard there are plans to add a fancier json output for this, but until this happens this should be a good option to enable easier data analysis on compiler statistics.

Repository:
  rL LLVM

http://reviews.llvm.org/D20995

Files:
  include/llvm/ADT/Statistic.h
  lib/Support/Statistic.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D20995.59644.patch
Type: text/x-patch
Size: 5412 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160604/cfe23601/attachment.bin>


More information about the llvm-commits mailing list