MessageTracer.st
changeset 501 c3ccbea7930c
parent 496 4efe08df0038
child 503 67f6584e0f9f
equal deleted inserted replaced
500:6d178e68a833 501:c3ccbea7930c
   660 
   660 
   661 countMethod:aMethod
   661 countMethod:aMethod
   662     "arrange for a aMethods execution to be counted.
   662     "arrange for a aMethods execution to be counted.
   663      Use unwrapMethod to remove this."
   663      Use unwrapMethod to remove this."
   664 
   664 
   665     |lvl inside|
       
   666 
       
   667     MethodCounts isNil ifTrue:[
   665     MethodCounts isNil ifTrue:[
   668 	MethodCounts := IdentityDictionary new.
   666 	MethodCounts := IdentityDictionary new.
   669     ].
   667     ].
   670     MethodCounts at:aMethod put:0.
   668     MethodCounts at:aMethod put:0.
   671 
   669 
   732 
   730 
   733 countMemoryUsageOfMethod:aMethod
   731 countMemoryUsageOfMethod:aMethod
   734     "arrange for aMethods memory usage to be counted.
   732     "arrange for aMethods memory usage to be counted.
   735      Use unwrapMethod to remove this."
   733      Use unwrapMethod to remove this."
   736 
   734 
   737     |lvl inside oldPriority oldScavengeCount oldNewUsed|
   735     |oldPriority oldScavengeCount oldNewUsed|
   738 
   736 
   739     MethodCounts isNil ifTrue:[
   737     MethodCounts isNil ifTrue:[
   740 	MethodCounts := IdentityDictionary new.
   738 	MethodCounts := IdentityDictionary new.
   741     ].
   739     ].
   742     MethodMemoryUsage isNil ifTrue:[
   740     MethodMemoryUsage isNil ifTrue:[
   885 
   883 
   886 timeMethod:aMethod
   884 timeMethod:aMethod
   887     "arrange for a aMethods execution time to be measured.
   885     "arrange for a aMethods execution time to be measured.
   888      Use unwrapMethod to remove this."
   886      Use unwrapMethod to remove this."
   889 
   887 
   890     |lvl inside t0|
   888     |t0|
   891 
   889 
   892     MethodTiming isNil ifTrue:[
   890     MethodTiming isNil ifTrue:[
   893         MethodTiming := IdentityDictionary new.
   891         MethodTiming := IdentityDictionary new.
   894     ].
   892     ].
   895     MethodTiming removeKey:aMethod ifAbsent:nil.
   893     MethodTiming removeKey:aMethod ifAbsent:nil.
  1374 !
  1372 !
  1375 
  1373 
  1376 untrap:anObject selector:aSelector
  1374 untrap:anObject selector:aSelector
  1377     "remove trap on aSelector from anObject"
  1375     "remove trap on aSelector from anObject"
  1378 
  1376 
  1379     |orgClass idx sels dict|
  1377     |orgClass dict|
  1380 
  1378 
  1381     orgClass := anObject class.
  1379     orgClass := anObject class.
  1382     orgClass category == #'* trapping *' ifFalse:[^ self].
  1380     orgClass category == #'* trapping *' ifFalse:[^ self].
  1383 
  1381 
  1384     dict := orgClass methodDictionary.
  1382     dict := orgClass methodDictionary.
  1871 ! !
  1869 ! !
  1872 
  1870 
  1873 !MessageTracer  class methodsFor:'documentation'!
  1871 !MessageTracer  class methodsFor:'documentation'!
  1874 
  1872 
  1875 version
  1873 version
  1876     ^ '$Header: /cvs/stx/stx/libbasic3/MessageTracer.st,v 1.45 1996-10-14 14:54:08 cg Exp $'
  1874     ^ '$Header: /cvs/stx/stx/libbasic3/MessageTracer.st,v 1.46 1996-10-15 20:46:11 cg Exp $'
  1877 ! !
  1875 ! !
  1878 MessageTracer initialize!
  1876 MessageTracer initialize!