EPICS Controls Argonne National Laboratory

Experimental Physics and
Industrial Control System

2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024  Index 2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
<== Date ==> <== Thread ==>

Subject: RE: Port of EPICS 3.14.9 to ETRAX CRIS architecture - Strange Data - Optimization issues
From: "Jeff Hill" <[email protected]>
To: "'Peter Zumbruch'" <[email protected]>
Cc: "'EPICS core-talk'" <[email protected]>
Date: Thu, 23 Aug 2007 11:59:26 -0600
Hello Peter,

Thanks for your clarification. I must admit that it was really a bad idea to
code member functions such as printf, vprintf, etc. 

I created Mantis 297 to track this issue, and have committed a fix to cvs on
the R3.14 branch as well as also the main trunk.

Jeff

-----Original Message-----
From: Peter Zumbruch [mailto:[email protected]] 
Sent: Thursday, August 23, 2007 4:06 AM
To: Jeff Hill
Subject: Re: Port of EPICS 3.14.9 to ETRAX CRIS architecture - Strange Data
- Optimization issues

Hello Jeff,
concerning the optimization level:
>> The optimization -O3 had to be replaced by -Os or the 
>> default -O0 to be able to compile.
>>     
> Typically changing the optimization level has an impact only on the object
> code and therefore on what is executed at runtime (we hope that -O3 will
run
> correctly and hopefully also more efficiently compared -O0), but does not
> have an impact on whether the source code will successfully compile or
not.
> I am interpreting the above statement to imply that the source code
wouldn?t
> compile successfully into object code under -O3, but given my expectations
> of compilers I suspect that maybe I am suffering from a misunderstanding.
So
> I am curious, which was the result with -O3?
> A) failure to produce object code, or
> B) production of object code with runtime behavior even worse than what is
> described in your mail message, or
> C) You set the optimization to -O0 based on recent discussions about EPICS
> R3.14.9 being incompatible with gcc 3.2.3 -O3
>   
>> The cross-compiler used is a gnu-compiler provided by axis:
>> cris-gcc --version: cris-axis-elf-gcc (GCC) 3.2.1 Axis release R64/1.64
>>     
It is case (A):
Here the outcome of a complete make distclean && make rebuild for all levels
(I replaced the paths by <path> symbols)

Summary:
cases 1-3 fail, at the same place (not knowing the templates??)
cases 4-5 compile

1) optimization -O3:

<CROSS_COMPILER>/bin/cris-axis-linux-gnu-g++ -c 
-D_POSIX_C_SOURCE=199506L -D_POSIX_THREADS -D_XOPEN_SOURCE=500 -D_cris_ 
-mlinux -DUNIX -D_BSD_SOURCE -Dlinux-D_REENTRANT -ansi -O3 -Wall 
-mno-mul-bug-workaround -march=v10 -g -mlinux -I. -I.. 
-I../../../include/os/Linux -I../../../include -isystem 
<CROSS_COMPILER_INCLUDE>/cris-axis-linux-gnu/include -isystem 
<CROSS_COMPILER_INCLUDE>/cris-axis-linux-gnu/usr/include ../casw.cpp
In file included from ../../../include/osiWireFormat.h:265,
from ../casw.cpp:28:
../../../include/os/Linux/osdWireFormat.h:67:5: warning: #warning little 
endian defined
In file included from ../udpiiu.h:49,
from ../casw.cpp:31:
../repeaterSubscribeTimer.h:41: parse error before `&' token
In file included from ../casw.cpp:31:
../udpiiu.h:260: parse error before `&' token
make[3]: *** [casw.o] Error 1
make[3]: Leaving directory 
`<EPICS_HOME>/base-3.14.9/src/ca/O.linux-cris_v10'
make[2]: *** [install.linux-cris_v10] Error 2
make[2]: Leaving directory `<EPICS_HOME>/base-3.14.9/src/ca'
make[1]: *** [ca.install] Error 2
make[1]: Leaving directory `<EPICS_HOME>/base-3.14.9/src'
make: *** [src.install] Error 2

2) optimization -O2:

<CROSS_COMPILER>/bin/cris-axis-linux-gnu-g++ -c 
-D_POSIX_C_SOURCE=199506L -D_POSIX_THREADS -D_XOPEN_SOURCE=500 -D_cris_ 
-mlinux -DUNIX -D_BSD_SOURCE -Dlinux-D_REENTRANT -ansi -O2 -Wall 
-mno-mul-bug-workaround -march=v10 -g -mlinux -I. -I.. 
-I../../../include/os/Linux -I../../../include -isystem 
<CROSS_COMPILER_INCLUDE>/cris-axis-linux-gnu/include -isystem 
<CROSS_COMPILER_INCLUDE>/cris-axis-linux-gnu/usr/include ../casw.cpp
In file included from ../../../include/osiWireFormat.h:265,
from ../casw.cpp:28:
../../../include/os/Linux/osdWireFormat.h:67:5: warning: #warning little 
endian defined
In file included from ../udpiiu.h:49,
from ../casw.cpp:31:
../repeaterSubscribeTimer.h:41: parse error before `&' token
In file included from ../casw.cpp:31:
../udpiiu.h:260: parse error before `&' token
make[3]: *** [casw.o] Error 1
make[3]: Leaving directory 
`<EPICS_HOME>/base-3.14.9/src/ca/O.linux-cris_v10'
make[2]: *** [install.linux-cris_v10] Error 2
make[2]: Leaving directory `<EPICS_HOME>/base-3.14.9/src/ca'
make[1]: *** [ca.install] Error 2
make[1]: Leaving directory `<EPICS_HOME>/base-3.14.9/src'
make: *** [src.install] Error 2

3) optimization -O1:

<CROSS_COMPILER>/bin/cris-axis-linux-gnu-g++ -c 
-D_POSIX_C_SOURCE=199506L -D_POSIX_THREADS -D_XOPEN_SOURCE=500 -D_cris_ 
-mlinux -DUNIX -D_BSD_SOURCE -Dlinux-D_REENTRANT -ansi -O1 -Wall 
-mno-mul-bug-workaround -march=v10 -g -mlinux -I. -I.. 
-I../../../include/os/Linux -I../../../include -isystem 
<CROSS_COMPILER_INCLUDE>/cris-axis-linux-gnu/include -isystem 
<CROSS_COMPILER_INCLUDE>/cris-axis-linux-gnu/usr/include ../casw.cpp
In file included from ../../../include/osiWireFormat.h:265,
from ../casw.cpp:28:
../../../include/os/Linux/osdWireFormat.h:67:5: warning: #warning little 
endian defined
In file included from ../udpiiu.h:49,
from ../casw.cpp:31:
../repeaterSubscribeTimer.h:41: parse error before `&' token
In file included from ../casw.cpp:31:
../udpiiu.h:260: parse error before `&' token
make[3]: *** [casw.o] Error 1
make[3]: Leaving directory 
`<EPICS_HOME>/base-3.14.9/src/ca/O.linux-cris_v10'
make[2]: *** [install.linux-cris_v10] Error 2
make[2]: Leaving directory `<EPICS_HOME>/base-3.14.9/src/ca'
make[1]: *** [ca.install] Error 2
make[1]: Leaving directory `<EPICS_HOME>/base-3.14.9/src'
make: *** [src.install] Error 2

4) optimization -00 (no problem)
<CROSS_COMPILER>/bin/cris-axis-linux-gnu-g++ -c 
-D_POSIX_C_SOURCE=199506L -D_POSIX_THREADS -D_XOPEN_SOURCE=500 -D_cris_ 
-mlinux -DUNIX -D_BSD_SOURCE -Dlinux-D_REENTRANT -ansi -O0 -Wall 
-mno-mul-bug-workaround -march=v10 -g -mlinux -I. -I.. 
-I../../../include/os/Linux -I../../../include -isystem 
<CROSS_COMPILER_INCLUDE>/cris-axis-linux-gnu/include -isystem 
<CROSS_COMPILER_INCLUDE>/cris-axis-linux-gnu/usr/include ../casw.cpp
In file included from ../../../include/osiWireFormat.h:265,
from ../casw.cpp:28:
../../../include/os/Linux/osdWireFormat.h:67:5: warning: #warning little 
endian defined

5) optimization -0s (no problem)

<CROSS_COMPILER>/bin/crisv32-axis-linux-gnu-g++ -c 
-D_POSIX_C_SOURCE=199506L -D_POSIX_THREADS -D_XOPEN_SOURCE=500 -D_cris_ 
-mlinux -DUNIX -D_BSD_SOURCE -Dlinux -D_REENTRANT -ansi -Os -Wall 
-mno-mul-bug-workaround -march=v32 -g -mlinux -I. -I.. 
-I../../../include/os/Linux -I../../../include -isystem 
<CROSS_COMPILER_INCLUDE>/crisv32-axis-linux-gnu/include -isystem 
<CROSS_COMPILER_INCLUDE>/crisv32-axis-linux-gnu/usr/include ../casw.cpp
In file included from ../../../include/osiWireFormat.h:265,
from ../casw.cpp:28:
../../../include/os/Linux/osdWireFormat.h:67:5: warning: #warning little 
endian defined

A colleague stated in an earlier test:
" you cannot overload system function(fprintf) as the class method, if 
you turn on -03". I haven't checked this statement yet, but take it as a 
possible hint.

Best regards,
Peter

-- 
 Dr. Peter W. Zumbruch                                  
 EE - department / Controls group / GSI
 E-Mail: [email protected] 
 Tel: +49-(6159)-71-1435 / Fax: +49-(6159)-71-2986
      
 Gesellschaft für Schwerionenforschung mbH 
 Planckstraße 1 / D-64291 Darmstadt / www.gsi.de

 Gesellschaft mit beschränkter Haftung
 Sitz der Gesellschaft: Darmstadt
 Handelsregister: Amtsgericht Darmstadt, HRB 1528

 Geschäftsführer: Professor Dr. Horst Stöcker, Dr. Alexander Kurz
 Vorsitzende des Aufsichtsrates: Dr. Beatrix Vierkorn-Rudolph,
 Stellvertreter: Ministerialdirigent Dr. Rolf Bernhardt




Navigate by Date:
Prev: RE: generalTime update Denison, PN (Peter)
Next: osdWireConfig.h Jeff Hill
Index: 2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
Navigate by Thread:
Prev: RE: generalTime update Denison, PN (Peter)
Next: osdWireConfig.h Jeff Hill
Index: 2002  2003  2004  2005  2006  <20072008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  2024 
ANJ, 02 Feb 2012 Valid HTML 4.01! · Home · News · About · Base · Modules · Extensions · Distributions · Download ·
· Search · EPICS V4 · IRMIS · Talk · Bugs · Documents · Links · Licensing ·