From 38ed95d3c0e7043351bcd98edcec840440c2f50c Mon Sep 17 00:00:00 2001 From: Ivan Dubrov Date: Thu, 24 Apr 2014 17:02:24 -0700 Subject: Extracting DCEVM patch & code into separate project Making DCEVM to be toplevel project that clones HotSpot repository, patches the code, builds JVM and tests it. --- agent/src/main/java/META-INF/MANIFEST.MF | 4 ++++ .../java/org/dcevm/agent/InstrumentationAgent.java | 18 ++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 agent/src/main/java/META-INF/MANIFEST.MF create mode 100644 agent/src/main/java/org/dcevm/agent/InstrumentationAgent.java (limited to 'agent/src') diff --git a/agent/src/main/java/META-INF/MANIFEST.MF b/agent/src/main/java/META-INF/MANIFEST.MF new file mode 100644 index 00000000..9a1b4b72 --- /dev/null +++ b/agent/src/main/java/META-INF/MANIFEST.MF @@ -0,0 +1,4 @@ +Manifest-Version: 1.0 +Can-Redefine-Classes: true +Agent-Class: org.dcevm.agent.InstrumentationAgent +Premain-Class: org.dcevm.agent.InstrumentationAgent diff --git a/agent/src/main/java/org/dcevm/agent/InstrumentationAgent.java b/agent/src/main/java/org/dcevm/agent/InstrumentationAgent.java new file mode 100644 index 00000000..e3a129d5 --- /dev/null +++ b/agent/src/main/java/org/dcevm/agent/InstrumentationAgent.java @@ -0,0 +1,18 @@ +package org.dcevm.agent; + +import java.lang.instrument.Instrumentation; + +/** + * Simple agent to get access to the Instrumentation API. + */ +public class InstrumentationAgent { + public static Instrumentation INSTRUMENTATION; + + public static void agentmain(String args, Instrumentation instr) { + INSTRUMENTATION = instr; + } + + public static void premain(String args, Instrumentation instr) { + INSTRUMENTATION = instr; + } +} -- cgit v1.2.3