perf, tools, stat: Implement CSV metrics output

Now support CSV output for metrics. With the new output callbacks
this is relatively straight forward by creating new callbacks.

The new line callback needs to know the number of fields to skip them
correctly

To avoid reordering the existing CSV fields, I had to move
the noise printing into the lower level print metrics call back,
so that noise can be printed before metrics.

This actually cleans up the callers because it avoids a lot
of duplicated code.

Signed-off-by: Andi Kleen <ak@linux.intel.com>
1 file changed