Sender: jon AT blackhole DOT isdn DOT uiuc DOT edu Message-ID: <3767970F.307F679C@uiuc.edu> Date: Wed, 16 Jun 1999 07:22:39 -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: pgcc does better, reboot, then does terrible! Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Reply-To: pgcc AT delorie DOT com 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