Re: [PATCH] perf report: delay sample_type checks in pipe mode

From: Tim Chen
Date: Mon Jun 11 2012 - 20:04:19 EST


On Mon, 2012-06-11 at 13:49 -0600, David Ahern wrote:
> On 6/11/12 1:48 PM, David Ahern wrote:
> > The pipeline:
> > perf record -a -g -o - sleep 5 |perf inject -v -b | perf report -g -i -
> >
> > generates the warning:
> > Selected -g but no callchain data. Did you call 'perf record' without -g?
> >
> > The problem is that the header data is not written to the pipe, so the
> > sample_type has not been available when perf_report__setup_sample_type is
> > called. For pipe mode, record dumps the sample type as part of the
> > synthesized events stream -- perf_event__synthesize_attrs(). Handle this
> > be detecting pipe mode and not doing early sanity checks on sample_type.
>
> Slightly different fix. Tim: can you re-test?
>
> David
>

Works for me.

Tim

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/