# perf record sleep 1
# perf report -i perf.data
--> expected output
(note: -i perf.data not really needed)

# perf record -o - sleep 1 | cat > perf.data
# perf report -i perf.data
--> incompatible file format (rerun with -v to learn more)
# perf report -i - < perf.data
--> expected output
[...]
But I still want to understand why there is a difference (and what is
the consequence of using the pipe_output format)

As I've been fighting with the perf data format for a while now, I can answer 
this:

With the "normal" output various meta information is written to the end of the 
file. If you pipe the output to a different process that is impractical because the other 
process would have to buffer its input until perf stops, making it impossible to analyze 
the events as they arrive. That's why they came up with a second format which puts the 
meta information inline with the actual data. Apparently perf will only read that from 
stdin, though.

best regards,
Ulf Hermann
--
To unsubscribe from this list: send the line "unsubscribe linux-perf-users" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to