--- a/MessageTracer.st Fri Jan 22 07:02:48 2016 +0100
+++ b/MessageTracer.st Sat Jan 23 06:59:16 2016 +0100
@@ -1059,48 +1059,48 @@
|oldPriority oldScavengeCount oldNewUsed|
MethodCounts isNil ifTrue:[
- MethodCounts := IdentityDictionary new.
+ MethodCounts := IdentityDictionary new.
].
MethodMemoryUsage isNil ifTrue:[
- MethodMemoryUsage := IdentityDictionary new.
+ MethodMemoryUsage := IdentityDictionary new.
].
MethodCounts at:aMethod put:0.
MethodMemoryUsage at:aMethod put:0.
^ self wrapMethod:aMethod
- onEntry:[:con |
- oldPriority := Processor activeProcess changePriority:(Processor userInterruptPriority).
- oldNewUsed := ObjectMemory newSpaceUsed.
- oldScavengeCount := ObjectMemory scavengeCount.
- ]
- onExit:[:con :retVal |
- |cnt memUse scavenges|
-
- memUse := ObjectMemory newSpaceUsed - oldNewUsed.
- scavenges := ObjectMemory scavengeCount - oldScavengeCount.
- scavenges ~= 0 ifTrue:[
- memUse := memUse + (ObjectMemory newSpaceSize * scavenges)
- ].
-
- MethodCounts notNil ifTrue:[
- cnt := MethodCounts at:aMethod ifAbsent:0.
- MethodCounts at:aMethod put:(cnt + 1).
- ].
- MethodMemoryUsage notNil ifTrue:[
- cnt := MethodMemoryUsage at:aMethod ifAbsent:0.
- MethodMemoryUsage at:aMethod put:(cnt + memUse).
- ].
- Processor activeProcess priority:oldPriority.
- MessageTracer changed:#statistics: with:aMethod.
- aMethod changed:#statistics.
- retVal
- ]
- onUnwind:[
- oldPriority notNil ifTrue:[
- Processor activeProcess priority:oldPriority
- ]
- ]
+ onEntry:[:con |
+ oldPriority := Processor activeProcess changePriority:(Processor userInterruptPriority).
+ oldNewUsed := ObjectMemory newSpaceUsed.
+ oldScavengeCount := ObjectMemory scavengeCount.
+ ]
+ onExit:[:con :retVal |
+ |cnt memUse scavenges|
+
+ memUse := ObjectMemory newSpaceUsed - oldNewUsed.
+ scavenges := ObjectMemory scavengeCount - oldScavengeCount.
+ scavenges ~~ 0 ifTrue:[
+ memUse := memUse + (ObjectMemory newSpaceSize * scavenges)
+ ].
+
+ MethodCounts notNil ifTrue:[
+ cnt := MethodCounts at:aMethod ifAbsent:0.
+ MethodCounts at:aMethod put:(cnt + 1).
+ ].
+ MethodMemoryUsage notNil ifTrue:[
+ cnt := MethodMemoryUsage at:aMethod ifAbsent:0.
+ MethodMemoryUsage at:aMethod put:(cnt + memUse).
+ ].
+ Processor activeProcess priority:oldPriority.
+ MessageTracer changed:#statistics: with:aMethod.
+ aMethod changed:#statistics.
+ retVal
+ ]
+ onUnwind:[
+ oldPriority notNil ifTrue:[
+ Processor activeProcess priority:oldPriority
+ ]
+ ]
"
MessageTracer countMemoryUsageOfMethod:(Integer compiledMethodAt:#factorialR).
@@ -3889,7 +3889,7 @@
!MessageTracer class methodsFor:'documentation'!
version_CVS
- ^ '$Header: /cvs/stx/stx/libbasic3/MessageTracer.st,v 1.137 2015-02-18 15:30:07 vrany Exp $'
+ ^ '$Header$'
! !