[squeak-dev] The Trunk: System-ar.147.mcz

commits at source.squeak.org commits at source.squeak.org
Mon Sep 14 00:20:02 UTC 2009


Andreas Raab uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-ar.147.mcz

==================== Summary ====================

Name: System-ar.147
Author: ar
Time: 13 September 2009, 5:19:14 am
UUID: d36c6926-3c1c-4a41-9339-d1eae6337d48
Ancestors: System-cbc.146, System-ul.146

Merging System-ul.146:

- fix: http://bugs.squeak.org/view.php?id=7394 (System-cbc.146 also contains this fix)
- fix: when MessageTally >> #spyEvery:on: is interrupted with alt + ., the Timer variable becomes nil, so the #ensure: block in will raise a DNU when the original process is resumed.

=============== Diff against System-cbc.146 ===============

Item was changed:
  ----- Method: MessageTally>>spyEvery:on: (in category 'initialize-release') -----
  spyEvery: millisecs on: aBlock 
  	"Create a spy and spy on the given block at the specified rate."
  	"Spy only on the active process (in which aBlock is run)"
  
  	| myDelay startTime time0 observedProcess |
  	aBlock isBlock
  		ifFalse: [self error: 'spy needs a block here'].
  	self class: aBlock receiver class method: aBlock method.
  		"set up the probe"
  	observedProcess _ Processor activeProcess.
  	myDelay := Delay forMilliseconds: millisecs.
  	time0 := Time millisecondClockValue.
  	gcStats := SmalltalkImage current getVMParameters.
  	Timer := [
  		[true] whileTrue: [
  			startTime := Time millisecondClockValue.
  			myDelay wait.
  			self tally: Processor preemptedProcess suspendedContext
  				in: (ShowProcesses ifTrue: [
  					observedProcess == Processor preemptedProcess ifTrue: [observedProcess] ifFalse: [nil]])
  				"tally can be > 1 if ran a long primitive"
  				by: (Time millisecondClockValue - startTime) // millisecs].
  		nil] newProcess.
  	Timer priority: Processor timingPriority-1.
  		"activate the probe and evaluate the block"
  	Timer resume.
  	^ aBlock ensure: [
  		"Collect gc statistics"
  		SmalltalkImage current getVMParameters keysAndValuesDo: [ :idx :gcVal | 
  			gcStats at: idx put: (gcVal - (gcStats at: idx))].
  		"cancel the probe and return the value"
+ 		Timer ifNotNil: [ Timer terminate ].
- 		Timer terminate.
  		time := Time millisecondClockValue - time0]!




More information about the Squeak-dev mailing list