[Bug 3343] New: Problems with profiling

bugzilla-daemon at icculus.org bugzilla-daemon at icculus.org
Sun Sep 2 18:46:44 EDT 2007


http://bugzilla.icculus.org/show_bug.cgi?id=3343

           Summary: Problems with profiling
           Product: Quake 3
           Version: 1.33 SVN
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P3
         Component: Platform
        AssignedTo: zakk at icculus.org
        ReportedBy: nixpenguin at gmail.com
         QAContact: quake3-bugzilla at icculus.org


Building a profiled, optimized ioQ3 with gcc should be easier (see details
below). As it is, there is no profile target, and overriding LDFLAGS on the
make command-line is problematic (-ldl and -lm have to be explicitly provided).

Also, after Step 2, not all source files have corresponding '.gcda' files like
they do for '.gcno'. In fact, most of them don't, even if I load maps, play
online, etc (I'm setting fs_basepath from the build/release-linux-x86_64
folder). As a result, they're compiled with no branch info taken into account.
Am I missing something?


Step 1: Build non-optimized for '.gcno'
OPTIMIZE="-O0 -fno-guess-branch-probability -fprofile-generate"
LDFLAGS+="-fprofile-generate"

Step 2: Build optimized for '.gcda'
make clean
OPTIMIZE="[k8, O3, fast math] -fno-guess-branch-probability -fprofile-arcs"
Remove "-fprofile-generate" from LDFLAGS, add "-fprofile-arcs"
Run the resulting binary to generate .gcda files

Step 3: Build final optimized binary
make clean
OPTIMIZE="[above opts] -fno-guess-branch-probability -fprofile-use"
Remove "-fprofile-arcs" from LDFLAGS, add "-fprofile-use"


-- 
Configure bugmail: http://bugzilla.icculus.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.



More information about the quake3-bugzilla mailing list