--- old/src/jdk.hotspot.agent/linux/native/libsaproc/libproc_impl.c 2017-04-13 09:11:36.842743647 -0700 +++ new/src/jdk.hotspot.agent/linux/native/libsaproc/libproc_impl.c 2017-04-13 09:11:36.694740967 -0700 @@ -26,7 +26,9 @@ #include #include #include +#ifdef INCLUDE_SA_ATTACH #include +#endif #include "libproc_impl.h" #define SA_ALTROOT "SA_ALTROOT" @@ -116,11 +118,13 @@ // init debug mode _libsaproc_debug = debug; +#ifdef INCLUDE_SA_ATTACH // initialize the thread_db library if (td_init() != TD_OK) { print_debug("libthread_db's td_init failed\n"); return false; } +#endif return true; } @@ -273,6 +277,7 @@ } +#ifdef INCLUDE_SA_ATTACH // struct used for client data from thread_db callback struct thread_db_client_data { struct ps_prochandle* ph; @@ -324,7 +329,7 @@ td_ta_delete(thread_agent); return true; } - +#endif // INCLUDE_SA_ATTACH // get number of threads int get_num_threads(struct ps_prochandle* ph) {