--- a/MessageTracer.st Tue May 04 14:08:13 1999 +0200
+++ b/MessageTracer.st Sat May 08 15:16:03 1999 +0200
@@ -780,7 +780,7 @@
MethodCounts notNil ifTrue:[
aMethod isWrapped ifTrue:[
- MethodCounts removeKey:aMethod originalMethod ifAbsent:nil.
+ MethodCounts at:aMethod originalMethod put:0.
].
].
@@ -790,6 +790,11 @@
stopCountingMethod:aMethod
"remove counting of aMethod"
+ MethodCounts notNil ifTrue:[
+ aMethod isWrapped ifTrue:[
+ MethodCounts removeKey:aMethod originalMethod ifAbsent:nil.
+ ].
+ ].
^ self unwrapMethod:aMethod
"Modified: 15.12.1995 / 15:43:53 / cg"
@@ -873,16 +878,17 @@
memoryUsageOfMethod:aMethod
"return the current count"
- |count memUse|
+ |count memUse orgMethod|
(MethodCounts isNil or:[MethodMemoryUsage isNil]) ifTrue:[^ 0].
aMethod isWrapped ifTrue:[
- count := MethodCounts at:aMethod originalMethod ifAbsent:nil.
- memUse := MethodMemoryUsage at:aMethod originalMethod ifAbsent:nil.
+ orgMethod := aMethod originalMethod.
+ count := MethodCounts at:orgMethod ifAbsent:nil.
+ memUse := MethodMemoryUsage at:orgMethod ifAbsent:nil.
].
memUse isNil ifTrue:[
- count := MethodCounts at:aMethod ifAbsent:0.
- memUse := MethodMemoryUsage at:aMethod ifAbsent:0.
+ count := MethodCounts at:aMethod ifAbsent:0.
+ memUse := MethodMemoryUsage at:aMethod ifAbsent:0.
].
count = 0 ifTrue:[^ 0].
^ memUse//count
@@ -893,11 +899,14 @@
resetMemoryUsageOfMethod:aMethod
"reset the current usage"
+ |orgMethod|
+
MethodCounts notNil ifTrue:[
MethodMemoryUsage notNil ifTrue:[
aMethod isWrapped ifTrue:[
- MethodCounts removeKey:aMethod originalMethod ifAbsent:nil.
- MethodMemoryUsage removeKey:aMethod originalMethod ifAbsent:nil.
+ orgMethod := aMethod originalMethod.
+ MethodCounts at:orgMethod put:0.
+ MethodMemoryUsage at:orgMethod put:nil.
]
].
].
@@ -908,6 +917,17 @@
stopCountingMemoryUsageOfMethod:aMethod
"remove counting memory of aMethod"
+ |orgMethod|
+
+ MethodCounts notNil ifTrue:[
+ MethodMemoryUsage notNil ifTrue:[
+ aMethod isWrapped ifTrue:[
+ orgMethod := aMethod originalMethod.
+ MethodCounts removeKey:orgMethod ifAbsent:nil.
+ MethodMemoryUsage removeKey:orgMethod ifAbsent:nil.
+ ]
+ ].
+ ].
^ self unwrapMethod:aMethod
"Modified: 18.12.1995 / 21:54:36 / stefan"
@@ -2872,6 +2892,6 @@
!MessageTracer class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic3/MessageTracer.st,v 1.79 1999-02-25 15:40:43 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic3/MessageTracer.st,v 1.80 1999-05-08 13:16:03 cg Exp $'
! !
MessageTracer initialize!
--- a/MsgTracer.st Tue May 04 14:08:13 1999 +0200
+++ b/MsgTracer.st Sat May 08 15:16:03 1999 +0200
@@ -780,7 +780,7 @@
MethodCounts notNil ifTrue:[
aMethod isWrapped ifTrue:[
- MethodCounts removeKey:aMethod originalMethod ifAbsent:nil.
+ MethodCounts at:aMethod originalMethod put:0.
].
].
@@ -790,6 +790,11 @@
stopCountingMethod:aMethod
"remove counting of aMethod"
+ MethodCounts notNil ifTrue:[
+ aMethod isWrapped ifTrue:[
+ MethodCounts removeKey:aMethod originalMethod ifAbsent:nil.
+ ].
+ ].
^ self unwrapMethod:aMethod
"Modified: 15.12.1995 / 15:43:53 / cg"
@@ -873,16 +878,17 @@
memoryUsageOfMethod:aMethod
"return the current count"
- |count memUse|
+ |count memUse orgMethod|
(MethodCounts isNil or:[MethodMemoryUsage isNil]) ifTrue:[^ 0].
aMethod isWrapped ifTrue:[
- count := MethodCounts at:aMethod originalMethod ifAbsent:nil.
- memUse := MethodMemoryUsage at:aMethod originalMethod ifAbsent:nil.
+ orgMethod := aMethod originalMethod.
+ count := MethodCounts at:orgMethod ifAbsent:nil.
+ memUse := MethodMemoryUsage at:orgMethod ifAbsent:nil.
].
memUse isNil ifTrue:[
- count := MethodCounts at:aMethod ifAbsent:0.
- memUse := MethodMemoryUsage at:aMethod ifAbsent:0.
+ count := MethodCounts at:aMethod ifAbsent:0.
+ memUse := MethodMemoryUsage at:aMethod ifAbsent:0.
].
count = 0 ifTrue:[^ 0].
^ memUse//count
@@ -893,11 +899,14 @@
resetMemoryUsageOfMethod:aMethod
"reset the current usage"
+ |orgMethod|
+
MethodCounts notNil ifTrue:[
MethodMemoryUsage notNil ifTrue:[
aMethod isWrapped ifTrue:[
- MethodCounts removeKey:aMethod originalMethod ifAbsent:nil.
- MethodMemoryUsage removeKey:aMethod originalMethod ifAbsent:nil.
+ orgMethod := aMethod originalMethod.
+ MethodCounts at:orgMethod put:0.
+ MethodMemoryUsage at:orgMethod put:nil.
]
].
].
@@ -908,6 +917,17 @@
stopCountingMemoryUsageOfMethod:aMethod
"remove counting memory of aMethod"
+ |orgMethod|
+
+ MethodCounts notNil ifTrue:[
+ MethodMemoryUsage notNil ifTrue:[
+ aMethod isWrapped ifTrue:[
+ orgMethod := aMethod originalMethod.
+ MethodCounts removeKey:orgMethod ifAbsent:nil.
+ MethodMemoryUsage removeKey:orgMethod ifAbsent:nil.
+ ]
+ ].
+ ].
^ self unwrapMethod:aMethod
"Modified: 18.12.1995 / 21:54:36 / stefan"
@@ -2872,6 +2892,6 @@
!MessageTracer class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libbasic3/Attic/MsgTracer.st,v 1.79 1999-02-25 15:40:43 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libbasic3/Attic/MsgTracer.st,v 1.80 1999-05-08 13:16:03 cg Exp $'
! !
MessageTracer initialize!