On Tue, Feb 05, 2002 at 04:12:35PM +0800, ³\¹ÅŠö wrote:
> When I run glxgears,
> it print out glx_init_prof, and glx_fini_prof.
> But, how to produce gmon.out ??

Old message, but for completeness sake...

export GLX_SO_MON=1
 
> I had tried to run xc/lib/GL/makeprofile.sh,
> but print out some error message .... Is there
> still any step to do for profiling ??

Patch attached for that.

When you run most apps with the above env variable it should give you the
glx_lowpc and gmon.out needed by the script.

For quake / rtcw they seem to call _exit and glx_fini_prof doesn't get
called...

cd /usr/local/games/wolfenstein
gdb wolf.x86
gdb> break _exit
gdb> run
... play game / exit game
gdb> jump glx_fini_prof
gdb> sig 11 here, but you'll have a gmon.out


-- 
Michael.
 
Index: makeprofile.sh
===================================================================
RCS file: /cvsroot/dri/xc/xc/lib/GL/makeprofile.sh,v
retrieving revision 1.4
diff -u -3 -p -r1.4 makeprofile.sh
--- makeprofile.sh      24 Sep 2000 09:33:55 -0000      1.4
+++ makeprofile.sh      25 Feb 2002 23:02:33 -0000
@@ -17,7 +17,5 @@ if [ ! -f ${libname} ] ; then 
    exit 1 
 fi
 
-ld -o glxsyms -noinhibit-exec --whole-archive -Ttext=`cat glx_lowpc` ${libname} 2> 
/dev/null || { echo "couldn't build relocated object" ; exit 1 }
-
-gprof glxsyms < gmon.out > profile || { echo "gprof failed" ; exit 1 }
-
+ld -o glxsyms -noinhibit-exec --whole-archive -Ttext=`cat glx_lowpc` ${libname} 2> 
+/dev/null || { echo "couldn't build relocated object" ; exit 1; }
+gprof glxsyms < gmon.out > profile || { echo "gprof failed" ; exit 1; }

Reply via email to