LWN.net Logo

Scripting support for perf

Scripting support for perf

Posted Feb 11, 2010 16:23 UTC (Thu) by trz (subscriber, #7752)
In reply to: Scripting support for perf by prasadkr
Parent article: Scripting support for perf

'Live' reporting should be just a short step away - to do that we could stick a pipe in between the 'record' and 'report' steps e.g.

$ perf trace record myscript | perf trace report myscript

or more simply just get rid of the two steps and combine them into one:

$ perf trace myscript

Currently, perf isn't pipe-friendly mainly because of the header-read/write code, which pre-allocates space in the file and does a lot of seeking to fill in length and offset fields later. That works nicely for a file, but presents problems if you want to feed it into a pipe.

I think if some changes were made to that part of the code, the rest would follow naturally. I plan to look into it soon and hopefully post some patches to enable it.


(Log in to post comments)

Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds