From 03788d6b4fb8e06290a6ecedc8da863071dc4aa8 Mon Sep 17 00:00:00 2001 From: Kuai Wei Date: Thu, 12 Sep 2019 15:15:27 +0800 Subject: [PATCH] [JWarmUp] change for windows build Summary: change build script and to code to support windows platform Test Plan: existing test cases Reviewers: shiyue, chuansheng Issue: https://aone.alibaba-inc.com/task/22514166 CR: --- make/windows/makefiles/vm.make | 4 ++++ src/share/vm/jwarmup/jitWarmUp.cpp | 6 +++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/make/windows/makefiles/vm.make b/make/windows/makefiles/vm.make index 142843481..7c6b980cb 100644 --- a/make/windows/makefiles/vm.make +++ b/make/windows/makefiles/vm.make @@ -168,6 +168,7 @@ VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/services VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/trace VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/utilities VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/libadt +VM_PATH=$(VM_PATH);$(WorkSpace)/src/share/vm/jwarmup VM_PATH=$(VM_PATH);$(WorkSpace)/src/os/windows/vm VM_PATH=$(VM_PATH);$(WorkSpace)/src/os_cpu/windows_$(Platform_arch)/vm VM_PATH=$(VM_PATH);$(WorkSpace)/src/cpu/$(Platform_arch)/vm @@ -276,6 +277,9 @@ bytecodeInterpreterWithChecks.obj: ..\generated\jvmtifiles\bytecodeInterpreterWi {$(COMMONSRC)\share\vm\libadt}.cpp.obj:: $(CXX) $(CXX_FLAGS) $(CXX_USE_PCH) /c $< +{$(COMMONSRC)\share\vm\jwarmup}.cpp.obj:: + $(CXX) $(CXX_FLAGS) $(CXX_USE_PCH) /c $< + {$(COMMONSRC)\share\vm\opto}.cpp.obj:: $(CXX) $(CXX_FLAGS) $(CXX_USE_PCH) /c $< diff --git a/src/share/vm/jwarmup/jitWarmUp.cpp b/src/share/vm/jwarmup/jitWarmUp.cpp index 6a7addc54..5b2350432 100644 --- a/src/share/vm/jwarmup/jitWarmUp.cpp +++ b/src/share/vm/jwarmup/jitWarmUp.cpp @@ -385,7 +385,7 @@ void ProfileRecorder::write_u8(u8 value) { void ProfileRecorder::write_string(const char* src, size_t len) { _logfile->write(src, len); _logfile->write("\0", 1); - _pos += len + 1; + _pos += (unsigned int)len + 1; update_max_symbol_length((int)len); } @@ -461,7 +461,7 @@ void ProfileRecorder::write_header() { _pos += RECORD_COUNTS_WIDTH; offset += RECORD_COUNTS_WIDTH; // record time - *(unsigned jlong*)((char*)header_buf + offset) = os::javaTimeMillis(); + *(jlong*)((char*)header_buf + offset) = os::javaTimeMillis(); _pos += TIME_WIDTH; offset += TIME_WIDTH; // write to file @@ -1618,7 +1618,7 @@ bool JitWarmUpLogParser::parse_header() { } #define CREATE_SYMBOL(char_name) \ - SymbolTable::new_symbol(char_name, strlen(char_name), Thread::current()) + SymbolTable::new_symbol(char_name, (int)strlen(char_name), Thread::current()) bool JitWarmUpLogParser::parse_class_init_section() { ResourceMark rm; -- GitLab