RFR: 8078601: print_concurrent_locks should be guarded with INCLUDE_SERVICES

Staffan Larsen staffan.larsen at oracle.com
Fri Apr 24 15:08:31 UTC 2015


Looks good!

Thanks,
/Staffan

> On 24 apr 2015, at 16:41, Stefan Karlsson <stefan.karlsson at oracle.com> wrote:
> 
> Hi,
> 
> Please review this patch to fix an incorrect usage of #if INCLUDE_ALL_GCS.
> 
> http://cr.openjdk.java.net/~stefank/8078601/webrev.01/
> https://bugs.openjdk.java.net/browse/JDK-8078601
> 
> This code in thread.cpp is guarded by INCLUDE_ALL_GCS:
> #if INCLUDE_ALL_GCS
>  // Dump concurrent locks
>  ConcurrentLocksDump concurrent_locks;
>  if (print_concurrent_locks) {
>    concurrent_locks.dump_at_safepoint();
>  }
> #endif // INCLUDE_ALL_GCS
> 
> but the code is not specific to any of our non-Serial GCs. The code should be guarded by INCLUDE_SERVICES.
> 
> ConcurrentLocksDump::dump_at_safepoint() uses HeapInspection::find_instances_at_safepoint, which is declared in heapInspection.hpp:
>  static void find_instances_at_safepoint(Klass* k, GrowableArray<oop>* result) NOT_SERVICES_RETURN;
> 
> and heapInspection.cpp is excluded when INCLUDE_SERVICES is false. See: make/excludeSrc.make:
> 
> ifeq ($(INCLUDE_SERVICES), false)
>      CXXFLAGS += -DINCLUDE_SERVICES=0
>      CFLAGS += -DINCLUDE_SERVICES=0
> 
>      Src_Files_EXCLUDE += heapDumper.cpp heapInspection.cpp \
>        attachListener_linux.cpp attachListener.cpp
> endif
> 
> I've verified that this change builds with minimal1 and full HotSpot slowdebug build.
> 
> Thanks,
> Stefank



More information about the serviceability-dev mailing list