From 075e10c8e6f4b9a23e2b7a2cf0f1adae786c8c5b Mon Sep 17 00:00:00 2001 From: bdemsky Date: Fri, 21 Mar 2008 21:24:15 +0000 Subject: [PATCH] add option to skip prefetches for method... --- .../Prefetch/MatrixMultiply/MatrixMultiply.java | 9 ++++----- Robust/src/Benchmarks/Prefetch/MatrixMultiply/makefile | 2 +- Robust/src/IR/Flat/BuildCode.java | 3 ++- Robust/src/IR/MethodDescriptor.java | 4 ++++ Robust/src/IR/State.java | 2 ++ Robust/src/Main/Main.java | 2 ++ Robust/src/buildscript | 5 +++++ 7 files changed, 20 insertions(+), 7 deletions(-) diff --git a/Robust/src/Benchmarks/Prefetch/MatrixMultiply/MatrixMultiply.java b/Robust/src/Benchmarks/Prefetch/MatrixMultiply/MatrixMultiply.java index 6d7de250..f35dbb25 100644 --- a/Robust/src/Benchmarks/Prefetch/MatrixMultiply/MatrixMultiply.java +++ b/Robust/src/Benchmarks/Prefetch/MatrixMultiply/MatrixMultiply.java @@ -44,17 +44,17 @@ public class MatrixMultiply extends Thread{ } public static void main(String[] args) { - int mid1 = (128<<24)|(195<<16)|(175<<8)|70; + int mid1 = (128<<24)|(195<<16)|(175<<8)|73; int mid2 = (128<<24)|(195<<16)|(175<<8)|69; int mid3 = (128<<24)|(195<<16)|(175<<8)|71; - int NUM_THREADS = 2; + int NUM_THREADS = 1; int i, j, p, q, r; MatrixMultiply[] mm; MatrixMultiply tmp; MMul matrix; atomic { - matrix = global new MMul(800, 800, 800); + matrix = global new MMul(400, 400, 400); matrix.setValues(); matrix.transpose(); } @@ -64,8 +64,7 @@ public class MatrixMultiply extends Thread{ } atomic { - mm[0] = global new MatrixMultiply(matrix,0,0,799,300); - mm[1] = global new MatrixMultiply(matrix,0,301,799,799); + mm[0] = global new MatrixMultiply(matrix,0,0,399,399); } atomic { diff --git a/Robust/src/Benchmarks/Prefetch/MatrixMultiply/makefile b/Robust/src/Benchmarks/Prefetch/MatrixMultiply/makefile index 1910ce11..c4264540 100644 --- a/Robust/src/Benchmarks/Prefetch/MatrixMultiply/makefile +++ b/Robust/src/Benchmarks/Prefetch/MatrixMultiply/makefile @@ -1,6 +1,6 @@ MAINCLASS=MatrixMultiply SRC=${MAINCLASS}.java -FLAGS=-dsm -prefetch -nooptimize -debug -mainclass ${MAINCLASS} -o ${MAINCLASS} +FLAGS=-dsm -prefetch -optimize -profile -debug -mainclass ${MAINCLASS} -o ${MAINCLASS} default: ../../../buildscript ${FLAGS} ${SRC} clean: diff --git a/Robust/src/IR/Flat/BuildCode.java b/Robust/src/IR/Flat/BuildCode.java index ca41c728..c7c7e61c 100644 --- a/Robust/src/IR/Flat/BuildCode.java +++ b/Robust/src/IR/Flat/BuildCode.java @@ -1422,7 +1422,8 @@ public class BuildCode { generateFlatFlagActionNode(fm, lb, (FlatFlagActionNode) fn, output); return; case FKind.FlatPrefetchNode: - generateFlatPrefetchNode(fm,lb, (FlatPrefetchNode) fn, output); + if (!state.excprefetch.contains(fm.getMethod().getClassMethodName())) + generateFlatPrefetchNode(fm,lb, (FlatPrefetchNode) fn, output); return; } throw new Error(); diff --git a/Robust/src/IR/MethodDescriptor.java b/Robust/src/IR/MethodDescriptor.java index 1f781f3f..6091ea5a 100644 --- a/Robust/src/IR/MethodDescriptor.java +++ b/Robust/src/IR/MethodDescriptor.java @@ -84,6 +84,10 @@ public class MethodDescriptor extends Descriptor { return thisvd; } + public String getClassMethodName() { + return cd+"."+name; + } + public String getSafeMethodDescriptor() { String st=""; for(int i=0;i