8203802: Jvmti test fails to build with VS2017

Reviewed-by: sspitsyn, erikj
This commit is contained in:
Daniil Titov 2018-05-30 08:59:56 -07:00
parent c8abeeef90
commit de66432d4a
3 changed files with 10 additions and 4 deletions

View File

@ -851,8 +851,6 @@ ifeq ($(OPENJDK_TARGET_OS), windows)
BUILD_HOTSPOT_JTREG_EXECUTABLES_CFLAGS_exeFPRegs := -MT
BUILD_HOTSPOT_JTREG_EXCLUDE += exesigtest.c
# Disable warning until JDK-8203802 is fixed
BUILD_HOTSPOT_JTREG_LIBRARIES_CFLAGS_libtimers += -wd4477
else
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libbootclssearch_agent += -lpthread
BUILD_HOTSPOT_JTREG_LIBRARIES_LIBS_libsystemclssearch_agent += -lpthread

View File

@ -364,10 +364,10 @@ Java_nsk_jvmti_unit_timers_JvmtiTest_Analyze(JNIEnv * env, jclass cls) {
}
#endif
if (passed) {
debug_printf("Pass: currThreadTime(%ld) >= %2.0f%% of threadTime(%ld)\n",
debug_printf("Pass: currThreadTime(" JLONG_FORMAT ") >= %2.0f%% of threadTime(" JLONG_FORMAT ")\n",
ctt, 100.0 - VARIANCE_PERCENT, tt);
} else {
printf("FAIL: currThreadTime(%ld) < %2.0f%% of threadTime(%ld)\n",
printf("FAIL: currThreadTime(" JLONG_FORMAT ") < %2.0f%% of threadTime(" JLONG_FORMAT ")\n",
ctt, 100.0 - VARIANCE_PERCENT, tt);
iGlobalStatus = 2;
}

View File

@ -27,9 +27,17 @@
/*************************************************************/
#include <stdarg.h>
#include <inttypes.h>
/*************************************************************/
#if defined(_LP64) && defined(__APPLE__)
#define JLONG_FORMAT "%ld"
#else // _LP64 && __APPLE__
#define JLONG_FORMAT "%" PRId64
#endif // _LP64 && __APPLE__
/**
* Use examples:
*