changeset 7824:e6ce826890e0

Mangler updates from Kumar.
author briangoetz
date Fri, 05 Apr 2013 10:24:49 -0400
parents d92f53c4c7ba
children adc363b47e78
files test-ng/agent/conf/serialize.list test-ng/agent/make/build.xml test-ng/agent/src/com/oracle/lambda/Agent.java test-ng/agent/src/com/oracle/lambda/Main.java test-ng/agent/src/com/oracle/lambda/SerializationInjector.java test-ng/agent/src/com/oracle/lambda/TestLambdaSerialization.java test-ng/build.xml
diffstat 7 files changed, 141 insertions(+), 140 deletions(-) [+]
line wrap: on
line diff
--- a/test-ng/agent/conf/serialize.list	Fri Apr 05 16:09:55 2013 +0200
+++ b/test-ng/agent/conf/serialize.list	Fri Apr 05 10:24:49 2013 -0400
@@ -31,3 +31,25 @@
 org/openjdk/tests/java/util/stream/TabulatorsTest
 org/openjdk/tests/java/util/stream/TabulatorsTest\$.*Assertion
 org/openjdk/tests/java/util/stream/StreamLinkTest
+org.openjdk.tests.java.util.stream.SpliteratorLateBindingFailFastTest\$SpliteratorDataBuilder.*
+org.openjdk.tests.java.util.stream.SpliteratorTraversingAndSplittingTest\$SpliteratorDataBuilder.*
+java.util.HashMap\$Values
+java.util.LinkedHashMap\$KeyIterator
+java.util.HashMap\$Entry
+java.util.LinkedList\$Node
+java.util.TreeMap\$Entry
+java.util.HashMap\$EntrySet
+java.util.HashMap\$KeySet 
+java.util.IdentityHashMap\$KeySet
+java.util.LinkedHashMap\$ValueIterator
+java.util.TreeMap\$KeySet
+java.util.TreeMap\$EntrySet
+java.util.TreeMap\$Values
+java.util.WeakHashMap
+java.util.WeakHashMap\$EntrySet
+java.util.WeakHashMap\$KeySet
+java.util.WeakHashMap\$Values
+java.util.LinkedHashMap\$EntryIterator
+java.util.IdentityHashMap\$EntrySet
+java.util.IdentityHashMap\$Values
+
--- a/test-ng/agent/make/build.xml	Fri Apr 05 16:09:55 2013 +0200
+++ b/test-ng/agent/make/build.xml	Fri Apr 05 10:24:49 2013 -0400
@@ -3,18 +3,18 @@
 
   <!-- set global properties for this build -->
   <property name="build.sysclasspath" value="ignore"/>
+  <property name="build.dir" value="../../../build/test-ng/agent" />
   <property name="src"      value="${basedir}/src"/>
-  <property name="build"    value="${basedir}/build"/>
-  <property name="dist"     value="${basedir}/dist"/>
   <property name="make"     value="${basedir}/make"/>
-    <property name="conf"     value="${basedir}/conf"/>
-  <property name="classes"  value="${build}/classes"/>
+  <property name="conf"     value="${basedir}/conf"/>
+  <property name="classes"  value="${build.dir}/classes"/>
+  <property name="dist"     value="${build.dir}/dist"/>
 
   <target name="init">
     <!-- Create the time stamp -->
     <tstamp/>
     <!-- Create the build directory structure used by compile -->
-    <mkdir dir="${build}"/>
+    <mkdir dir="${build.dir}"/>
     <mkdir dir="${dist}"/>
     <mkdir dir="${classes}"/>
     <echo message="${java.home}"/>
@@ -25,7 +25,7 @@
     <javac 
 	source="1.7"
 	srcdir="${src}"
-	destdir="${build}/classes"
+	destdir="${build.dir}/classes"
 	verbose="no"
 	debug="on"
     >
--- a/test-ng/agent/src/com/oracle/lambda/Agent.java	Fri Apr 05 16:09:55 2013 +0200
+++ b/test-ng/agent/src/com/oracle/lambda/Agent.java	Fri Apr 05 10:24:49 2013 -0400
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -38,7 +38,7 @@
             throws IOException, NoSuchFieldException, IllegalAccessException {
         // If run without a config file, all we do is set up the shutdown hook
         if (agentArgs != null) {
-            final SerializationInjector si = new SerializationInjector(agentArgs);
+            final SerializationInjector si = new SerializationInjector();
             instrumentation.addTransformer(new ClassFileTransformer() {
                 @Override
                 public byte[] transform(final ClassLoader cl, String string,
--- a/test-ng/agent/src/com/oracle/lambda/Main.java	Fri Apr 05 16:09:55 2013 +0200
+++ b/test-ng/agent/src/com/oracle/lambda/Main.java	Fri Apr 05 10:24:49 2013 -0400
@@ -58,9 +58,9 @@
 public class Main {
 
     static void usage() {
-        System.out.println("usage: -o output_dir -f path_to_list path_to/SomeClass.class");
-        System.out.println("usage: -o output_dir -f path_to_list path_to_classes");
-        System.out.println("usage: -o output_dir -s -f path_to_list path_to_jar");
+        System.out.println("usage: -o output_dir path_to/SomeClass.class");
+        System.out.println("usage: -o output_dir path_to_classes");
+        System.out.println("usage: -o output_dir -s path_to_jar");
         System.exit(1);
     }
 
@@ -77,7 +77,6 @@
         }
         File outDir = null;
         File inFile = null;
-        File confFile = null;
         boolean serializeOnly = false;
         for (int i = 0 ; i < args.length ; i++) {
             switch (args[i]) {
@@ -85,10 +84,6 @@
                     i++;
                     outDir = new File(args[i]);
                     break;
-                case "-f":
-                    i++;
-                    confFile = new File(args[i]);
-                    break;
                 case "-s":
                     serializeOnly = true;
                     break;
@@ -117,7 +112,7 @@
             Pattern pattern = Pattern.compile(".*");
             EnumSet<SerializationInjector.Options> options
                     = serializeOnly ? EnumSet.of(SerializationInjector.Options.SERIALIZE_ONLY) : EnumSet.noneOf(SerializationInjector.Options.class);
-            doJar(confFile, inFile, outDir, cl, pattern, options);
+            doJar(inFile, outDir, cl, pattern, options);
         } else {
             outDir.mkdirs();
             URL[] urls = {inFile.getParentFile().toURI().toURL()};
@@ -140,11 +135,11 @@
         return baos.toByteArray();
     }
 
-    static void doJar(File confFile, File inFile, File outDir, ClassLoader cl, Pattern pattern,
+    static void doJar(File inFile, File outDir, ClassLoader cl, Pattern pattern,
                       EnumSet<SerializationInjector.Options> options) throws IOException {
         JarFile jf = new JarFile(inFile);
         byte[] buffer;
-        SerializationInjector si = new SerializationInjector(confFile.getAbsolutePath());
+        SerializationInjector si = new SerializationInjector();
         FileSystem fs = null;
         boolean jarOut = outDir.getName().endsWith(".jar");
         Set<PosixFilePermission> perms = PosixFilePermissions.fromString("rwxrwxrwx");
--- a/test-ng/agent/src/com/oracle/lambda/SerializationInjector.java	Fri Apr 05 16:09:55 2013 +0200
+++ b/test-ng/agent/src/com/oracle/lambda/SerializationInjector.java	Fri Apr 05 10:24:49 2013 -0400
@@ -24,7 +24,6 @@
 
 import java.io.BufferedOutputStream;
 import java.io.File;
-import java.io.FileInputStream;
 import java.io.FileOutputStream;
 import java.io.IOException;
 import java.io.PrintStream;
@@ -37,7 +36,6 @@
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
-import java.util.Properties;
 import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.logging.Level;
 import java.util.logging.Logger;
@@ -53,13 +51,21 @@
 
 import static java.nio.file.StandardOpenOption.*;
 
+
 public class SerializationInjector {
     static final String PREFIX = "com.oracle.lambda";
     static final String INCLUDES = "java.util.*|org.openjdk.tests.java.*"; // also should include java.util...
     static final String SERIALIZE = "";
-    static PrintStream outputStream;
-    static boolean shouldClose = false;
-    static boolean storeStackTraces = true;
+
+    // properties that can be set
+    static final String INCLUDE_FILES  = PREFIX + ".include.files";
+    static final String SERIALIZE_FILE = PREFIX + ".serialize.file";
+    static final String STORE_FRAMES   = PREFIX + ".store.frames";
+    static final String LOGFILE        = PREFIX + ".log.file";
+    static final String DEBUG          = PREFIX + ".debug";
+    static final String NROUNDS        = PREFIX + ".nrounds";
+
+    static boolean storeFrames = true;
     static boolean deserializationWorkaround;
 
     final DebugPrint debug;
@@ -69,84 +75,27 @@
 
     public enum Options { SERIALIZE_ONLY, FORCE_SERIALIZE }
 
-    public SerializationInjector() {
-        includePattern = Pattern.compile(INCLUDES);
-        serializePattern = Pattern.compile(SERIALIZE);
-        outputStream = System.out;
-        debug = new DebugPrint(outputStream, false);
+    public SerializationInjector() throws IOException {
+        includePattern   = propToPattern(INCLUDE_FILES, INCLUDES);
+        serializePattern = fileToPattern(SERIALIZE_FILE, SERIALIZE);
+        debug = new DebugPrint();
         TestLambdaSerialization.initializeShutDownHook();
-        storeStackTraces = false;
+        storeFrames = Boolean.getBoolean(STORE_FRAMES);
         deserializationWorkaround = false;
         serializeOnly = false;
     }
-
-    public SerializationInjector(String confFile) throws IOException {
-        if (confFile != null) {
-            Properties props = new Properties();
-            try (FileInputStream fis = new FileInputStream(confFile)) {
-                props.load(fis);
-            } catch (IOException ex) {
-                System.err.println("Error: " + ex.getMessage());
-                throw new Error(ex);
+    final Pattern propToPattern(String propKey, String defValue) {
+        return Pattern.compile(System.getProperty(propKey, defValue));
+    }
+    final Pattern fileToPattern(String propKey, String defValue) throws IOException {
+        String fname = System.getProperty(propKey, null);
+        if (fname != null) {
+            File pFile = new File(fname);
+            if (pFile.canRead()) {
+                return fileToPattern(pFile);
             }
-            props.list(System.err);
-            String include = props.getProperty(PREFIX + ".include.files", INCLUDES);
-            includePattern = Pattern.compile(include);
-            String injectSerializeName = props.getProperty(PREFIX + ".serialize.file", null);
-            storeStackTraces = props.getProperty(PREFIX + ".storeStackTraces", null) != null;
-            deserializationWorkaround = props.getProperty(PREFIX +
-                    ".deserialization.workaround", "false").equals("true");
-
-            System.err.println("Serialization file: ");
-            if (injectSerializeName != null) {
-                System.err.println(injectSerializeName);
-                serializePattern = fileToPattern(injectSerializeName);
-            } else {
-                // if there is no serialization file listed, try to see if there
-                // is one in the agent/conf directory it is usually the same dir
-                // as the props file, othewise use the default patterns.
-                File serializeFile = new File(new File(confFile).getParentFile(), "serialize.list");
-                if (serializeFile.exists()) {
-                    System.err.println(serializeFile.getAbsolutePath());
-                    serializePattern = fileToPattern(serializeFile);
-                } else {
-                    System.err.println("default pattern");
-                    serializePattern = Pattern.compile(SERIALIZE);
-                }
-            }
-            String output = props.getProperty(PREFIX + ".log.file", "out");
-            switch (output) {
-                case "out":
-                    outputStream = System.out;
-                    break;
-                case "err":
-                    outputStream = System.err;
-                    break;
-                default:
-                    File f = new File(output);
-                    if (f.exists()) {
-                        File dir = f.getParentFile();
-                        f = File.createTempFile("agent", ".log", dir);
-                    }
-                    FileOutputStream fos = new FileOutputStream(f);
-                    outputStream = new PrintStream(new BufferedOutputStream(fos));
-                    shouldClose = true;
-            }
-            debug = new DebugPrint(outputStream,
-            props.getProperty(PREFIX + ".debug") != null);
-        } else {
-            includePattern = Pattern.compile(INCLUDES);
-            serializePattern = Pattern.compile(SERIALIZE);
-            outputStream = System.out;
-            debug = new DebugPrint(outputStream, false);
-            storeStackTraces = false;
-            deserializationWorkaround = false;
         }
-        TestLambdaSerialization.initializeShutDownHook();
-        serializeOnly = false;
-    }
-    final Pattern fileToPattern(String filename) throws IOException {
-        return fileToPattern(new File(filename));
+        return Pattern.compile(defValue);
     }
     final Pattern fileToPattern(File inFile) throws IOException {
         List<String> serList = Files.readAllLines(inFile.toPath(),
@@ -169,6 +118,7 @@
         byte[] xBuffer = classBuffer;
         ClassReader classReader = new ClassReader(xBuffer);
         String cname = classReader.getClassName();
+
         if (options.contains(Options.FORCE_SERIALIZE) || serializePattern.matcher(cname).matches()) {
             debug.println("Implementing Serialization: " + cname);
             xBuffer = injectSerialization(xBuffer, cl);
@@ -294,13 +244,13 @@
                     public void visitInvokeDynamicInsn(String callsite,
                             String sig, Handle handle, Object... bsmArgs) {
                         // instrument  only! lambda objects
-                        final boolean injectSand = handle.getName().equals("metaFactory") ||
+                        final boolean needsTransform = handle.getName().equals("metaFactory");
+                        final boolean injectSand = needsTransform ||
                                 handle.getName().equals("altMetaFactory");
                         if (!injectSand) {
                             super.visitInvokeDynamicInsn(callsite, sig, handle, bsmArgs);
                             return;
                         }
-                        final boolean needsTransform = handle.getName().equals("metaFactory");
                         debug.println("indy:" + mid + ", locals = " + locals);
                         debug.println("  fixing: " + callsite + ":" + sig);
                         Handle nHandle = handle;
@@ -387,6 +337,7 @@
                     foundSer = foundSer || x.contains(sername);
                 }
                 if (!foundSer) {
+                    debug.println("Injecting serialization: " + name);
                     int n = interfaces.length;
                     interfaces = Arrays.copyOf(interfaces, n + 1);
                     interfaces[n] = sername;
@@ -395,6 +346,7 @@
                 }
                 super.visit(version, access, name, signature, superName, interfaces);
                 if (injectNoArg && (access & ACC_INTERFACE) == 0) {
+                    debug.println("Injecting <init>: " + name);
                     MethodVisitor ctor = visitMethod(ACC_PUBLIC, "<init>", "()V", null, null);
                     ctor.visitCode();
                     ctor.visitVarInsn(ALOAD, 0);
@@ -407,15 +359,35 @@
         };
     }
 }
-
 class DebugPrint {
     final PrintStream out;
     final boolean mustPrint;
-    DebugPrint(PrintStream out, boolean print) {
-        this.out = out;
-        boolean prop = Boolean.getBoolean(SerializationInjector.PREFIX + ".debug");
-        mustPrint = print ? true : prop;
+    final boolean shouldClose;
+
+    DebugPrint() throws IOException {
+        mustPrint = Boolean.getBoolean(SerializationInjector.DEBUG);
+        String output = System.getProperty(SerializationInjector.LOGFILE, "out");
+        switch (output) {
+            case "out":
+                out = System.out;
+                shouldClose = false;
+                break;
+            case "err":
+                out = System.err;
+                shouldClose = false;
+                break;
+            default:
+                File f = new File(output);
+                if (f.exists()) {
+                    File dir = f.getParentFile();
+                    f = File.createTempFile("agent", ".log", dir);
+                }
+                FileOutputStream fos = new FileOutputStream(f);
+                out = new PrintStream(new BufferedOutputStream(fos));
+                shouldClose = true;
+        }
     }
+
     void println(String s) {
         if (mustPrint)
             out.println(s);
--- a/test-ng/agent/src/com/oracle/lambda/TestLambdaSerialization.java	Fri Apr 05 16:09:55 2013 +0200
+++ b/test-ng/agent/src/com/oracle/lambda/TestLambdaSerialization.java	Fri Apr 05 10:24:49 2013 -0400
@@ -47,11 +47,11 @@
             Collections.synchronizedMap(new HashMap<String, SerializableStatus>());
     private static final CounterSet serCounters = new CounterSet();
     private static final CounterSet deserCounters = new CounterSet();
+    private static final int nRounds =
+            Integer.parseInt(System.getProperty(SerializationInjector.NROUNDS, "1"));
 
     public static void printStats() {
-        PrintStream rpt = SerializationInjector.outputStream;
-        if (rpt == null)
-            rpt = System.out;
+        PrintStream rpt = System.out;
         try {
             rpt.println("Lambda Serialization Test Status:");
             rpt.println("  serializations attempted:       " + serCounters.attempted);
@@ -81,20 +81,22 @@
                 }
             }
         } finally {
-            if (SerializationInjector.shouldClose) {
-                rpt.close();
-            } else {
-                rpt.flush();
-            }
+            rpt.flush();
         }
     }
 
     public static Object serializeOnly(Object lambdaObj, Object... args) {
-        return serializeAndDeserialize0(true, lambdaObj, args);
+        Object lObj = lambdaObj;
+        for (int i = 0 ; i < nRounds; i++)
+            lObj = serializeAndDeserialize0(true, lObj, args);
+        return lObj;
     }
 
     public static Object serializeAndDeserialize(Object lambdaObj, Object... args) {
-        return serializeAndDeserialize0(false, lambdaObj, args);
+        Object lObj = lambdaObj;
+        for (int i = 0; i < nRounds; i++)
+            lObj = serializeAndDeserialize0(false, lObj, args);
+        return lObj;
     }
 
     private static Object serializeAndDeserialize0(boolean serializeonly,
@@ -107,7 +109,7 @@
                 SerializableStatus s = nonSerializableClasses.get(name);
                 if (s == null) {
                     s = new SerializableStatus("NonSerializableObject", name,
-                            SerializationInjector.storeStackTraces
+                            SerializationInjector.storeFrames
                                 ? new Exception(name) : null);
                     nonSerializableClasses.put(name, s);
 
@@ -127,27 +129,25 @@
                 oos.close();
                 serBytes = bos.toByteArray();
                 serCounters.succeeded.incrementAndGet();
-            }
-            catch (java.io.NotSerializableException e) {
+            } catch (java.io.NotSerializableException e) {
                 serCounters.failed.incrementAndGet();
                 String name = e.getMessage();
                 SerializableStatus s = nonSerializableClasses.get(name);
                 if (s == null) {
                     s = new SerializableStatus("NonSerializableObject", name,
-                                               SerializationInjector.storeStackTraces ? e : null);
+                                               SerializationInjector.storeFrames ? e : null);
                     nonSerializableClasses.put(name, s);
                 } else {
                     s.incrementCount();
                 }
                 return lambdaObj;
-            }
-            catch (RuntimeException|IOException|Error e) {
+            } catch (RuntimeException | IOException | Error e) {
                 serCounters.failed.incrementAndGet();
                 String cname = lambdaObj.getClass().getName();
                 SerializableStatus s = serializableButFailedClasses.get(cname);
                 if (s == null) {
                     serializableButFailedClasses.put(cname, new SerializableStatus("LambdaObject",
-                            lambdaObj, SerializationInjector.storeStackTraces ? e : null));
+                            lambdaObj, SerializationInjector.storeFrames ? e : null));
                 } else {
                     s.incrementCount();
                 }
@@ -168,17 +168,16 @@
             Object nlambdaObj = ois.readObject();
             deserCounters.succeeded.incrementAndGet();
             return nlambdaObj;
-        }
-        catch (IOException | ClassNotFoundException e) {
+        } catch (Exception e) {
             deserCounters.failed.incrementAndGet();
             String cname = lambdaObj.getClass().getName();
             SerializableStatus s = deserFailures.get(cname);
             if (s == null) {
                 deserFailures.put(cname, new SerializableStatus("NonDeserializableObject",
-                                                                lambdaObj, SerializationInjector.storeStackTraces ? e : null));
+                        lambdaObj, SerializationInjector.storeFrames ? e : null));
+            } else {
+                s.incrementCount();
             }
-            else
-                s.incrementCount();
             return lambdaObj;
         }
     }
--- a/test-ng/build.xml	Fri Apr 05 16:09:55 2013 +0200
+++ b/test-ng/build.xml	Fri Apr 05 10:24:49 2013 -0400
@@ -44,9 +44,9 @@
     <property name="lambda.metafactory" value="" />
     <property name="generated.dir" value="gen-separate"/>
     <property name="agent.dir"       location="${basedir}/agent"/>
-    <property name="agent.jar"       value="${agent.dir}/dist/SerializationInjectorAgent.jar" />
-    <property name="agent.conf.file" value="${agent.dir}/conf/agent.props" />
-    <property name="agent.rt.jar"    value="rt.jar" />
+    <property name="agent.jar"       value="${build.dir}/agent/dist/SerializationInjectorAgent.jar" />
+    <property name="agent.serial.file" value="${agent.dir}/conf/serialize.list" />
+    <property name="agent.rt.jar"    value="${java.home}/lib/rt.jar" />
     <property name="parallel.mode"    value="classes" />
     <property name="parallel.suitePool"    value="1" />
     <property name="parallel.providerPool"    value="1" />
@@ -88,6 +88,7 @@
         <javac destdir="${bootlib.classes.dir}" debug="on" srcdir="${bootlib.src.dir}" fork="true"
                classpathref="compile.class.path">
             <compilerarg value="-Xlint:all"/>
+            <compilerarg value="-XDignore.symbol.file"/>
         </javac>
         <javac destdir="${tests.classes.dir}" debug="on" srcdir="${tests.src.dir}" fork="true"
                classpathref="compile.class.path">
@@ -97,6 +98,7 @@
         <javac destdir="${boottests.classes.dir}" debug="on" srcdir="${boottests.src.dir}" fork="true"
                classpathref="compile.class.path">
             <compilerarg value="-Xlint:all"/>
+            <compilerarg value="-XDignore.symbol.file"/>
         </javac>
    </target>
 
@@ -151,16 +153,26 @@
         </ant>
     </target>
 
-    <target name="premangle" depends="build-mangler, test-compile">
+    <target name="mangler-sanity">
+        <condition property="agent.rt.jar.available">
+            <available file="${agent.rt.jar}"/>
+        </condition>
+        <echo message="java.home   : ${java.home}"/>
+        <echo message="agent.rt.jar: ${agent.rt.jar}"/>
+        <fail message="agent.rt.jar was not found, please set it to a valid rt.jar"
+              unless="agent.rt.jar.available"/>
+    </target>
+    
+    <target name="premangle" depends="mangler-sanity, clean, build-mangler, test-compile">
         <!-- Mangle JDK to mangled.jdk.dir (serialization injection only, no SAND) -->
         <delete dir="${mangled.jdk.dir}" />
         <mkdir dir="${mangled.jdk.dir}" />
         <java jar="${agent.jar}" fork="true" >
+            <jvmarg value="-Dcom.oracle.lambda.serialize.file=${agent.serial.file}"/>
             <arg value="-s"/>
             <arg value="-o"/>
             <arg value="${mangled.jdk.dir}" />
-            <arg value="-f"/>
-            <arg value="${agent.conf.file}"/>
+            <arg value="-s"/>
             <arg value="${agent.rt.jar}"/>
         </java>
         <!-- Mangle boot test classes to mangled.boottests.dir -->
@@ -168,10 +180,10 @@
         <mkdir dir="${mangled.boottests.dir}" />
         <jar destfile="${build.dir}/tmpA.jar" basedir="${boottests.classes.dir}"/>
         <java jar="${agent.jar}" fork="true" >
+            <jvmarg value="-Dcom.oracle.lambda.serialize.file=${agent.serial.file}"/>
             <arg value="-o"/>
             <arg value="${mangled.boottests.dir}" />
-            <arg value="-f"/>
-            <arg value="${agent.conf.file}"/>
+            <arg value="-s"/>
             <arg value="${build.dir}/tmpA.jar"/>
         </java>
         <!-- Mangle boot test classes to mangled.bootlib.dir (serialization injection only, no SAND) -->
@@ -179,11 +191,10 @@
         <mkdir dir="${mangled.bootlib.dir}" />
         <jar destfile="${build.dir}/tmpB.jar" basedir="${bootlib.classes.dir}"/>
         <java jar="${agent.jar}" fork="true" >
+            <jvmarg value="-Dcom.oracle.lambda.serialize.file=${agent.serial.file}"/>
             <arg value="-s"/>
             <arg value="-o"/>
             <arg value="${mangled.bootlib.dir}" />
-            <arg value="-f"/>
-            <arg value="${agent.conf.file}"/>
             <arg value="${build.dir}/tmpB.jar"/>
         </java>
         <!-- Mangle test classes to mangled.testdir -->
@@ -191,10 +202,9 @@
         <mkdir dir="${mangled.tests.dir}" />
         <jar destfile="${build.dir}/tmpC.jar" basedir="${tests.classes.dir}"/>
         <java jar="${agent.jar}" fork="true" >
+            <jvmarg value="-Dcom.oracle.lambda.serialize.file=${agent.serial.file}"/>
             <arg value="-o"/>
             <arg value="${mangled.tests.dir}" />
-            <arg value="-f"/>
-            <arg value="${agent.conf.file}"/>
             <arg value="${build.dir}/tmpC.jar"/>
         </java>
     </target>
@@ -219,8 +229,11 @@
             <!--<jvmarg value="-Dsun.io.serialization.extendedDebugInfo=true" />-->
             <jvmarg value="-ea" />
             <jvmarg value="-esa" />
-            <jvmarg value="-Xverify:all" />
-            <jvmarg value="-Xmx2500m" />
+            <jvmarg value="-Xverify:none" />
+            <jvmarg value="-Xmx4g" />
+            <!-- properties specific to agent config -->
+            <jvmarg value="-Dcom.oracle.lambda.store.frames=false"/>
+            <jvmarg value="-Dcom.oracle.lambda.nrounds=1"/>
             <jvmarg value="-javaagent:${agent.jar}"/>
         </testng>
     </target>
@@ -238,7 +251,7 @@
             <!--<jvmarg value="-Dsun.io.serialization.extendedDebugInfo=true" />-->
             <jvmarg value="-ea" />
             <jvmarg value="-esa" />
-            <jvmarg value="-Xverify:all" />
+            <jvmarg value="-Xverify:none" />
             <jvmarg value="-Xmx2500m" />
             <jvmarg value="-javaagent:${agent.jar}"/>
         </testng>