Coder Social home page Coder Social logo

codefollower / openjdk-research Goto Github PK

View Code? Open in Web Editor NEW
883.0 102.0 466.0 13.17 MB

OpenJDK(HotSpot JVM、Javac)源代码学习研究(包括代码注释、文档、用于代码分析的测试用例)

License: GNU General Public License v2.0

Shell 0.21% Java 28.57% C 2.76% C++ 65.95% Assembly 0.24% JavaScript 0.01% XSLT 0.37% Makefile 1.46% Batchfile 0.06% HTML 0.18% DTrace 0.20%

openjdk-research's Introduction

openjdk-research's People

Contributors

codefollower avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openjdk-research's Issues

build error occurred

我使用vs2013进行编译 把msvrc100 替换成msvcr120 为什么不行啊
报错:
$ make sanity 2>&1 | tee /cygdrive/f/openjdk/build.log
jdk/make/common/shared/Defs-windows.gmk:324: WARNING: No VS2010 available. No VS
100COMNTOOLS found on system. No WINDOWSSDKDIR found on system.
jdk/make/common/shared/Defs-windows.gmk:337: *** ERROR: No VS2010 found on syste
m.. Stop.

build error

OpenJDK-Research/hotspot/my-test/jni/api-test/ApiTest.c:6:10: fatal error:
'ApiTest.h' file not found

include "ApiTest.h"

     ^

1 error generated.
make[2]: *** [CMakeFiles/OpenJDK_Research.dir/hotspot/my-test/jni/api-test/ApiTest.c.o] Error 1
make[1]: *** [CMakeFiles/OpenJDK_Research.dir/all] Error 2
make: *** [all] Error 2

Microsoft Visual Studio 2010 应该使用英文版本

构建与调试-Windows.md中给出的 Microsoft Visual Studio 2010 链接为中文版本,我在实际构建时,发现中文版本的在运行 create.bat 时,会出现错误:

D:\HotSpotResearch\OpenJDK-Research\hotspot\/make/windows/get_msc_ver.sh: line 65: [: ▒▒▒▒ 80x86 ▒▒ Microsoft (R) 32 λ C/C++ ▒Ż▒▒▒▒▒▒▒ 16: integer expression expected
/usr/bin/expr: syntax error
**************************************************************
MSC_VER = ""
Will generate VC7 project {Visual Studio 2003 .NET}
D:\HotSpotResearch\OpenJDK-Research\hotspot\build\vs-i486\jvm.vcproj
**************************************************************
NOTE: Using the following settings:
  HotSpotWorkSpace=D:\HotSpotResearch\OpenJDK-Research\hotspot\
  HotSpotBuildSpace=D:\HotSpotResearch\OpenJDK-Research\hotspot\build\vs-i486
  HotSpotJDKDist=d:\jdk8
-- compiler1 --
D:\HotSpotResearch\OpenJDK-Research\hotspot\/make/windows/makefiles/compile.make(278) : fatal error U1023: 表达式中的语法错误
Stop.
-- compiler2 --
D:\HotSpotResearch\OpenJDK-Research\hotspot\/make/windows/makefiles/compile.make(278) : fatal error U1023: 表达式中的语法错误
Stop.
-- tiered --
D:\HotSpotResearch\OpenJDK-Research\hotspot\/make/windows/makefiles/compile.make(278) : fatal error U1023: 表达式中的语法错误
Stop.
D:\HotSpotResearch\OpenJDK-Research\hotspot\/make/windows/makefiles/compile.make(278) : fatal error U1023: 表达式中的语法错误

原因在于 cl.exe 使用的是中文版本

>cl
用于 80x86 的 Microsoft (R) 32 位 C/C++ 优化编译器 16.00.30319.01 版
版权所有(C) Microsoft Corporation。保留所有权利。

用法: cl [ 选项... ] 文件名... [ /link 链接选项... ]

因此,create 在调用脚本 get_msc_ver.sh时,由于脚本是针对英文版本的,所以无法得到 cl 的版本。

解决方案:

  • 保证 cl 是英文版本
  • 手动修改 get_msc_ver.sh

注释掉脚本中获取cl版本的代码, 并根据自己的cl版本手动设置

if [ "x$FORCE_MSC_VER" != "x" ]; then
  echo "MSC_VER=$FORCE_MSC_VER"
else
  #MSC_VER_RAW=`cl 2>&1 | "$HEAD" -n 1 | "$SED" 's/.*[\ ]*\([0-9][0-9.]*\).*[\ ]版/\1/'`
  #MSC_VER_MAJOR=`"$ECHO" $MSC_VER_RAW | "$CUT" -d'.' -f1`
  #MSC_VER_MINOR=`"$ECHO" $MSC_VER_RAW | "$CUT" -d'.' -f2`
  #MSC_VER_MICRO=`"$ECHO" $MSC_VER_RAW | "$CUT" -d'.' -f3`
  #if [ "${MSC_VER_MAJOR}" -eq 14 -a "${MSC_VER_MINOR}" -eq 0 -a "${MSC_VER_MICRO}" -eq 30701 ] ; then
    # This said 1400 but it was really more like VS2003 (VC7) in terms of options
  #  MSC_VER=1399
  #else
  #  MSC_VER=`"$EXPR" $MSC_VER_MAJOR \* 100 + $MSC_VER_MINOR`
  #fi

  MSC_VER=1600
  MSC_VER_RAW=16.00.30319.01

  echo "MSC_VER=$MSC_VER"
  echo "MSC_VER_RAW=$MSC_VER_RAW"
fi

另外需要注意的是,需要保证 openjdk 源代码版本与机器上安装的jdk版本一致,包括主版本,32位还是64位,否则可能出现奇怪的错误。

build error

D:\workspace\OpenJDK\hotspot\src\share\vm\classfile/classFileParser.hpp(409): error C2039: 'tag_at' : is not a member of 'ConstantPool'
1> D:\workspace\OpenJDK\hotspot\src\share\vm\oops/constantPool.hpp(86) : see declaration of 'ConstantPool'
1>D:\workspace\OpenJDK\hotspot\src\share\vm\classfile/classFileParser.hpp(409): error C2228: left of '.is_klass_or_reference' must have class/struct/union
1>D:\workspace\OpenJDK\hotspot\src\share\vm\classfile/classFileParser.hpp(410): error C2039: 'tag_at' : is not a member of 'ConstantPool'
1> D:\workspace\OpenJDK\hotspot\src\share\vm\oops/constantPool.hpp(86) : see declaration of 'ConstantPool'
1>D:\workspace\OpenJDK\hotspot\src\share\vm\classfile/classFileParser.hpp(410): error C2228: left of '.is_klass_reference' must have class/struct/union
1>D:\workspace\OpenJDK\hotspot\src\share\vm\classfile/classFileParser.hpp(416): error C2039: 'tag_at' : is not a member of 'ConstantPool'
1> D:\workspace\OpenJDK\hotspot\src\share\vm\oops/constantPool.hpp(86) : see declaration of 'ConstantPool'
1>D:\workspace\OpenJDK\hotspot\src\share\vm\classfile/classFileParser.hpp(416): error C2228: left of '.is_utf8' must have class/struct/union

请问大牛,这个该怎么解决呢?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.