This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

adding --output-format=json to gprof


Greetings,

I've been doing some work groveling the output of gprof and generating (graphviz) dot files for visualization of call graphs. This experience brings me to this question: Has anyone suggested adding an option to gprof so it can generates its output in a (text) data-exchange format? I'm NOT thinking XML, but more like JSON or YAML. These formats are text, human readable, but also (obviously) machine readable (and well supported by libraries for all major languages).

I'd be happy to do the work to generate JSON (or YAML or ...) output, and (if you like) structure things so that other formats might be supported at a later date. So maybe the command line option would be

--output-format={text,json}

Where 'text' is the current (and default) format and 'json' is the only other format (initially) supported, but others could be added (again at a later date).

Is this the kind of change that (if done "correctly") you'd be willing to accept into the main line gprof sources? If not, what might you be willing to accept?

I understand that there is valuable information in the gmon.out file that is omitted in the current textual output. So an alternative (machine friendly) format might allow this additional information to be included.

Thanks for taking the time to consider this suggestion.

Cheers,
Robert Nielsen

P.S. I've copied Mel Gorman because he is the author of CodeViz, a complementary technology.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]