changed: #spyOn:interval:
authorClaus Gittinger <cg@exept.de>
Tue, 23 Oct 2012 11:53:25 +0200
changeset 2932 eed4e9fc5400
parent 2931 8aa6fb3f210b
child 2933 d93d281cbc09
changed: #spyOn:interval: experimental: don't probe at super-high prio
MessageTally.st
--- a/MessageTally.st	Mon Oct 22 10:13:16 2012 +0200
+++ b/MessageTally.st	Tue Oct 23 11:53:25 2012 +0200
@@ -562,12 +562,14 @@
 spyOn:aBlock interval:ms
     "spy on execution time, generate a hierarchical call information"
 
-    |probing delay probingProcess probedProcess retVal|
+    |probing delay probingProcess probedProcess retVal runPrio probePrio|
 
     theBlock := aBlock.
+    runPrio := (Processor activePriority-1 "userInterruptPriority-1").
+    probePrio := (Processor activePriority"+1" "Processor userInterruptPriority+1").
 
     Processor activeProcess 
-        withPriority:(Processor userInterruptPriority-1) 
+        withPriority:runPrio 
         do:[
 
             probingProcess := [
@@ -575,14 +577,14 @@
 
                 p := probedProcess.
                 [probing] whileTrue:[
-                    delay wait.
+                    delay wait. 
                     executing ifTrue:[
                         self count:p suspendedContext
                     ]
                 ].
             ] newProcess.
 
-            probingProcess priority:(Processor userInterruptPriority+1).
+            probingProcess priority:probePrio.
 
             delay := (Delay forMilliseconds:ms).
             ntally := 0.
@@ -619,9 +621,9 @@
 !MessageTally class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic3/MessageTally.st,v 1.46 2010-07-04 08:06:24 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/MessageTally.st,v 1.47 2012-10-23 09:53:25 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libbasic3/MessageTally.st,v 1.46 2010-07-04 08:06:24 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic3/MessageTally.st,v 1.47 2012-10-23 09:53:25 cg Exp $'
 ! !