Sender: jon AT blackhole DOT isdn DOT uiuc DOT edu Message-ID: <3768B5EE.A92B518F@uiuc.edu> Date: Thu, 17 Jun 1999 03:46:38 -0500 From: JonMcK X-Mailer: Mozilla 4.6 [en] (X11; I; Linux 2.2.5-22 i686) X-Accept-Language: en MIME-Version: 1.0 To: pgcc AT delorie DOT com Subject: Re: pgcc does better, reboot, then does terrible! References: <3767970F DOT 307F679C AT uiuc DOT edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: pgcc AT delorie DOT com Here's some additional info on the binaries(my physics code) where the first compiled with pgcc is fast, while after I rebooted linux the pgcc compiled is slow. In the binary itself(I have -pg) I noticed the following human readable differences(this is a chunk of contiguous binary data): SLOW: LPBIG_OFFBIG_LINTFLAGS:1115,;^@../include/getopt.h^@../posix/getopt.h^@ptrdiff_t:t(52,1)=(0,1)^@__gmon_start__:F(0,19)^@called:V(0,1)^@^@GCC: (GNU) egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)^@^@GCC: (GNU) egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)^@^@GCC: (GNU) egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)^@^@GCC: (GNU) pgcc-2.91.66 19990314 (egcs-1.1.2 release)^@^@GCC: (GNU) pgcc-2.91.66 19990314 (egcs-1.1.2 release)^@^@GCC: (GNU) pgcc-2.91.66 19990314 (egcs-1.1.2 release)^@^@GCC: (GNU) pgcc-2.91.66 19990314 (egcs-1.1.2 release)^@^@GCC: (GNU) pgcc-2.91.66 19990314 (egcs-1.1.2 release)^@^@GCC: (GNU) pgcc-2.91.66 19990314 (egcs-1.1.2 release)^@^@GCC: (GNU) pgcc-2.91.66 19990314 (egcs-1.1.2 release)^@^@GCC: (GNU) pgcc-2.91.66 19990314 (egcs-1.1.2 release)^@^@GCC: (GNU) pgcc-2.91.66 19990314 (egcs-1.1.2 release)^@^@GCC: (GNU) pgcc-2.91.66 19990314 (egcs-1.1.2 release)^@^@GCC: (GNU) pgcc-2.91.66 19990314 (egcs-1.1.2 release)^@^@GCC: (GNU) pgcc-2.91.66 19990314 (egcs-1.1.2 release)^@^@GCC: (GNU) egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)^^ FAST: LPBIG_OFFBIG_LINTFLAGS:1115,;^@../include/getopt.h^@../posix/getopt.h^@ptrdiff_t:t(52,1)=(0,1)^@__gmon_start__:F(0,19)^@called:V(0,1)^@^@GCC: (GNU) egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)^@^@GCC: (GNU) egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)^@^@GCC: (GNU) egcs-2.91.66 19990314/Linux (egcs-1.1.2 release) ^@^@GCC: (GNU) egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)^@^@GCC: (GNU) egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)^@^@GCC: (GNU) egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)^@^@GCC: (GNU) egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)^@^@GCC: (GNU) egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)^@^@GCC: (GNU) egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)^@^@GCC: (GNU) egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)^@^@GCC: (GNU) egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)^@^@GCC: (GNU) egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)^@^@GCC: (GNU) egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)^@^@GCC: (GNU) egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)^@^@GCC: (GNU) egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)^@^@GCC: (GNU) egcs-2.91.66 19990314/Linux (egcs-1.1.2 release)^^@^@^@^@^@^@^@^A^@^@^@01.01^@^@^^@^@^@^@^@^@^@^A^@^@^@01.01 Yes, I have the order right. If you'll notice the SLOW one mentions pgcc sometimes while the FAST one doesn't. BTW, the FAST one is a little larger than the SLOW one. I KNOW both were compiled with pgcc since I used -mcpu=pentiumpro -march=pentiumpro for both the above. What might be the source of the above difference? It may tell me what's different and so what I can fix. Anybody except newbies like me read this list?? What does binutils install when you install from the source? Library stuff at all? I think so. But what? And how do I revert to what redhat6.0 uses? I tried installing the binutils rpm but no speed changes. Thanks, Jon JonMcK wrote: > > I'm confused as heck. Here's some info: > > [jon AT blackhole Exe]$ gcc -v > Reading specs from > /usr/local/lib/gcc-lib/i686-pc-linux-gnu/pgcc-2.91.66/specs > gcc version pgcc-2.91.66 19990314 (egcs-1.1.2 release) > > ------- > > Here's my confusion. I'm programming some physics stuff. I've been > optimizing my code and thought I'd try out pgcc. Compiled it myself with > bootstrap and low and behold all the profile times decreased on my > P2-333/Redhat6.0 system. Happy days are here! > > Here's my CFLAGS: > CFLAGS = -Wall -mpentium -mcpu=pentiumpro -march=pentiumpro -O4 -pipe > -malign-loops=2 -malign-jumps=2 -malign-functions=2 --fast-math -pg > > -pg or not the problem below is the same. > > I read about binutils2.9.1 being needed for mmx, etc. so I decided to > compile->install that. I wasn't sure what version I already had, turns out > I think I had 2.9.1. Oddly, my compiled binutils files are huge! I didn't > realize "larger" meant 10X larger! Anyways, this isn't the problem. > > [jon AT blackhole Exe]$ ls -al /usr/bin/gprofold > -rwxr-xr-x 1 root root 95668 Apr 5 20:08 /usr/bin/gprofold > [jon AT blackhole Exe]$ ls -al /usr/local/bin/gprof > -rwxr-xr-x 1 root root 1045169 Jun 16 03:07 /usr/local/bin/gprof > > ------------ > > I then decided to recompile my kernel(2.2.5-22). That went fine, modules > installed, etc. I reboot and to my UTTER HORROR after checking some times > on my code it's all ALOT slower, by about 30%. Essentially losing 2 days > worth of optimizing!! > > Ok, I thought. Must be the kernel and/or modules. So I revert back to my > previous kernel/modules(I always have a backup). TO MY HORROR it's still > slow as heck! > > I looked at all my options, trying to see if I just happened to change > something, then I remember a directory where I compiled the old good > version. I run that binary, and it's FAST, just like it was before! I then > move that in a safe place and recompile with the EXACT same settings as that > FAST one was compiled. I run it, and it's SLOW! I compare the binaries and > they are DIFFERENT! > > Sorry, I've just been scratching my head for the past 4 hours. I'm a little > erked. > ---------- > > My questions: > > 1) WHAT THE HECK did I do? Could binutils do this? > > 2) The binaries are just 50k each, but the FAST one is a bit larger. WHY? > What changed? HELP! > > The above is what I did over a period of 2 hours or so, it's all that > happened! > > Please help me! > > Thanks, > Jonathan McKinney