diff --git a/src/emulator/pin/causalityTool.cpp b/src/emulator/pin/causalityTool.cpp index dbd1e51..4bb3984 100755 --- a/src/emulator/pin/causalityTool.cpp +++ b/src/emulator/pin/causalityTool.cpp @@ -688,7 +688,9 @@ VOID Instruction(INS ins, VOID *v) { UINT32 memOperands = INS_MemoryOperandCount(ins); - if (INS_IsControlFlow(ins))//INS_IsBranchOrCall(ins))//INS_IsIndirectBranchOrCall(ins)) + //if (INS_IsIndirectBranchOrCall(ins))//old versions of PIN + if (INS_IsBranchOrCall(ins))//use this for older versions of PIN like 97554 + //if (INS_IsControlFlow(ins))//use this for newer versions of PIN like 98332 { INS_InsertCall(ins, IPOINT_BEFORE, (AFUNPTR) BrnFun, IARG_THREAD_ID, IARG_BRANCH_TARGET_ADDR, IARG_BRANCH_TAKEN, IARG_INST_PTR, diff --git a/src/emulator/pin/makefile_linux_mac b/src/emulator/pin/makefile_linux_mac index abd8b93..72c6e61 100755 --- a/src/emulator/pin/makefile_linux_mac +++ b/src/emulator/pin/makefile_linux_mac @@ -1,4 +1,4 @@ -PIN_KIT ?=/home/rajshekar/softwares/pin-98332/ +PIN_KIT ?=/mnt/remote_scratch/softwares/pin-97554/ CXX=$(shell make PIN_ROOT=$(PIN_KIT) VAR=CXX -f pin_makefile print_var) LINKER=$(shell make PIN_ROOT=$(PIN_KIT) VAR=LINKER -f pin_makefile print_var) TOOL_CXXFLAGS=$(shell make PIN_ROOT=$(PIN_KIT) VAR=TOOL_CXXFLAGS -f pin_makefile print_var) @@ -60,21 +60,23 @@ $(BINDIR)/shmem.$(OBJ_EXTENSION): $(COMMDIR)/IPCBase.h $(COMMDIR)/shm/shmem.h $ ################################ JNI stuff comes here ############################################ -#JNIPACKAGE = emulatorinterface.communication.shm.SharedMem #use this for java-8 JNIPACKAGE = ../../simulator/emulatorinterface/communication/shm/SharedMem.java #use this for java-11 -#JNINCLUDE =-I/usr/lib/jvm/java-8-openjdk-amd64/include/linux -I/usr/lib/jvm/java-8-openjdk-amd64/include #use this for java-8 JNINCLUDE =-I/usr/lib/jvm/java-11-openjdk-amd64/include/linux -I/usr/lib/jvm/java-11-openjdk-amd64/include #use this for java-11 JNILinkingFlags = -shared -Wall $(POSITION_INDEPENDENCE) -#JAVAH = javah -jni #use this for java-8 JAVAH = javac #use this for java-11 +JAVAHCOMMAND = $(JAVAH) -classpath $(TOPBINDIR) -h $(JNIBINDIR) $(JNIPACKAGE); mv $(JNIBINDIR)/emulatorinterface_communication_shm_SharedMem.h $(JNIBINDIR)/SharedMem.h +ifeq ($(shell java -version 2>&1|grep 1.8.0 >/dev/null; printf $$?),0) + JNIPACKAGE = emulatorinterface.communication.shm.SharedMem #use this for java-8 + JNINCLUDE =-I/usr/lib/jvm/java-8-openjdk-amd64/include/linux -I/usr/lib/jvm/java-8-openjdk-amd64/include #use this for java-8 + JAVAH = javah -jni #use this for java-8 + JAVAHCOMMAND = $(JAVAH) -classpath $(TOPBINDIR) -o $(JNIBINDIR)/SharedMem.h $(JNIPACKAGE) #use this for java-8 +endif $(JNIBINDIR)/libshmlib.$(LIB_EXTENSION): $(JNIBINDIR)/SharedMem.h $(COMMDIR)/shm/JNIShm.c $(COMMDIR)/common.h $(shell $(JNICOMMAND)) $(JNIBINDIR)/SharedMem.h: $(TOPBINDIR)/emulatorinterface/communication/shm/SharedMem.class - #$(JAVAH) -classpath $(TOPBINDIR) -o $(JNIBINDIR)/SharedMem.h $(JNIPACKAGE) #use this for java-8 - $(JAVAH) -classpath $(TOPBINDIR) -h $(JNIBINDIR) $(JNIPACKAGE) #use this line and the next for java-11 - mv $(JNIBINDIR)/emulatorinterface_communication_shm_SharedMem.h $(JNIBINDIR)/SharedMem.h + $(JAVAHCOMMAND) clean: rm -rf $(BINDIR) $(JNIBINDIR) diff --git a/src/simulator/config/config.xml b/src/simulator/config/config.xml index affeeb5..376f77c 100755 --- a/src/simulator/config/config.xml +++ b/src/simulator/config/config.xml @@ -31,12 +31,12 @@ TDP = 15W - none + pin - file + sharedMemory @@ -49,11 +49,11 @@ TDP = 15W /home/rajshekar/projects/tejas/tests/test1_trace - /home/rajshekar/softwares/pin-98332/ - /home/rajshekar/projects/tejas/workspace/Tejas/src/emulator/pin/obj-pin/causalityTool.so + /mnt/remote_scratch/softwares/pin-97554/ + /mnt/remote_scratch1/rajshekar/projects/tejas/workspace/Tejas/src/emulator/pin/obj-pin/causalityTool.so TODO/home/prathmesh/workspace/qemu/x86_64-linux-user/qemu-x86_64 /home/prathmesh/tmp/testQemu.o - /home/rajshekar/projects/tejas/workspace/Tejas/src/emulator/pin/obj-comm/ - /home/rajshekar_resources/tejas_configs/getBenchmarkPID.sh + /mnt/remote_scratch1/rajshekar/projects/tejas/workspace/Tejas/src/emulator/pin/obj-comm/ + /home/rajshekar/resources/tejas_configs/getBenchmarkPID.sh /home/rajshekar/resources/tejas_configs/killAllDescendents.sh @@ -77,7 +77,7 @@ TDP = 15W false /mnt/srishtistr0/scratch/rajshekar/tejas/PinPoints_working_directory/soplex.test.Data/t.sorted 00000000 - false + true 2000000 false add @@ -112,12 +112,12 @@ TDP = 15W outOfOrder - TAGE + TAGE-SC-L 8 16 17 2 - /home/rajshekar/projects/tejas/workspace/Tejas/src/simulator/pipeline/branchpredictor/TAGESCL/ + /mnt/remote_scratch1/rajshekar/projects/tejas/workspace/Tejas/src/simulator/pipeline/branchpredictor/TAGESCL/ 0.0178 0.0962 @@ -477,7 +477,7 @@ TDP = 15W NOC - /home/rajshekar/resources/tejas_configs/config_2core_kabylake_NocConfig.txt + /nfs_home/rajshekar/resources/tejas_configs/config_2core_kabylake_NocConfig.txt STATIC 4 FCFS diff --git a/src/simulator/pipeline/branchpredictor/TAGESCL/Makefile b/src/simulator/pipeline/branchpredictor/TAGESCL/Makefile index 1b34d5b..2ccd0f0 100644 --- a/src/simulator/pipeline/branchpredictor/TAGESCL/Makefile +++ b/src/simulator/pipeline/branchpredictor/TAGESCL/Makefile @@ -1,7 +1,11 @@ +javaver=java-11 +ifeq ($(shell java -version 2>&1|grep 1.8.0 >/dev/null; printf $$?),0) + javaver=java-8 +endif + all: javac -h . TAGESCLInvoker.java - #gcc -fPIC -I/usr/lib/jvm/java-8-openjdk-amd64/include/ -I/usr/lib/jvm/java-8-openjdk-amd64/include/linux/ -shared -o libnative.so pipeline_branchpredictor_TAGESCL_TAGESCLInvoker.cc - gcc -fPIC -I/usr/lib/jvm/java-11-openjdk-amd64/include/ -I/usr/lib/jvm/java-11-openjdk-amd64/include/linux/ -shared -o libnative.so pipeline_branchpredictor_TAGESCL_TAGESCLInvoker.cc + gcc -fPIC -I/usr/lib/jvm/$(javaver)-openjdk-amd64/include/ -I/usr/lib/jvm/$(javaver)-openjdk-amd64/include/linux/ -shared -o libnative.so pipeline_branchpredictor_TAGESCL_TAGESCLInvoker.cc clean: rm -f *.h rm -f *.class