You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Ivan Dubrov a2da14f152 Fixing fields handling hace 8 años
agent/src/main/java Renaming org.dcevm -> com.github.dcevm hace 10 años
dcevm/src Fixing fields handling hace 8 años
gradle/wrapper Verify Mercurial is installed hace 8 años
hotspot/.hg/patches Fixing fields handling hace 8 años
installer Allow changing installer JAR name hace 9 años
native Fixing native code compilation hace 10 años
.gitignore Adding hotspot.log to ignores hace 10 años
README.md Verify Mercurial is installed hace 8 años
build.cmd Fixing build.cmd hace 10 años
build.gradle Support for Java7u79 hace 8 años
gradle.properties Support for Java7u79 hace 8 años
gradlew Extracting DCEVM patch & code into separate project hace 10 años
gradlew.bat Extracting DCEVM patch & code into separate project hace 10 años
settings.gradle Set root project name explicitly hace 9 años

README.md

DCEVM

This project is a fork of original DCEVM project.

The purpose of the project is to maintain enhanced class redefinition functionality for OpenJDK HotSpot 7/8.

Binaries

You can download binaries here.

Supported versions

hotspot/.hg/patches/ contains patches for all supported versions. Each patch is named by concatenating prefix full or light with the OpenJDK HotSpot tag. full patches support full redefenition capabilities (including removal of superclasses, for example). light patches are easier to maintain, but they only support limited functionality (generally, additions to class hierarchies are fine, removals are not).

HotSpot tag is the name of the tag in the corresponding HotSpot Mercurial repository (Java 8/Java 7).

Building

General Requirements

You need the following software to build DCEVM:

  • Java 7 or later. If you intend to run tests, it should be one of the supported versions (see list of patches/)
  • C++ compiler toolchain (gcc). There is no strict version requirement except that it should be supported by HotSpot build scripts.
  • Mercurial with Mercurial Queues Extension enabled.

Mac OS X specific requirements

Currently the build is not compatible with Clang on Mac OS X, you need to install gcc 4.8 using the Homebrew:

brew tap homebrew/versions
brew install gcc48

Then set the following environmental properties:

export CC=/usr/local/bin/gcc-4.8
export CFLAGS=-fobjc-exceptions
export CXX=/usr/local/bin/g++-4.8
export SA_LDFLAGS=-fobjc-exceptions

Compiling DCEVM

  • Configure version you want in gradle.properties.
  • Run ./gradlew patch to retrieve HotSpot sources and patch them.
  • Run ./gradlew compileFastdebug to build fastdebug version or ./gradlew compileProduct to build product version.
  • Compiled libraries are placed in hotspot/build/fastdebug or hotspot/build/product.

Installing DCEVM

  • Replace libjvm.so/jvm.dll/libjvm.dylib in the target JRE.
  • Run java -version, it should include Dynamic Code Evolution string.

Or you can install DCEVM using the gradle script:

  • Run ./gradlew installFastdebug -PtargetJre=$JAVA_HOME/jre or ./gradlew installProduct -PtargetJre=$JAVA_HOME/jre
  • DCEVM will be installed as “alternative” JVM. To use it, add -XXaltjvm=dcevm

Testing DCEVM

  • Configure version you want in gradle.properties.
  • Set JAVA_HOME to point to JDK you want to test against (should be compatible with the version you set in gradle.properties).
  • Run ./gradlew patch to retrieve HotSpot sources and patch them.
  • Run ./gradlew test to run tests.
  • Tests reports will be in dcevm/build/reports/tests/index.html

To run tests from IDE, you need:

  • Run ./gradlew agent:build to build redefinition agent code.
  • Add JVM argument to use redefinition agent (-javaagent:agent/build/libs/agent.jar).
  • Add JVM argument to DCEVM VM if installed side-by-side (-XXaltjvm=dcevm).

Known issues