Fix: setup for performance only when running using standalone runner.
authorJan Vrany <jan.vrany@fit.cvut.cz>
Wed, 21 May 2014 13:11:23 +0100
changeset 209 4392e490bd70
parent 207 1697e4572960
child 210 8f2d6f71958f
Fix: setup for performance only when running using standalone runner. Do not override JIT-compiler settings and other values for performance when running in IDE. This was confusing as settings were silently changed when Calipel was loaded into image.
s/stx/BenchmarkPlatformStX.st
s/stx/BenchmarkRunnerAdapterStX.st
s/stx/stx.rc
--- a/s/stx/BenchmarkPlatformStX.st	Wed May 21 12:32:17 2014 +0100
+++ b/s/stx/BenchmarkPlatformStX.st	Wed May 21 13:11:23 2014 +0100
@@ -38,23 +38,9 @@
 initialize
     "Invoked at system start or when the class is dynamically loaded."
 
-    "Set stack size to 16MB"
-    Processor activeProcess setMaximumStackSize: ((1024 * 1024 * 16) max: Process 
-    defaultMaximumStackSize).
-
-    "Setup for performance"
-    JavaNativeMethod cacheNativeImplementation: true.
-
-    ObjectMemory justInTimeCompilation: true.
-    ObjectMemory javaNativeCodeOptimization: true.
-    ObjectMemory javaJustInTimeCompilation: true.
-
-    "ObjectMemory newSpaceSize: ObjectMemory newSpaceSize * 5."
-
-
     Current := self new.
 
-    "Modified (comment): / 06-06-2013 / 09:14:20 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 21-05-2014 / 13:07:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !BenchmarkPlatformStX methodsFor:'accessing-performance counters'!
--- a/s/stx/BenchmarkRunnerAdapterStX.st	Wed May 21 12:32:17 2014 +0100
+++ b/s/stx/BenchmarkRunnerAdapterStX.st	Wed May 21 13:11:23 2014 +0100
@@ -29,6 +29,25 @@
     BenchmarkPlatformStX initialize.
 
     "Modified: / 01-08-2013 / 18:42:03 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+initializeForPerformance
+    "Set's system for maximum performance"
+
+    "Set stack size to 16MB"
+    Processor activeProcess setMaximumStackSize: ((1024 * 1024 * 16) max: Process 
+    defaultMaximumStackSize).
+
+    "Setup for performance"
+    JavaNativeMethod cacheNativeImplementation: true.
+
+    ObjectMemory justInTimeCompilation: true.
+    ObjectMemory javaNativeCodeOptimization: true.
+    ObjectMemory javaJustInTimeCompilation: true.
+
+    "ObjectMemory newSpaceSize: ObjectMemory newSpaceSize * 5."
+
+    "Created: / 21-05-2014 / 13:08:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !BenchmarkRunnerAdapterStX class methodsFor:'debugging'!
@@ -230,6 +249,7 @@
             ]
         ].
 
+        self initializeForPerformance.
         BenchmarkRunner new main: argv
 
     ] on: Error do:[:ex|
@@ -251,7 +271,7 @@
     Smalltalk exit: 0.
 
     "Created: / 06-06-2013 / 10:07:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 01-08-2013 / 18:48:33 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 21-05-2014 / 13:08:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !BenchmarkRunnerAdapterStX class methodsFor:'documentation'!
--- a/s/stx/stx.rc	Wed May 21 12:32:17 2014 +0100
+++ b/s/stx/stx.rc	Wed May 21 13:11:23 2014 +0100
@@ -25,7 +25,7 @@
       VALUE "LegalCopyright", "My CopyRight or CopyLeft\0"
       VALUE "ProductName", "ProductName\0"
       VALUE "ProductVersion", "6.2.3.0\0"
-      VALUE "ProductDate", "Wed, 21 May 2014 10:01:29 GMT\0"
+      VALUE "ProductDate", "Wed, 21 May 2014 12:08:42 GMT\0"
     END
 
   END