aboutsummaryrefslogtreecommitdiffstats
path: root/agent/src
diff options
context:
space:
mode:
authorIvan Dubrov <idubrov@guidewire.com>2014-04-24 17:02:24 -0700
committerIvan Dubrov <idubrov@guidewire.com>2014-04-24 17:27:05 -0700
commit38ed95d3c0e7043351bcd98edcec840440c2f50c (patch)
tree2e96aab1587260c971f55ad2e3431ab69b6571ab /agent/src
parentb4a131ffa7877b6c1853a3b0d6cf2dc1391b72d9 (diff)
downloaddcevm-38ed95d3c0e7043351bcd98edcec840440c2f50c.tar.gz
dcevm-38ed95d3c0e7043351bcd98edcec840440c2f50c.zip
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.
Diffstat (limited to 'agent/src')
-rw-r--r--agent/src/main/java/META-INF/MANIFEST.MF4
-rw-r--r--agent/src/main/java/org/dcevm/agent/InstrumentationAgent.java18
2 files changed, 22 insertions, 0 deletions
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;
+ }
+}