Repository: systemml Updated Branches: refs/heads/master ee2aa4e13 -> 44439400c
[MINOR] Fix missing stats reset, consolidated cache stats reset Project: http://git-wip-us.apache.org/repos/asf/systemml/repo Commit: http://git-wip-us.apache.org/repos/asf/systemml/commit/44439400 Tree: http://git-wip-us.apache.org/repos/asf/systemml/tree/44439400 Diff: http://git-wip-us.apache.org/repos/asf/systemml/diff/44439400 Branch: refs/heads/master Commit: 44439400cf51abc84de56e7546a4ceba46e81692 Parents: ee2aa4e Author: Matthias Boehm <mboe...@gmail.com> Authored: Sun Sep 10 20:09:25 2017 -0700 Committer: Matthias Boehm <mboe...@gmail.com> Committed: Sun Sep 10 20:09:25 2017 -0700 ---------------------------------------------------------------------- src/main/java/org/apache/sysml/api/DMLScript.java | 5 +---- .../java/org/apache/sysml/api/mlcontext/ScriptExecutor.java | 5 +---- .../runtime/controlprogram/parfor/RemoteDPParWorkerReducer.java | 4 ---- .../runtime/controlprogram/parfor/RemoteParWorkerMapper.java | 4 ---- src/main/java/org/apache/sysml/utils/Statistics.java | 4 ++++ 5 files changed, 6 insertions(+), 16 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/systemml/blob/44439400/src/main/java/org/apache/sysml/api/DMLScript.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/sysml/api/DMLScript.java b/src/main/java/org/apache/sysml/api/DMLScript.java index eef6990..3912403 100644 --- a/src/main/java/org/apache/sysml/api/DMLScript.java +++ b/src/main/java/org/apache/sysml/api/DMLScript.java @@ -77,7 +77,6 @@ import org.apache.sysml.parser.ParserWrapper; import org.apache.sysml.runtime.DMLRuntimeException; import org.apache.sysml.runtime.DMLScriptException; import org.apache.sysml.runtime.controlprogram.Program; -import org.apache.sysml.runtime.controlprogram.caching.CacheStatistics; import org.apache.sysml.runtime.controlprogram.caching.CacheableData; import org.apache.sysml.runtime.controlprogram.context.ExecutionContext; import org.apache.sysml.runtime.controlprogram.context.ExecutionContextFactory; @@ -829,10 +828,8 @@ public class DMLScript //reset statistics (required if multiple scripts executed in one JVM) Statistics.resetNoOfExecutedJobs(); - if( STATISTICS ) { - CacheStatistics.reset(); + if( STATISTICS ) Statistics.reset(); - } } private static void checkSecuritySetup(DMLConfig config) http://git-wip-us.apache.org/repos/asf/systemml/blob/44439400/src/main/java/org/apache/sysml/api/mlcontext/ScriptExecutor.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/sysml/api/mlcontext/ScriptExecutor.java b/src/main/java/org/apache/sysml/api/mlcontext/ScriptExecutor.java index 7e78891..f4f8803 100644 --- a/src/main/java/org/apache/sysml/api/mlcontext/ScriptExecutor.java +++ b/src/main/java/org/apache/sysml/api/mlcontext/ScriptExecutor.java @@ -48,7 +48,6 @@ import org.apache.sysml.parser.ParserWrapper; import org.apache.sysml.runtime.DMLRuntimeException; import org.apache.sysml.runtime.controlprogram.LocalVariableMap; import org.apache.sysml.runtime.controlprogram.Program; -import org.apache.sysml.runtime.controlprogram.caching.CacheStatistics; import org.apache.sysml.runtime.controlprogram.context.ExecutionContext; import org.apache.sysml.runtime.controlprogram.context.ExecutionContextFactory; import org.apache.sysml.runtime.instructions.gpu.context.GPUContextPool; @@ -376,10 +375,8 @@ public class ScriptExecutor { setGlobalFlags(); // reset all relevant summary statistics Statistics.resetNoOfExecutedJobs(); - if (statistics) { - CacheStatistics.reset(); + if (statistics) Statistics.reset(); - } } /** http://git-wip-us.apache.org/repos/asf/systemml/blob/44439400/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParWorkerReducer.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParWorkerReducer.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParWorkerReducer.java index d022ac8..3dda64c 100644 --- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParWorkerReducer.java +++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteDPParWorkerReducer.java @@ -33,7 +33,6 @@ import org.apache.sysml.conf.ConfigurationManager; import org.apache.sysml.runtime.DMLRuntimeException; import org.apache.sysml.runtime.controlprogram.ParForProgramBlock.PDataPartitionFormat; import org.apache.sysml.runtime.controlprogram.ParForProgramBlock.PartitionFormat; -import org.apache.sysml.runtime.controlprogram.caching.CacheStatistics; import org.apache.sysml.runtime.controlprogram.caching.CacheableData; import org.apache.sysml.runtime.controlprogram.caching.MatrixObject; import org.apache.sysml.runtime.controlprogram.parfor.Task.TaskType; @@ -189,10 +188,7 @@ public class RemoteDPParWorkerReducer extends ParWorker //always reset stats because counters per map task (for case of JVM reuse) if( DMLScript.STATISTICS && !InfrastructureAnalyzer.isLocalMode(job) ) - { - CacheStatistics.reset(); Statistics.reset(); - } } @Override http://git-wip-us.apache.org/repos/asf/systemml/blob/44439400/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParWorkerMapper.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParWorkerMapper.java b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParWorkerMapper.java index 4befedc..6ce5d18 100644 --- a/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParWorkerMapper.java +++ b/src/main/java/org/apache/sysml/runtime/controlprogram/parfor/RemoteParWorkerMapper.java @@ -33,7 +33,6 @@ import org.apache.sysml.api.DMLScript; import org.apache.sysml.conf.ConfigurationManager; import org.apache.sysml.runtime.controlprogram.LocalVariableMap; import org.apache.sysml.runtime.controlprogram.ParForProgramBlock; -import org.apache.sysml.runtime.controlprogram.caching.CacheStatistics; import org.apache.sysml.runtime.controlprogram.caching.CacheableData; import org.apache.sysml.runtime.controlprogram.caching.MatrixObject; import org.apache.sysml.runtime.controlprogram.parfor.stat.InfrastructureAnalyzer; @@ -212,10 +211,7 @@ public class RemoteParWorkerMapper extends ParWorker //MapReduceBase not requir //always reset stats because counters per map task (for case of JVM reuse) if( DMLScript.STATISTICS && !InfrastructureAnalyzer.isLocalMode(job) ) - { - CacheStatistics.reset(); Statistics.reset(); - } } @Override http://git-wip-us.apache.org/repos/asf/systemml/blob/44439400/src/main/java/org/apache/sysml/utils/Statistics.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/sysml/utils/Statistics.java b/src/main/java/org/apache/sysml/utils/Statistics.java index 5ff2762..bab668f 100644 --- a/src/main/java/org/apache/sysml/utils/Statistics.java +++ b/src/main/java/org/apache/sysml/utils/Statistics.java @@ -407,6 +407,8 @@ public class Statistics codegenEnumEvalP.reset(); codegenCompileTime.reset(); codegenClassCompileTime.reset(); + codegenPlanCacheHits.reset(); + codegenPlanCacheTotal.reset(); parforOptCount = 0; parforOptTime = 0; @@ -417,6 +419,8 @@ public class Statistics lTotalLixUIP.reset(); lTotalUIPVar.reset(); + CacheStatistics.reset(); + resetJITCompileTime(); resetJVMgcTime(); resetJVMgcCount();