Commit b98c10af authored by Vít Kabele's avatar Vít Kabele

Package structure flattened

parent 0158dba9
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="src" output="output/build/disl" path="src-disl"/> <classpathentry kind="src" output="output/build/disl" path="src-disl"/>
<classpathentry kind="src" output="output/build/shvm" path="src-shvm"/>
<classpathentry kind="src" output="output/build/util" path="src-util"/> <classpathentry kind="src" output="output/build/util" path="src-util"/>
<classpathentry kind="src" output="output/build/test" path="src-test"/> <classpathentry kind="src" output="output/build/test" path="src-test"/>
<classpathentry kind="src" output="output/build/shvm-dispatch" path="src-shvm-dispatch"/> <classpathentry kind="src" output="output/build/shvm-dispatch" path="src-shvm-dispatch"/>
...@@ -25,6 +24,22 @@ ...@@ -25,6 +24,22 @@
<classpathentry kind="src" path="disl/src/src-annotation"/> <classpathentry kind="src" path="disl/src/src-annotation"/>
<classpathentry kind="src" path="disl/src/src-context"/> <classpathentry kind="src" path="disl/src/src-context"/>
<classpathentry kind="src" path="disl/src-test"/> <classpathentry kind="src" path="disl/src-test"/>
<classpathentry kind="src" path="shvm/src/src-dislreserver"/>
<classpathentry kind="src" path="shvm/src/src-msg-analyze"/>
<classpathentry kind="src" path="shvm/src/src-msg-close"/>
<classpathentry kind="src" path="shvm/src/src-msg-classinfo"/>
<classpathentry kind="src" path="shvm/src/src-msg-newclass"/>
<classpathentry kind="src" path="shvm/src/src-msg-objfree"/>
<classpathentry kind="src" path="shvm/src/src-msg-reganalysis"/>
<classpathentry kind="src" path="shvm/src/src-msg-instr"/>
<classpathentry kind="src" path="shvm/src/src-msg-stringinfo"/>
<classpathentry kind="src" path="shvm/src/src-msg-threadend"/>
<classpathentry kind="src" path="shvm/src/src-msg-threadinfo"/>
<classpathentry kind="src" path="shvm/src/src-msg-analyze-mtdispatch"/>
<classpathentry kind="src" path="shvm/src/src-remoteanalysis"/>
<classpathentry kind="src" path="shvm/src/src-reqdispatch"/>
<classpathentry kind="src" path="shvm/src/src-shadow"/>
<classpathentry kind="src" path="shvm/src/src-util"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="lib" path="output/lib/disl-bypass.jar"/> <classpathentry kind="lib" path="output/lib/disl-bypass.jar"/>
<classpathentry kind="lib" path="lib/disl/log4j.jar" sourcepath="lib/devel/log4j-source.jar"/> <classpathentry kind="lib" path="lib/disl/log4j.jar" sourcepath="lib/devel/log4j-source.jar"/>
......
...@@ -18,7 +18,7 @@ src.examples=examples ...@@ -18,7 +18,7 @@ src.examples=examples
disl.bypass.lib=disl-bypass.jar disl.bypass.lib=disl-bypass.jar
disl.agent.lib.base=dislagent disl.agent.lib.base=dislagent
shvm.lib=dislre-server.jar
shvm.dispatch.lib=dislre-dispatch.jar shvm.dispatch.lib=dislre-dispatch.jar
shvm.agent.lib.base=dislreagent shvm.agent.lib.base=dislreagent
......
...@@ -634,7 +634,24 @@ ...@@ -634,7 +634,24 @@
<target name="compile-shvm" depends="compile-util,compile-shvm-dispatch"> <target name="compile-shvm" depends="compile-util,compile-shvm-dispatch">
<mkdir dir="${build.shvm}"/> <mkdir dir="${build.shvm}"/>
<javac destdir="${build.shvm}" srcdir="${src.shvm}" debug="true"> <javac destdir="${build.shvm}" debug="true">
<src path="shvm/src/src-dislreserver" />
<src path="shvm/src/src-msg-analyze" />
<src path="shvm/src/src-msg-analyze-mtdispatch" />
<src path="shvm/src/src-msg-classinfo" />
<src path="shvm/src/src-msg-close" />
<src path="shvm/src/src-msg-instr" />
<src path="shvm/src/src-msg-newclass" />
<src path="shvm/src/src-msg-objfree" />
<src path="shvm/src/src-msg-reganalysis" />
<src path="shvm/src/src-msg-stringinfo" />
<src path="shvm/src/src-msg-threadend" />
<src path="shvm/src/src-msg-threadinfo" />
<src path="shvm/src/src-remoteanalysis" />
<src path="shvm/src/src-reqdispatch" />
<src path="shvm/src/src-shadow" />
<src path="shvm/src/src-util" />
<classpath refid="util.classpath"/> <classpath refid="util.classpath"/>
<classpath refid="asm.classpath"/> <classpath refid="asm.classpath"/>
</javac> </javac>
......
...@@ -18,8 +18,10 @@ build.ivy.file = dependencies.xml ...@@ -18,8 +18,10 @@ build.ivy.file = dependencies.xml
src.bin=bin src.bin=bin
src.disl.prefix=disl src.disl.prefix=disl
src.disl-server.prefix=disl-server src.disl-server.prefix=disl-server
src.shvm.prefix=shvm
disl.lib=disl-server.jar disl.lib=disl-server.jar
shvm.lib=dislre-server.jar
# Base output directory # Base output directory
out.dir=output out.dir=output
......
# Shadow VM server
# Build properties related to the SHVM package
<project name="disl-server" default="build" basedir=".">
<!--
Import required property files.
-->
<property file="../common.properties"/>
<property file="build.properties" />
<property file="../disl.version.properties" />
<!--
Initialize the build directory
-->
<target name="init">
<mkdir dir="${build.shvm}" />
</target>
<!--
Dependency class paths
-->
<path id="asm.classpath">
<fileset dir="../${lib.disl.dir}" includes="asm*.jar" id="asm.fileset"/>
</path>
<path id="util.classpath">
<pathelement location="../${build.util}"/>
</path>
<path id="protobuf.classpath">
<fileset dir="../${lib.disl.dir}" includes="protobuf*.jar"/>
</path>
<!--
Refer to the parent targets
-->
<target name="compile-util">
<ant antfile="../build.xml" target="compile-util" usenativebasedir="true" />
</target>
<target name="compile-shvm-dispatch">
<ant antfile="../build.xml" target="compile-shvm-dispatch" usenativebasedir="true" />
</target>
<target name="build-shvm-dispatch">
<ant antfile="../build.xml" target="build-shvm-dispatch" usenativebasedir="true" />
</target>
<!-- SHVM Server -->
<target name="compile" depends="compile-util,compile-shvm-dispatch,init">
<javac destdir="${build.shvm}" debug="true">
<src path="src/src-dislreserver" />
<src path="src/src-msg-analyze" />
<src path="src/src-msg-analyze-mtdispatch" />
<src path="src/src-msg-classinfo" />
<src path="src/src-msg-close" />
<src path="src/src-msg-instr" />
<src path="src/src-msg-newclass" />
<src path="src/src-msg-objfree" />
<src path="src/src-msg-reganalysis" />
<src path="src/src-msg-stringinfo" />
<src path="src/src-msg-threadend" />
<src path="src/src-msg-threadinfo" />
<src path="src/src-remoteanalysis" />
<src path="src/src-reqdispatch" />
<src path="src/src-shadow" />
<src path="src/src-util" />
<classpath>
<path path="../${src.shvm.prefix}/${build.shvm}" />
<path refid="util.classpath"/>
<path refid="asm.classpath" />
<path refid="protobuf.classpath"/>
</classpath>
</javac>
</target>
<!-- Get ASM libs from ASM class path. -->
<pathconvert pathsep=" " property="asm.libs" refid="asm.classpath">
<mapper type="flatten"/>
</pathconvert>
<!-- Get ProtoBuf Java libs from ProtoBuf class path. -->
<pathconvert pathsep=" " property="protobuf.libs" refid="protobuf.classpath">
<mapper type="flatten"/>
</pathconvert>
<target name="build" depends="compile, build-shvm-dispatch">
<jar destfile="${out.lib}/${shvm.lib}">
<manifest>
<attribute name="Class-Path" value="${asm.libs} ${protobuf.libs}"/>
<attribute name="Main-Class" value="ch.usi.dag.dislreserver.DiSLREServer"/>
<attribute name="DiSL-Version" value="${disl.version}"/>
</manifest>
<service type="javax.annotation.processing.Processor" provider="ch.usi.dag.disl.DislClassFinder"/>
<fileset dir="${build.shvm}" />
<fileset dir="../${build.util}"/>
</jar>
</target>
<!--
Clean the build directory
-->
<target name="clean">
<delete dir="output" />
</target>
</project>
...@@ -17,8 +17,6 @@ import java.nio.channels.ClosedByInterruptException; ...@@ -17,8 +17,6 @@ import java.nio.channels.ClosedByInterruptException;
import java.nio.channels.ServerSocketChannel; import java.nio.channels.ServerSocketChannel;
import java.nio.channels.SocketChannel; import java.nio.channels.SocketChannel;
import ch.usi.dag.dislreserver.reqdispatch.RequestDispatcher;
import ch.usi.dag.dislreserver.util.Logging;
import ch.usi.dag.util.logging.Logger; import ch.usi.dag.util.logging.Logger;
......
package ch.usi.dag.dislreserver.msg.analyze.mtdispatch; package ch.usi.dag.dislreserver;
import java.util.Collections; import java.util.Collections;
import java.util.concurrent.BlockingQueue; import java.util.concurrent.BlockingQueue;
...@@ -6,7 +6,6 @@ import java.util.concurrent.ConcurrentHashMap; ...@@ -6,7 +6,6 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.LinkedBlockingQueue;
import ch.usi.dag.dislreserver.DiSLREServerFatalException;
/** /**
* Manages executors * Manages executors
......
package ch.usi.dag.dislreserver.msg.analyze.mtdispatch; package ch.usi.dag.dislreserver;
import java.util.List; import java.util.List;
import ch.usi.dag.dislreserver.DiSLREServerFatalException;
import ch.usi.dag.dislreserver.msg.analyze.AnalysisInvocation;
// Each thread has dedicated queue where new tasks are submitted. // Each thread has dedicated queue where new tasks are submitted.
public class AnalysisDispatcher { public class AnalysisDispatcher {
......
package ch.usi.dag.dislreserver.msg.analyze.mtdispatch; package ch.usi.dag.dislreserver;
import java.util.List; import java.util.List;
import ch.usi.dag.dislreserver.msg.analyze.AnalysisInvocation; import ch.usi.dag.dislreserver.AnalysisInvocation;
/** /**
* Holds unprocessed task data for some thread * Holds unprocessed task data for some thread
...@@ -37,4 +37,4 @@ class AnalysisTask { ...@@ -37,4 +37,4 @@ class AnalysisTask {
public long getEpoch() { public long getEpoch() {
return epoch; return epoch;
} }
} }
\ No newline at end of file
package ch.usi.dag.dislreserver.msg.analyze.mtdispatch; package ch.usi.dag.dislreserver;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.Queue; import java.util.Queue;
......
package ch.usi.dag.dislreserver.msg.analyze.mtdispatch; package ch.usi.dag.dislreserver;
import ch.usi.dag.dislreserver.DiSLREServerFatalException;
import ch.usi.dag.dislreserver.msg.analyze.AnalysisInvocation;
/** /**
* Thread processing analysis tasks * Thread processing analysis tasks
...@@ -38,4 +35,4 @@ class AnalysisThread extends Thread { ...@@ -38,4 +35,4 @@ class AnalysisThread extends Thread {
} }
} }
} }
\ No newline at end of file
package ch.usi.dag.dislreserver.msg.analyze.mtdispatch; package ch.usi.dag.dislreserver;
class ObjectFreeTask { class ObjectFreeTask {
......
package ch.usi.dag.dislreserver.msg.analyze.mtdispatch; package ch.usi.dag.dislreserver;
import java.util.Set; import java.util.Set;
import java.util.concurrent.BlockingQueue; import java.util.concurrent.BlockingQueue;
import java.util.concurrent.LinkedBlockingQueue; import java.util.concurrent.LinkedBlockingQueue;
import ch.usi.dag.dislreserver.DiSLREServerFatalException;
import ch.usi.dag.dislreserver.msg.analyze.AnalysisResolver;
import ch.usi.dag.dislreserver.remoteanalysis.RemoteAnalysis;
import ch.usi.dag.dislreserver.shadow.ShadowObject;
import ch.usi.dag.dislreserver.shadow.ShadowObjectTable;
class ObjectFreeTaskExecutor extends Thread { class ObjectFreeTaskExecutor extends Thread {
......
package ch.usi.dag.dislreserver.msg.analyze; package ch.usi.dag.dislreserver;
import java.io.DataInputStream; import java.io.DataInputStream;
import java.io.DataOutputStream; import java.io.DataOutputStream;
...@@ -7,12 +7,7 @@ import java.lang.reflect.Method; ...@@ -7,12 +7,7 @@ import java.lang.reflect.Method;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
import ch.usi.dag.dislreserver.DiSLREServerException; import ch.usi.dag.dislreserver.AnalysisResolver.AnalysisMethodHolder;
import ch.usi.dag.dislreserver.msg.analyze.AnalysisResolver.AnalysisMethodHolder;
import ch.usi.dag.dislreserver.msg.analyze.mtdispatch.AnalysisDispatcher;
import ch.usi.dag.dislreserver.reqdispatch.RequestHandler;
import ch.usi.dag.dislreserver.shadow.ShadowObject;
import ch.usi.dag.dislreserver.shadow.ShadowObjectTable;
public final class AnalysisHandler implements RequestHandler { public final class AnalysisHandler implements RequestHandler {
......
package ch.usi.dag.dislreserver.msg.analyze; package ch.usi.dag.dislreserver;
import java.lang.reflect.Method; import java.lang.reflect.Method;
......
package ch.usi.dag.dislreserver.msg.analyze; package ch.usi.dag.dislreserver;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.util.ArrayList; import java.util.ArrayList;
...@@ -8,9 +8,6 @@ import java.util.List; ...@@ -8,9 +8,6 @@ import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import ch.usi.dag.dislreserver.DiSLREServerException;
import ch.usi.dag.dislreserver.DiSLREServerFatalException;
import ch.usi.dag.dislreserver.remoteanalysis.RemoteAnalysis;
public final class AnalysisResolver { public final class AnalysisResolver {
private static final String METHOD_DELIM = "."; private static final String METHOD_DELIM = ".";
......
package ch.usi.dag.dislreserver.msg.classinfo; package ch.usi.dag.dislreserver;
import java.io.DataInputStream; import java.io.DataInputStream;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
import ch.usi.dag.dislreserver.DiSLREServerException;
import ch.usi.dag.dislreserver.reqdispatch.RequestHandler;
import ch.usi.dag.dislreserver.shadow.ShadowClassTable;
public final class ClassInfoHandler implements RequestHandler { public final class ClassInfoHandler implements RequestHandler {
......
package ch.usi.dag.dislreserver.msg.close; package ch.usi.dag.dislreserver;
import java.io.DataInputStream; import java.io.DataInputStream;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import ch.usi.dag.dislreserver.msg.analyze.AnalysisResolver;
import ch.usi.dag.dislreserver.remoteanalysis.RemoteAnalysis;
import ch.usi.dag.dislreserver.reqdispatch.RequestDispatcher;
import ch.usi.dag.dislreserver.reqdispatch.RequestHandler;
public final class CloseHandler implements RequestHandler { public final class CloseHandler implements RequestHandler {
......
package ch.usi.dag.dislreserver.msg.instr; package ch.usi.dag.dislreserver;
import java.io.DataInputStream; import java.io.DataInputStream;
import java.io.DataOutputStream; import java.io.DataOutputStream;
...@@ -6,9 +6,8 @@ import java.io.IOException; ...@@ -6,9 +6,8 @@ import java.io.IOException;
import java.io.PrintWriter; import java.io.PrintWriter;
import java.io.StringWriter; import java.io.StringWriter;
import ch.usi.dag.dislreserver.DiSLREServerException; import ch.usi.dag.dislreserver.InstrMsgReader.InstrClassMessage;
import ch.usi.dag.dislreserver.msg.instr.InstrMsgReader.InstrClassMessage;
import ch.usi.dag.dislreserver.reqdispatch.RequestHandler;
public abstract class AbstractInstrumentation implements RequestHandler { public abstract class AbstractInstrumentation implements RequestHandler {
......
package ch.usi.dag.dislreserver.msg.instr; package ch.usi.dag.dislreserver;
import java.io.DataInputStream; import java.io.DataInputStream;
import java.io.DataOutputStream; import java.io.DataOutputStream;
......
package ch.usi.dag.dislreserver.msg.newclass; package ch.usi.dag.dislreserver;
import java.io.DataInputStream; import java.io.DataInputStream;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
import ch.usi.dag.dislreserver.DiSLREServerException;
import ch.usi.dag.dislreserver.reqdispatch.RequestHandler;
import ch.usi.dag.dislreserver.shadow.ShadowClassTable;
public class NewClassHandler implements RequestHandler { public class NewClassHandler implements RequestHandler {
......
package ch.usi.dag.dislreserver.msg.objfree; package ch.usi.dag.dislreserver;
import java.io.DataInputStream; import java.io.DataInputStream;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
import ch.usi.dag.dislreserver.DiSLREServerException;
import ch.usi.dag.dislreserver.msg.analyze.AnalysisHandler;
import ch.usi.dag.dislreserver.reqdispatch.RequestHandler;
public class ObjectFreeHandler implements RequestHandler { public class ObjectFreeHandler implements RequestHandler {
......
package ch.usi.dag.dislreserver.msg.reganalysis; package ch.usi.dag.dislreserver;
import java.io.DataInputStream; import java.io.DataInputStream;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
import ch.usi.dag.dislreserver.DiSLREServerException;
import ch.usi.dag.dislreserver.msg.analyze.AnalysisResolver;
import ch.usi.dag.dislreserver.reqdispatch.RequestHandler;
public final class RegAnalysisHandler implements RequestHandler { public final class RegAnalysisHandler implements RequestHandler {
......
package ch.usi.dag.dislreserver.msg.stringinfo; package ch.usi.dag.dislreserver;
import java.io.DataInputStream; import java.io.DataInputStream;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
import ch.usi.dag.dislreserver.DiSLREServerException;
import ch.usi.dag.dislreserver.reqdispatch.RequestHandler;
import ch.usi.dag.dislreserver.shadow.ShadowObjectTable;
public final class StringInfoHandler implements RequestHandler { public final class StringInfoHandler implements RequestHandler {
......
package ch.usi.dag.dislreserver.msg.threadend; package ch.usi.dag.dislreserver;
import java.io.DataInputStream; import java.io.DataInputStream;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
import ch.usi.dag.dislreserver.DiSLREServerException;
import ch.usi.dag.dislreserver.msg.analyze.AnalysisHandler;
import ch.usi.dag.dislreserver.reqdispatch.RequestHandler;
public class ThreadEndHandler implements RequestHandler { public class ThreadEndHandler implements RequestHandler {
......
package ch.usi.dag.dislreserver.msg.threadinfo; package ch.usi.dag.dislreserver;
import java.io.DataInputStream; import java.io.DataInputStream;
import java.io.DataOutputStream; import java.io.DataOutputStream;
import java.io.IOException; import java.io.IOException;
import ch.usi.dag.dislreserver.DiSLREServerException;
import ch.usi.dag.dislreserver.reqdispatch.RequestHandler;
import ch.usi.dag.dislreserver.shadow.ShadowObjectTable;
public class ThreadInfoHandler implements RequestHandler { public class ThreadInfoHandler implements RequestHandler {
......
package ch.usi.dag.dislreserver.remoteanalysis; package ch.usi.dag.dislreserver;
import ch.usi.dag.dislreserver.shadow.ShadowObject;
/** /**
* Each analysis evaluated remotely have to implement this interface. * Each analysis evaluated remotely have to implement this interface.
......
package ch.usi.dag.dislreserver.reqdispatch; package ch.usi.dag.dislreserver;
import java.io.DataInputStream; import java.io.DataInputStream;
import java.io.DataOutputStream; import java.io.DataOutputStream;
...@@ -8,18 +8,6 @@ import java.util.HashMap; ...@@ -8,18 +8,6 @@ import java.util.HashMap;
import java.util.Map; import java.util.Map;
import java.util.Map.Entry; import java.util.Map.Entry;
import ch.usi.dag.dislreserver.DiSLREServerException;
import ch.usi.dag.dislreserver.DiSLREServerFatalException;
import ch.usi.dag.dislreserver.msg.analyze.AnalysisHandler;
import ch.usi.dag.dislreserver.msg.classinfo.ClassInfoHandler;
import ch.usi.dag.dislreserver.msg.close.CloseHandler;
import ch.usi.dag.dislreserver.msg.newclass.NewClassHandler;
import ch.usi.dag.dislreserver.msg.objfree.ObjectFreeHandler;
import ch.usi.dag.dislreserver.msg.reganalysis.RegAnalysisHandler;
import ch.usi.dag.dislreserver.msg.stringinfo.StringInfoHandler;
import ch.usi.dag.dislreserver.msg.threadend.ThreadEndHandler;
import ch.usi.dag.dislreserver.msg.threadinfo.ThreadInfoHandler;
public final class RequestDispatcher { public final class RequestDispatcher {
......
package ch.usi.dag.dislreserver.reqdispatch; package ch.usi.dag.dislreserver;
import java.io.DataInputStream; import java.io.DataInputStream;
import java.io.DataOutputStream; import java.io.DataOutputStream;
......
package ch.usi.dag.dislreserver.shadow; package ch.usi.dag.dislreserver;
import java.io.Serializable; import java.io.Serializable;
import java.lang.reflect.Modifier; import java.lang.reflect.Modifier;
......