#9115 closed patch
PSP: prepare for gprof
Reported by: | bluddy | Owned by: | bluddy |
---|---|---|---|
Priority: | normal | Component: | Port: PSP |
Version: | Keywords: | ||
Cc: | Game: |
Description
Allow gprof to be easily activated using a switch in the custom makefile. Upon exit, scummvm should save gmon.out. Use 'psp-gprof scummvm-psp.org.elf gmon.out > gprof.txt' to view the output.
Ticket imported from: #2903608. Ticket imported from: patches/1220.
Attachments (1)
Change History (14)
comment:1 by , 15 years ago
comment:2 by , 15 years ago
Sure, I could make it global. Didn't realize there would be interest in that. 'gprof_cleanup' is a standard call, at least on the PSP, to allow the buffer gprof has built up in memory to be written out to a gmon.out file.
comment:3 by , 15 years ago
Here's the global patch. Note: 1. Must disable some engines to have enough memory for gprof on PSP. 2. Dynamic plugins don't work well with gprof. 3. I didn't add the -pg LDFLAG globally because some backends might use ld instead of gcc and ld doesn't understand -pg.
comment:4 by , 15 years ago
Folks, we already have --enable-profiling -- please use/extend that, instead of adding another redundant option :).
comment:6 by , 15 years ago
Oh Max is right, I didn't find that today in configure while I wrote this comment, sorry :-). Maybe that's because I searched for "gprof" instead of "profiling", I somehow thought we had something like that already anyway... :-)
Maybe we should add some documentation for "--enable-profiling", or is it non documented in --help, because it's not relevant for builders/users?
comment:7 by , 15 years ago
So, what do we do with this item? Can it be closed?
I also documented "--enable-profiling" and "--enable-release".
comment:8 by , 15 years ago
I'm tackling PSP optimization next (I decided I need to finish with the PSP stuff before moving on to other stuff) so I'll get back to updating this patch ie. no need to close it.
comment:11 by , 15 years ago
Closing this then.
And update tracker access rights for bluddy so that he can easily do it himself next time ;)
comment:12 by , 15 years ago
Owner: | set to |
---|---|
Status: | new → closed |
comment:13 by , 6 years ago
Component: | → Port: PSP |
---|
Is there any reason "gprof_cleanup()" has to be called? Like otherwise memory etc. won't be clean after exiting ScummVM?
I would also probably change "PSP_USE_GPROF" to "USE_GPROF", that way we could use the same define for other platforms with gprof support too (and also maybe add a configure option --enable-gprof, which takes care for that, so people can use gprof with configure on the PSP (and maybe other platforms) too).