gem5/util/m5
Prakash Ramrakhyani e4830ad2eb gem5ops: Implement Java JNI for gem5Ops
These ops allow gem5 ops to be called from within java programs like the following:
import jni.gem5Op;

public  class HelloWorld {

    public static void main(String[] args) {
        gem5Op gem5 = new gem5Op();
        System.out.println("Rpns0:" + gem5.rpns());
        System.out.println("Rpns1:" + gem5.rpns());
    }

    static {
        System.loadLibrary("gem5OpJni");
    }
}

When building you need to make sure classpath include gem5OpJni.jar:
javac -classpath $CLASSPATH:/path/to/gem5OpJni.jar HelloWorld.java

and when running you need to make sure both the java and library path are set:
java -classpath $CLASSPATH:/path/to/gem5OpJni.jar -Djava.library.path=/path/to/libgem5OpJni.so HelloWorld
2011-09-13 12:06:13 -05:00
..
jni gem5ops: Implement Java JNI for gem5Ops 2011-09-13 12:06:13 -05:00
jni_gem5Op.c gem5ops: Implement Java JNI for gem5Ops 2011-09-13 12:06:13 -05:00
m5.c includes: sort all includes 2011-04-15 10:44:06 -07:00
m5op.h ARM: Add m5ops and related support for workbegin() and workend() to ARM ISA. 2011-06-17 12:20:10 -05:00
m5op_alpha.S CPA: Add m5ops for critical path annotation work. 2009-02-26 19:29:16 -05:00
m5op_arm.S ARM: Cleanup m5ops usage of r0 and r1 a bit. 2011-06-17 12:20:11 -05:00
m5op_sparc.S make m5 readfile work on solaris... we can have a solaris regression soon! 2007-02-24 22:05:01 -05:00
m5op_x86.S m5: added work completed monitoring support 2011-02-06 22:14:19 -08:00
m5ops.h m5: added work completed monitoring support 2011-02-06 22:14:19 -08:00
Makefile.alpha add pseduo instruction support for sparc 2007-02-21 21:06:17 -05:00
Makefile.arm gem5ops: Implement Java JNI for gem5Ops 2011-09-13 12:06:13 -05:00
Makefile.sparc make m5 readfile work on solaris... we can have a solaris regression soon! 2007-02-24 22:05:01 -05:00
Makefile.thumb ARM: Add support for M5 ops in the ARM ISA 2010-11-08 13:58:24 -06:00
Makefile.x86 X86: Set up support for adding m5 pseudo insts to a binary. 2009-01-07 00:05:33 -08:00