Profiling Support

I’m trying to do some profiling of one of my SDL programs, so I compile
with profiling like:

g++ -g -O2 -pg -Wall ...

And when I run gprof I get my profile, but none of the SDL calls are
listed at all. I tried modifying the SDL build to enable profiling, but
that caused some weirdness that wasn’t present when I didn’t enable
profiling. BTW, I’m running under RedHat linux. Thanks!–
Ti Leggett
leggett at eecs.tulane.edu

You need to compile and link libSDL as a static library. Note that any
libraries linked by libSDL (XLib, ALSA, whatever) also need to be static.

If you don’t do it that way, the profile results WILL be skewed.On Sat, Sep 08, 2001 at 09:37:10PM -0500, Ti Leggett wrote:

I’m trying to do some profiling of one of my SDL programs, so I compile
with profiling like:

g++ -g -O2 -pg -Wall …

And when I run gprof I get my profile, but none of the SDL calls are
listed at all. I tried modifying the SDL build to enable profiling, but
that caused some weirdness that wasn’t present when I didn’t enable
profiling. BTW, I’m running under RedHat linux. Thanks!


Joseph Carter Free software developer

Internet censorship. Because your children need to be
protected from naked women, medical procedures, diverse
cultures, and violent video games.
(but information on building bombs, stealing cable, and
manufacturing drugs is okay…)

-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Type: application/pgp-signature
Size: 273 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20010908/5d5de072/attachment.pgp