Opened 14 years ago
Closed 13 years ago
Last modified 5 years ago
#9115 closed patch
PSP: prepare for gprof
|Reported by:||bluddy||Owned by:||bluddy|
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.
Change History (14)
comment:1 by , 14 years ago
comment:2 by , 14 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.
by , 14 years ago
Updated patch works globally
comment:3 by , 14 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 , 14 years ago
Folks, we already have --enable-profiling -- please use/extend that, instead of adding another redundant option :).
comment:5 by , 14 years ago
That's embarrassing. OK, I'll change it so the PSP uses that.
comment:6 by , 14 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 , 13 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 , 13 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:9 by , 13 years ago
What is the status of this item?
comment:10 by , 13 years ago
Err... I ended up adding this, so the item can be closed now.
comment:11 by , 13 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 , 13 years ago
|Status:||new → closed|
comment:13 by , 5 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).