[PATCH] gprof: print source file names inline

Conrad Hoffmann ch@bitfehler.net
Mon Nov 18 19:34:00 GMT 2013


Hi all,

this is my first attempt to contribute to binutils, so please excuse if
I missed anything in terms of etiquette and let me know :)

Attached is a patch agains current master that adds the option
"--inline-file-names" to gprof.

If used, gprof will print the source file and line after each symbol
name in both the flat profile and the call graph. As example, these are
the first few lines of a sample output:

http://pastebin.com/inyJ0rfP

The ouput obeys the -L option (full paths).

I find this useful for larger projects, both in terms of immediate
oversight when looking at the flat profile and the ability to
grep/search for certain things when automatically parsing the output of
gprof.

 - Any interest at all in such an addition?
 - What changes may be required in terms of style, naming conventions,
   etc...?
 - If the previous items are resolved, can patches be contributed by
   mail or should I set up a repo that you can pull & merge from?

Cheers,
Conrad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: print_file_names_inline.patch
Type: text/x-patch
Size: 4148 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20131118/a5f8b438/attachment.bin>


More information about the Binutils mailing list