Thomas Stüfe thomas.stuefe at gmail.com
Tue Jul 18 09:35:57 UTC 2017

Hi all,

a short and maybe stupid question, what is the precise difference between:

#ifndef PRODUCT


#ifdef ASSERT


I assume:

optimized: !PRODUCT && !ASSERT
xxxdebug: !PRODUCT && ASSERT
release:     PRODUCT && !ASSERT

is this true?

Also, when guarding pieces of performance-costly sanity checks, which one
should be used?

(I see both used sometimes. For example, MetaChunk::mangle() implementation
is guarded by !PRODUCT but its call is guarded once by ASSERT, once by
!PRODUCT, is that deliberate?)

Thanks, Thomas

More information about the hotspot-dev mailing list