Experimental Physics and Industrial Control System
On Freitag, 25. April 2008, Andrew Johnson wrote:
> Jeff Hill wrote:
> > 2) Standardize throughout base on a new flag controlling the removal of
> > high overhead consistency checking code and set this flag by default in
> > production (optimized) builds.
>
> If you're thinking about adding some expensive consistency checking that
> will significantly affect performance when enabled then I fully agree to
> having them disabled in production builds. However I don't particularly
> like the idea of having them enabled whenever the OPT flag is off, since
> it then becomes hard to separate out bugs that are caused by a compiler
> when optimization is turned on; I'd much prefer a separate switch which
> can be set on a per-subsystem or even per-compilation unit basis,
> separate from the compiler optimization switch.
Yes, definitely. Make it a separate global flag, easily (un-)settable in
CONFIG_SITE*. Beside your argument about optimization induced bugs, it is
important that users can test per application how great the performance
gain really is and decide for themselves whether it is worth the loss in
debugability.
Cheers
Ben
- References:
- Re: NDEBUG Andrew Johnson
- Navigate by Date:
- Prev:
Re: NDEBUG Andrew Johnson
- Next:
Re: Unresolved symbol: rtemsTicksPerSecond_double Andrew Johnson
- Index:
2002
2003
2004
2005
2006
2007
<2008>
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
- Navigate by Thread:
- Prev:
Re: NDEBUG Andrew Johnson
- Next:
Re: Unresolved symbol: rtemsTicksPerSecond_double Andrew Johnson
- Index:
2002
2003
2004
2005
2006
2007
<2008>
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024