Re: svgalib & profiling

Search this archive.

From: Andy Mortimer (andy.mortimer@zetnet.co.uk)
Date: Sun 22 Apr 2001 - 12:15:29 IDT


Hi Todor,

Todor Prokopov <koprok@newmail.net> writes:

> 	I need to profile a program which uses libvga and libvgagl, but
> this doesn't seem to work. My program crashes, when it's compiled with
> profiling info (gcc -pg). I tryed to compile svgalib itself with -pg and
> all it's demo programs with -pg. Most of the demos do not work. vgatest
> does work only for few modes, for example 1, 2, 5, 6. It does work also
> from time to time for some other modes, but I haven't tryed all.
> 	Please tell me if there is some "general" problem with svgalib and
> profiling, or I do something wrong?

It may depend which version you are using, but I believe that 1.4.2 by
default uses the SIGPROF signal - which the profiler also uses - to
signal switching between virtual terminals.  When a Debian user hit
this problem, Matan's comment was:

+ pthreads use USR1 and USR2, so in order to get svgalib to work with
+ pthreads I had to change this. That was in libc5 time. I think that
+ glibc2 with linuxthreads does not use the signals, so it might be safe
+ to return to the old ones.

The signals to use are set near the end of libvga.h, so if you
compiled svgalib yourself, you can probably change it there and
recompile (maybe with a make clean beforehand just in case).

Regards,

Andy

-- 
Andy Mortimer                                 andy.mortimer@zetnet.co.uk
-- 
Andy walking, Andy tired,
Andy take a little snooze
    -- "Andy Warhol," David Bowie

------------------------------------------------------------------
Unsubscribe:  To:   listbot@svgalib.org
              Body: unsubscribe linux-svgalib


This archive was generated by hypermail 2.1.4 : Wed 21 Jan 2004 - 22:10:23 IST