[Dri-devel] How to build DRI to use gprof see profile data

2002-02-04 Thread =?x-unknown?b?s1y5xab2?=



Hello, Every body:
 
 Do any know how to build Xserver and DRI that can see profiling
 data through  gprof?? I've see there is an option in host.def(in )
 DRI cvs):

/* To do profiling of the dynamically loaded 'xyz_dri.so' object, turn
 * this on.
 * Use 'xc/lib/GL/makeprofile.sh' to make it work.
 */
/* #define GlxSoProf YES */

#ifdef GlxSoProf
#  undef DefaultCCOptions
#  define DefaultCCOptions -ansi GccWarningOptions -pipe -g -p
#endif

   but if I enable #define GlxSoProf YES, then try to build Xserver
 (after make lowpc.o, highpc.o by hand).When I start Xserver , it cause
 unsolved symbol and core dump.

Symbol mcount from modules /usr/X11R6/lib/modules/fonts/libbitmap.a is
unresolved!

   Do any one has ever try this??  Do any one can tell me how to prof
xxx_dri.so ??


   Thanks for your help

 junkers





___
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel



RE: [Dri-devel] How to build DRI to use gprof see profile data

2002-02-04 Thread Gareth Hughes

> Hello, Every body:
>  
>  Do any know how to build Xserver and DRI that can see profiling
>  data through  gprof?? I've see there is an option in host.def(in )
>  DRI cvs):
> 
> /* To do profiling of the dynamically loaded 'xyz_dri.so' object, turn
>  * this on.
>  * Use 'xc/lib/GL/makeprofile.sh' to make it work.
>  */
> /* #define GlxSoProf YES */
> 
> #ifdef GlxSoProf
> #  undef DefaultCCOptions
> #  define DefaultCCOptions -ansi GccWarningOptions -pipe -g -p
> #endif
> 
>but if I enable #define GlxSoProf YES, then try to build Xserver
>  (after make lowpc.o, highpc.o by hand).When I start Xserver 
> , it cause
>  unsolved symbol and core dump.
> 
> Symbol mcount from modules /usr/X11R6/lib/modules/fonts/libbitmap.a is
> unresolved!
> 
>Do any one has ever try this??  Do any one can tell me how to prof
> xxx_dri.so ??

You can only build what's inside xc/lib/GL with GlxSoProf set to YES.
What you'll need to do is build the tree as usual, then do the
following:


cd xc/lib/GL
make 
make Makefile
make Makefiles
make
make install

Keith Whitwell can correct me if I'm wrong (it's been a while since I've
done this).  I think there's some documentation about this somewhere...

-- Gareth

___
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel



RE: [Dri-devel] How to build DRI to use gprof see profile data

2002-02-04 Thread Michel Dänzer

On Mon, 2002-02-04 at 19:43, Gareth Hughes wrote:

> >  Do any know how to build Xserver and DRI that can see profiling
> >  data through  gprof?? I've see there is an option in host.def(in )
> >  DRI cvs):
> > 
> > /* To do profiling of the dynamically loaded 'xyz_dri.so' object, turn
> >  * this on.
> >  * Use 'xc/lib/GL/makeprofile.sh' to make it work.
> >  */
> > /* #define GlxSoProf YES */
> > 
> > #ifdef GlxSoProf
> > #  undef DefaultCCOptions
> > #  define DefaultCCOptions -ansi GccWarningOptions -pipe -g -p
> > #endif
> > 
> >but if I enable #define GlxSoProf YES, then try to build Xserver
> >  (after make lowpc.o, highpc.o by hand).When I start Xserver 
> > , it cause
> >  unsolved symbol and core dump.
> > 
> > Symbol mcount from modules /usr/X11R6/lib/modules/fonts/libbitmap.a is
> > unresolved!
> > 
> >Do any one has ever try this??  Do any one can tell me how to prof
> > xxx_dri.so ??
> 
> You can only build what's inside xc/lib/GL with GlxSoProf set to YES.
> What you'll need to do is build the tree as usual, then do the
> following:
> 
>   
>   cd xc/lib/GL
>   make 
>   make Makefile
>   make Makefiles
>   make
>   make install

Shouldn't it work for the whole tree if we provided a wrapper for mcount
and whatever for the modules?


-- 
Earthling Michel Dänzer (MrCooper)/ Debian GNU/Linux (powerpc) developer
XFree86 and DRI project member   /  CS student, Free Software enthusiast

___
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel



RE: [Dri-devel] How to build DRI to use gprof see profile data

2002-02-04 Thread Gareth Hughes

> Shouldn't it work for the whole tree if we provided a wrapper for mcount
> and whatever for the modules?

Possibly not, given the method we use to actually process the profiling
data.  Besides, it's never been a priority -- the current method works
great for the 3D drivers.

-- Gareth

___
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel



RE: [Dri-devel] How to build DRI to use gprof see profile data

2002-02-04 Thread =?x-unknown?b?s1y5xab2?=


Thanks for Gareth Help,
Now , I've build Xserver , and install it
successful

When I run glxgears,
it print out glx_init_prof, and glx_fini_prof.
But, how to produce gmon.out ??

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 ??

Sorry, I can't find some documents about it detail,
I only found Keith Whitwell post on this maillist
when 02/16/2000, and it seems out of date.


  Thanks

  junkers



On Mon, 4 Feb 2002, Gareth Hughes wrote:

> > Hello, Every body:
> >  
> >  Do any know how to build Xserver and DRI that can see profiling
> >  data through  gprof?? I've see there is an option in host.def(in )
> >  DRI cvs):
> > 
> > /* To do profiling of the dynamically loaded 'xyz_dri.so' object, turn
> >  * this on.
> >  * Use 'xc/lib/GL/makeprofile.sh' to make it work.
> >  */
> > /* #define GlxSoProf YES */
> > 
> > #ifdef GlxSoProf
> > #  undef DefaultCCOptions
> > #  define DefaultCCOptions -ansi GccWarningOptions -pipe -g -p
> > #endif
> > 
> >but if I enable #define GlxSoProf YES, then try to build Xserver
> >  (after make lowpc.o, highpc.o by hand).When I start Xserver 
> > , it cause
> >  unsolved symbol and core dump.
> > 
> > Symbol mcount from modules /usr/X11R6/lib/modules/fonts/libbitmap.a is
> > unresolved!
> > 
> >Do any one has ever try this??  Do any one can tell me how to prof
> > xxx_dri.so ??
> 
> You can only build what's inside xc/lib/GL with GlxSoProf set to YES.
> What you'll need to do is build the tree as usual, then do the
> following:
> 
>   
>   cd xc/lib/GL
>   make 
>   make Makefile
>   make Makefiles
>   make
>   make install
> 
> Keith Whitwell can correct me if I'm wrong (it's been a while since I've
> done this).  I think there's some documentation about this somewhere...
> 
> -- Gareth
> 


___
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel



Re: [Dri-devel] How to build DRI to use gprof see profile data

2002-02-25 Thread Michael

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 -  1.4
+++ makeprofile.sh  25 Feb 2002 23:02:33 -
@@ -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; }