RFR: 8015759: hotspot changes needed to compile with Visual Studio 2012

Yumin Qi yumin.qi at oracle.com
Tue Jul 16 17:21:40 UTC 2013


Filed: https://jbs.oracle.com/bugs/browse/JDK-8020622

Thanks
Yumin
On 7/16/2013 9:21 AM, Tim Bell wrote:
> Hi Yumin:
>
> Thanks for looking at this.
>
>> The patch works fine when using build.bat to build hotspot on 
>> Windows, there is one issue with create.bat, which will fail to 
>> create project file for VS2012.
>>   I tried to work this around to create a VS2010 project, see URL: 
>> http://javaweb.us.oracle.com/~yqi/webrev/vs2012build/ 
>> <http://javaweb.us.oracle.com/%7Eyqi/webrev/vs2012build/>
>>   The only two files: create.bat and rules.make changed for this 
>> purpose.
>>
>>   The created project files, for i486, open with VS2012 OK, but 
>> amd-64 will hang, I have no time to check the detail why it hangs.
>>   This may be need addressed in a separate bug. I am OK with the 
>> current changes, it works fine for build.
>
> Please file a new bug against build.bat.
>
> In my experience, moving from VS2010 to VS2012 is a one-way trip. The 
> project files have changed format considerably, so once you move 
> forward you cannot go back on that source tree without reverting the 
> changes.  It has been a while, but I recall build.bat is doing some 
> clever things that rely on the internal format of the VS files, and if 
> so it will need to be updated.
>
> Tim
>
>>   The failure is because we dont have set properly for the project 
>> setting, so it default to VC7, which is not right.
>>
>>     Writing .vcproj file: 
>> D:\yqi\ws\8016538-build\build\vs-amd64\jvm.vcproj
>> java.lang.NullPointerException
>>         at 
>> WinGammaPlatformVC7.writeConfiguration(WinGammaPlatformVC7.java:153)
>>         at 
>> WinGammaPlatformVC7.writeProjectFile(WinGammaPlatformVC7.java:62)
>>         at WinGammaPlatform.createVcproj(WinGammaPlatform.java:270)
>>         at ProjectCreator.main(ProjectCreator.java:93)
>> NMAKE : fatal error U1077: 'd:\yqi\jdks\windows-i586\bin\java.EXE' : 
>> return code '0x1'
>> Stop.
>>
>>
>> Thanks
>> Yumin
>>
>>
>> On 7/15/2013 6:04 PM, David Holmes wrote:
>>> On 15/07/2013 10:29 PM, Tim Bell wrote:
>>>> David, Anthony :
>>>>
>>>> Thank you for the review.
>>>>
>>>> David wrote:
>>>>
>>>>> Only concern is that we may want to separate out the
>>>>> make/jprt.properties change, otherwise we can't push this until the
>>>>> switch to the new compilers has been officially approved. It may be
>>>>> easier to put the vs2012 support in place first and make the switch
>>>>> itself later.
>>>>
>>>> I completely agree - separate out the make/jprt.properties change. 
>>>> Could
>>>> I get a sponsor to push the changes to the other four files to
>>>> hotspot-runtime ASAP?
>>>
>>> I will sponsor it for you. I'll use the existing patch and revert 
>>> the jprt change.
>>>
>>> Thanks,
>>> David
>>>
>>>>
>>>> Tim
>>>>
>>>>
>>>> On 07/14/13 09:20 PM, David Holmes wrote:
>>>>> Hi Tim,
>>>>>
>>>>> This looks okay to me.
>>>>>
>>>>> Only concern is that we may want to separate out the
>>>>> make/jprt.properties change, otherwise we can't push this until the
>>>>> switch to the new compilers has been officially approved. It may be
>>>>> easier to put the vs2012 support in place first and make the switch
>>>>> itself later.
>>>>>
>>>>> David
>>>>>
>>>>> On 13/07/2013 9:51 PM, Tim Bell wrote:
>>>>>> Hello everyone-
>>>>>>
>>>>>> Many thanks for the early feedback on this JDK8 hotspot + VS2012
>>>>>> project.
>>>>>>
>>>>>> A revised webrev is here:
>>>>>>
>>>>>> http://cr.openjdk.java.net/~tbell/8015759/hotspot/webrev.01/
>>>>>>
>>>>>> These changes build and pass all of the standard 119 tests (as 
>>>>>> listed in
>>>>>> the jprt.properties file - see below) when using VS2012 and also 
>>>>>> using
>>>>>> VS2010.
>>>>>>
>>>>>> Thanks in advance for any feedback-
>>>>>>
>>>>>> Tim
>>>>>>
>>>>>> *** Build targets:
>>>>>>    windows_i586_5.1-product with attributes compiler=VS2010 (or 
>>>>>> i586_6.1
>>>>>> VS2012)
>>>>>>    windows_i586_5.1-fastdebug with attributes compiler=VS2010 (or
>>>>>> i586_6.1 VS2012)
>>>>>>    windows_x64_5.2-product with attributes compiler=VS2010 (or 
>>>>>> i586_6.1
>>>>>> VS2012)
>>>>>>    windows_x64_5.2-fastdebug with attributes compiler=VS2010 (or
>>>>>> i586_6.1 VS2012)
>>>>>>
>>>>>> *** Test targets:
>>>>>>    windows_i586-product-c1-jvm98
>>>>>>    windows_i586-product-c2-jvm98
>>>>>>    windows_i586-fastdebug-c1-jvm98
>>>>>>    windows_i586-fastdebug-c2-jvm98
>>>>>>    windows_i586-product-c2-jvm98_nontiered
>>>>>>    windows_i586-fastdebug-c2-jvm98_nontiered
>>>>>>    windows_i586-product-c1-scimark
>>>>>>    windows_i586-product-c2-scimark
>>>>>>    windows_i586-fastdebug-c1-scimark
>>>>>>    windows_i586-fastdebug-c2-scimark
>>>>>>    windows_i586-product-c1-runThese
>>>>>>    windows_i586-product-c2-runThese
>>>>>>    windows_i586-product-c1-runThese_Xcomp
>>>>>>    windows_i586-product-c2-runThese_Xcomp
>>>>>>    windows_i586-fastdebug-c1-runThese_Xshare
>>>>>>    windows_i586-product-c1-GCBasher_SerialGC
>>>>>>    windows_i586-product-c2-GCBasher_SerialGC
>>>>>>    windows_i586-fastdebug-c1-GCBasher_SerialGC
>>>>>>    windows_i586-fastdebug-c2-GCBasher_SerialGC
>>>>>>    windows_i586-product-c1-GCBasher_ParallelGC
>>>>>>    windows_i586-product-c2-GCBasher_ParallelGC
>>>>>>    windows_i586-fastdebug-c1-GCBasher_ParallelGC
>>>>>>    windows_i586-fastdebug-c2-GCBasher_ParallelGC
>>>>>>    windows_i586-product-c1-GCBasher_ParNewGC
>>>>>>    windows_i586-product-c2-GCBasher_ParNewGC
>>>>>>    windows_i586-fastdebug-c1-GCBasher_ParNewGC
>>>>>>    windows_i586-fastdebug-c2-GCBasher_ParNewGC
>>>>>>    windows_i586-product-c1-GCBasher_CMS
>>>>>>    windows_i586-product-c2-GCBasher_CMS
>>>>>>    windows_i586-fastdebug-c1-GCBasher_CMS
>>>>>>    windows_i586-fastdebug-c2-GCBasher_CMS
>>>>>>    windows_i586-product-c1-GCBasher_G1
>>>>>>    windows_i586-product-c2-GCBasher_G1
>>>>>>    windows_i586-fastdebug-c1-GCBasher_G1
>>>>>>    windows_i586-fastdebug-c2-GCBasher_G1
>>>>>>    windows_i586-product-c1-GCBasher_ParOldGC
>>>>>>    windows_i586-product-c2-GCBasher_ParOldGC
>>>>>>    windows_i586-fastdebug-c1-GCBasher_ParOldGC
>>>>>>    windows_i586-fastdebug-c2-GCBasher_ParOldGC
>>>>>>    windows_i586-product-c1-GCOld_SerialGC
>>>>>>    windows_i586-product-c2-GCOld_SerialGC
>>>>>>    windows_i586-product-c1-GCOld_ParallelGC
>>>>>>    windows_i586-product-c2-GCOld_ParallelGC
>>>>>>    windows_i586-product-c1-GCOld_ParNewGC
>>>>>>    windows_i586-product-c2-GCOld_ParNewGC
>>>>>>    windows_i586-product-c1-GCOld_CMS
>>>>>>    windows_i586-product-c2-GCOld_CMS
>>>>>>    windows_i586-product-c1-GCOld_G1
>>>>>>    windows_i586-product-c2-GCOld_G1
>>>>>>    windows_i586-product-c1-GCOld_ParOldGC
>>>>>>    windows_i586-product-c2-GCOld_ParOldGC
>>>>>>    windows_i586-product-c1-jbb_default
>>>>>>    windows_i586-product-c2-jbb_default
>>>>>>    windows_i586-fastdebug-c1-jbb_default
>>>>>>    windows_i586-fastdebug-c2-jbb_default
>>>>>>    windows_i586-product-c2-jbb_default_nontiered
>>>>>>    windows_i586-fastdebug-c2-jbb_default_nontiered
>>>>>>    windows_i586-product-c1-jbb_ParallelGC
>>>>>>    windows_i586-product-c2-jbb_ParallelGC
>>>>>>    windows_i586-product-c1-jbb_CMS
>>>>>>    windows_i586-product-c2-jbb_CMS
>>>>>>    windows_i586-product-c1-jbb_G1
>>>>>>    windows_i586-product-c2-jbb_G1
>>>>>>    windows_i586-product-c1-jbb_ParOldGC
>>>>>>    windows_i586-product-c2-jbb_ParOldGC
>>>>>>    windows_x64-product-c2-jvm98
>>>>>>    windows_x64-fastdebug-c2-jvm98
>>>>>>    windows_x64-product-c2-jvm98_nontiered
>>>>>>    windows_x64-fastdebug-c2-jvm98_nontiered
>>>>>>    windows_x64-product-c2-scimark
>>>>>>    windows_x64-fastdebug-c2-scimark
>>>>>>    windows_x64-product-c2-runThese
>>>>>>    windows_x64-product-c2-runThese_Xcomp
>>>>>>    windows_x64-product-c2-GCBasher_SerialGC
>>>>>>    windows_x64-fastdebug-c2-GCBasher_SerialGC
>>>>>>    windows_x64-product-c2-GCBasher_ParallelGC
>>>>>>    windows_x64-fastdebug-c2-GCBasher_ParallelGC
>>>>>>    windows_x64-product-c2-GCBasher_ParNewGC
>>>>>>    windows_x64-fastdebug-c2-GCBasher_ParNewGC
>>>>>>    windows_x64-product-c2-GCBasher_CMS
>>>>>>    windows_x64-fastdebug-c2-GCBasher_CMS
>>>>>>    windows_x64-product-c2-GCBasher_G1
>>>>>>    windows_x64-fastdebug-c2-GCBasher_G1
>>>>>>    windows_x64-product-c2-GCBasher_ParOldGC
>>>>>>    windows_x64-fastdebug-c2-GCBasher_ParOldGC
>>>>>>    windows_x64-product-c2-GCOld_SerialGC
>>>>>>    windows_x64-fastdebug-c2-GCOld_SerialGC
>>>>>>    windows_x64-product-c2-GCOld_ParallelGC
>>>>>>    windows_x64-fastdebug-c2-GCOld_ParallelGC
>>>>>>    windows_x64-product-c2-GCOld_ParNewGC
>>>>>>    windows_x64-fastdebug-c2-GCOld_ParNewGC
>>>>>>    windows_x64-product-c2-GCOld_CMS
>>>>>>    windows_x64-fastdebug-c2-GCOld_CMS
>>>>>>    windows_x64-product-c2-GCOld_G1
>>>>>>    windows_x64-fastdebug-c2-GCOld_G1
>>>>>>    windows_x64-product-c2-GCOld_ParOldGC
>>>>>>    windows_x64-fastdebug-c2-GCOld_ParOldGC
>>>>>>    windows_x64-product-c2-jbb_default
>>>>>>    windows_x64-fastdebug-c2-jbb_default
>>>>>>    windows_x64-product-c2-jbb_default_nontiered
>>>>>>    windows_x64-fastdebug-c2-jbb_default_nontiered
>>>>>>    windows_x64-product-c2-jbb_CMS
>>>>>>    windows_x64-product-c2-jbb_ParallelGC
>>>>>>    windows_x64-product-c2-jbb_G1
>>>>>>    windows_x64-product-c2-jbb_ParOldGC
>>>>>>    windows_i586-fastdebug-c1-clienttest
>>>>>>    windows_i586-product-c1-clienttest
>>>>>>    windows_i586-fastdebug-c2-servertest
>>>>>>    windows_i586-product-c2-servertest
>>>>>>    windows_x64-fastdebug-c2-servertest
>>>>>>    windows_x64-product-c2-servertest
>>>>>>    windows_i586-fastdebug-c2-internalvmtests
>>>>>>    windows_x64-fastdebug-c2-internalvmtests
>>>>>>    windows_i586-product-c2-wbapitest
>>>>>>    windows_i586-fastdebug-c2-wbapitest
>>>>>>    windows_x64-product-c2-wbapitest
>>>>>>    windows_x64-fastdebug-c2-wbapitest
>>>>>>    windows_i586-product-c1-wbapitest
>>>>>>    windows_i586-fastdebug-c1-wbapitest
>>>>>>
>>>>>>
>>>>>> On 06/ 3/13 06:41 AM, Daniel D. Daugherty wrote:
>>>>>>> On 6/1/13 11:02 AM, Tim Bell wrote:
>>>>>>>> 8015759: hotspot changes needed to compile with Visual Studio 2012
>>>>>>>>
>>>>>>>> The bug report will be visible in a few days here:
>>>>>>>> http://bugs.sun.com/view_bug.do?bug_id=8015759
>>>>>>>>
>>>>>>>> Minor Makefile changes and one source file was touched to compile
>>>>>>>> with Visual Studio 2012.  These changes also compile under
>>>>>>>> Visual Studio 2010 with no problem so we can upgrade gracefully.
>>>>>>>> Tested by building the forest with both compilers.
>>>>>>>>
>>>>>>>> % hg status
>>>>>>>> M make/windows/makefiles/compile.make
>>>>>>>
>>>>>>>     same question about the STATIC_CPPLIB stuff as David H.
>>>>>>>
>>>>>>>
>>>>>>>> M make/windows/makefiles/sanity.make
>>>>>>>
>>>>>>>     No comments.
>>>>>>>
>>>>>>>
>>>>>>>> M make/windows/makefiles/vm.make
>>>>>>>
>>>>>>>     Same question about the new 'ifdef DEVELOP' change as David H.
>>>>>>>
>>>>>>>     Sanity check: The patch shows this change:
>>>>>>>
>>>>>>>  # Special case files not using precompiled header files.
>>>>>>>
>>>>>>> -c1_RInfo_$(Platform_arch).obj:
>>>>>>> $(WorkSpace)\src\cpu\$(Platform_arch)\vm\c1_RInfo_$(Platform_arch).cpp 
>>>>>>>
>>>>>>> +c1_RInfo_$(Platform_arch).obj:
>>>>>>> $(WorkSpace)\src\cpu\$(Platform_arch)\vm\c1_RInfo_$(Platform_arch).cpp 
>>>>>>>
>>>>>>>       $(CXX) $(CXX_FLAGS) $(CXX_DONT_USE_PCH) /c
>>>>>>> $(WorkSpace)\src\cpu\$(Platform_arch)\vm\c1_RInfo_$(Platform_arch).cpp 
>>>>>>>
>>>>>>>
>>>>>>>     But I don't see a change. And this diff doesn't show up in the
>>>>>>>     other views.  Oh wait, there's a blank at the end of the '+'
>>>>>>>     line...
>>>>>>>
>>>>>>>> M src/os_cpu/windows_x86/vm/unwind_windows_x86.hpp
>>>>>>>
>>>>>>>     No comments.
>>>>>>>
>>>>>>> Dan
>>>>>>>
>>>>>>>
>>>>>>>>
>>>>>>>> webrev and patch file are here:
>>>>>>>>
>>>>>>>> http://cr.openjdk.java.net/~tbell/8015759/hotspot/webrev.00/
>>>>>>>> http://cr.openjdk.java.net/~tbell/8015759/hotspot/webrev.00/hotspot.patch 
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Thanks to Anthony Petrov who provided the initial set of 
>>>>>>>> patches for
>>>>>>>> this work.
>>>>>>>>
>>>>>>>> I believe this should go in via the hotspot-rt forest (let me 
>>>>>>>> know if
>>>>>>>> that is not correct), in which case I will need a sponsor from 
>>>>>>>> that
>>>>>>>> team to push the change.
>>>>>>>>
>>>>>>>> Thanks in advance-
>>>>>>>> Tim
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>
>>>>
>>
>




More information about the build-dev mailing list