Levente Uzonyi uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-ul.346.mcz ==================== Summary ==================== Name: System-ul.346 Author: ul Time: 1 July 2010, 5:47:34.811 pm UUID: 24a3893a-af8a-d341-9211-5dc456369a43 Ancestors: System-eem.345 - ignore vm parameters with nil value in MessageTally, so it can be used in Cog =============== Diff against System-eem.345 =============== Item was changed: ----- Method: MessageTally>>spyEvery:onProcess:forMilliseconds: (in category 'initialize-release') ----- spyEvery: millisecs onProcess: aProcess forMilliseconds: msecDuration "Create a spy and spy on the given process at the specified rate." | myDelay time0 endTime observedProcess sem | (aProcess isKindOf: Process) ifFalse: [self error: 'spy needs a Process here']. self class: aProcess suspendedContext receiver class method: aProcess suspendedContext method. "set up the probe" observedProcess := aProcess. myDelay := Delay forMilliseconds: millisecs. time0 := Time millisecondClockValue. endTime := time0 + msecDuration. sem := Semaphore new. gcStats := SmalltalkImage current getVMParameters. Timer ifNotNil: [ self error: 'it seems a tally is already running' ]. Timer := [ [ | startTime | startTime := Time millisecondClockValue. myDelay wait. self tally: Processor preemptedProcess suspendedContext in: (observedProcess == Processor preemptedProcess ifTrue: [ observedProcess ] ifFalse: [ nil ]) "tally can be > 1 if ran a long primitive" by: (Time millisecondClockValue - startTime) // millisecs. startTime < endTime ] whileTrue. sem signal. ] newProcess. Timer priority: Processor timingPriority-1. "activate the probe and evaluate the block" Timer resume. "activate the probe and wait for it to finish" sem wait. "Collect gc statistics" + SmalltalkImage current getVMParameters keysAndValuesDo: [ :idx :gcVal | + gcVal ifNotNil: [ gcStats at: idx put: (gcVal - (gcStats at: idx)) ] ]. - SmalltalkImage current getVMParameters keysAndValuesDo: [ :idx :gcVal | - gcStats at: idx put: (gcVal - gcStats at: idx)]. time := Time millisecondClockValue - time0! Item was changed: ----- Method: MessageTally>>spyAllEvery:on: (in category 'initialize-release') ----- spyAllEvery: millisecs on: aBlock "Create a spy and spy on the given block at the specified rate." "Spy all the system processes" | myDelay time0 | aBlock isBlock ifFalse: [ self error: 'spy needs a block here' ]. self class: aBlock receiver class method: aBlock method. "set up the probe" myDelay := Delay forMilliseconds: millisecs. time0 := Time millisecondClockValue. gcStats := SmalltalkImage current getVMParameters. Timer ifNotNil: [ self error: 'it seems a tally is already running' ]. Timer := [ [true] whileTrue: [ | observedProcess startTime | startTime := Time millisecondClockValue. myDelay wait. observedProcess := Processor preemptedProcess. self tally: observedProcess suspendedContext in: observedProcess "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: [ "cancel the probe and return the value" "Could have already been terminated. See #terminateTimerProcess" Timer ifNotNil: [ Timer terminate. Timer := nil ]. "Collect gc statistics" + SmalltalkImage current getVMParameters keysAndValuesDo: [ :idx :gcVal | + gcVal ifNotNil: [ gcStats at: idx put: (gcVal - (gcStats at: idx)) ] ]. - SmalltalkImage current getVMParameters keysAndValuesDo: [ :idx :gcVal | - gcStats at: idx put: (gcVal - (gcStats at: idx))]. time := Time millisecondClockValue - time0]! 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 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 ifNotNil: [ self error: 'it seems a tally is already running' ]. Timer := [ [ true ] whileTrue: [ | startTime | startTime := Time millisecondClockValue. myDelay wait. self tally: Processor preemptedProcess suspendedContext in: (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: [ "cancel the probe and return the value" "Could have already been terminated. See #terminateTimerProcess" Timer ifNotNil: [ Timer terminate. Timer := nil ]. "Collect gc statistics" + SmalltalkImage current getVMParameters keysAndValuesDo: [ :idx :gcVal | + gcVal ifNotNil: [ gcStats at: idx put: (gcVal - (gcStats at: idx)) ] ]. + time := Time millisecondClockValue - time0 ]! - SmalltalkImage current getVMParameters keysAndValuesDo: [ :idx :gcVal | - gcStats at: idx put: (gcVal - (gcStats at: idx))]. - time := Time millisecondClockValue - time0]! Item was removed: - ----- Method: Preferences class>>lexiconWindowColor (in category 'standard queries') ----- - lexiconWindowColor - ^ self - valueOfFlag: #lexiconWindowColor - ifAbsent: [Color - r: 0.878 - g: 1.0 - b: 0.878]! Item was removed: - ----- Method: Preferences class>>instanceBrowserWindowColor (in category 'standard queries') ----- - instanceBrowserWindowColor - ^ self - valueOfFlag: #instanceBrowserWindowColor - ifAbsent: [Color - r: 0.806 - g: 1.0 - b: 1.0]! Item was removed: - ----- Method: Preferences class>>fileListWindowColor (in category 'standard queries') ----- - fileListWindowColor - ^ self - valueOfFlag: #fileListWindowColor - ifAbsent: [Color - r: 1.0 - g: 0.8 - b: 1.0]! Item was removed: - ----- Method: Preferences class>>debuggerWindowColor (in category 'standard queries') ----- - debuggerWindowColor - ^ self - valueOfFlag: #debuggerWindowColor - ifAbsent: [Color - r: 1.0 - g: 0.8 - b: 0.8]! Item was removed: - ----- Method: Preferences class>>defaultWindowColor (in category 'standard queries') ----- - defaultWindowColor - ^ self - valueOfFlag: #defaultWindowColor - ifAbsent: [Color - r: 1.0 - g: 1.0 - b: 1.0]! Item was removed: - ----- Method: Preferences class>>workspaceWindowColor (in category 'standard queries') ----- - workspaceWindowColor - ^ self - valueOfFlag: #workspaceWindowColor - ifAbsent: [Color - r: 1.0 - g: 1.0 - b: 0.8]! Item was removed: - ----- Method: Preferences class>>classCommentVersionsBrowserWindowColor (in category 'standard queries') ----- - classCommentVersionsBrowserWindowColor - ^ self - valueOfFlag: #classCommentVersionsBrowserWindowColor - ifAbsent: [Color - r: 0.769 - g: 0.653 - b: 1.0]! Item was removed: - ----- Method: Preferences class>>fileContentsBrowserWindowColor (in category 'standard queries') ----- - fileContentsBrowserWindowColor - ^ self - valueOfFlag: #fileContentsBrowserWindowColor - ifAbsent: [Color - r: 0.8 - g: 0.8 - b: 0.5]! Item was removed: - ----- Method: Preferences class>>versionsBrowserWindowColor (in category 'standard queries') ----- - versionsBrowserWindowColor - ^ self - valueOfFlag: #versionsBrowserWindowColor - ifAbsent: [Color - r: 0.869 - g: 0.753 - b: 1.0]! Item was removed: - ----- Method: Preferences class>>testRunnerWindowColor (in category 'standard queries') ----- - testRunnerWindowColor - ^ self - valueOfFlag: #testRunnerWindowColor - ifAbsent: [Color - r: 1.0 - g: 0.6 - b: 0.0]! Item was removed: - ----- Method: Preferences class>>dualChangeSorterWindowColor (in category 'standard queries') ----- - dualChangeSorterWindowColor - ^ self - valueOfFlag: #dualChangeSorterWindowColor - ifAbsent: [Color - r: 0.8 - g: 1.0 - b: 1.0]! Item was removed: - ----- Method: Preferences class>>messageListWindowColor (in category 'standard queries') ----- - messageListWindowColor - ^ self - valueOfFlag: #messageListWindowColor - ifAbsent: [Color - r: 0.8 - g: 1.0 - b: 1.0]! Item was removed: - ----- Method: Preferences class>>messageNamesWindowColor (in category 'standard queries') ----- - messageNamesWindowColor - ^ self - valueOfFlag: #messageNamesWindowColor - ifAbsent: [Color - r: 0.645 - g: 1.0 - b: 0.452]! Item was removed: - ----- Method: Preferences class>>browserWindowColor (in category 'standard queries') ----- - browserWindowColor - ^ self - valueOfFlag: #browserWindowColor - ifAbsent: [Color - r: 0.8 - g: 1.0 - b: 0.6]! Item was removed: - ----- Method: Preferences class>>packageLoaderWindowColor (in category 'standard queries') ----- - packageLoaderWindowColor - ^ self - valueOfFlag: #packageLoaderWindowColor - ifAbsent: [Color - r: 0.9 - g: 0.9 - b: 0.781]! Item was removed: - ----- Method: Preferences class>>transcriptWindowColor (in category 'standard queries') ----- - transcriptWindowColor - ^ self - valueOfFlag: #transcriptWindowColor - ifAbsent: [Color - r: 1.0 - g: 0.8 - b: 0.4]! Item was removed: - ----- Method: Preferences class>>changeSorterWindowColor (in category 'standard queries') ----- - changeSorterWindowColor - ^ self - valueOfFlag: #changeSorterWindowColor - ifAbsent: [Color - r: 0.8 - g: 1.0 - b: 1.0]! Item was removed: - ----- Method: Preferences class>>methodFinderWindowColor (in category 'standard queries') ----- - methodFinderWindowColor - ^ self - valueOfFlag: #methodFinderWindowColor - ifAbsent: [Color - r: 0.4 - g: 1.0 - b: 1.0]! Item was removed: - ----- Method: Preferences class>>changeListWindowColor (in category 'standard queries') ----- - changeListWindowColor - ^ self - valueOfFlag: #changeListWindowColor - ifAbsent: [Color - r: 0.8 - g: 1.0 - b: 1.0]! Item was removed: - ----- Method: Preferences class>>preferenceBrowserWindowColor (in category 'standard queries') ----- - preferenceBrowserWindowColor - ^ self - valueOfFlag: #preferenceBrowserWindowColor - ifAbsent: [Color - r: 0.645 - g: 1.0 - b: 1.0]! Item was removed: - ----- Method: Preferences class>>packageBrowserWindowColor (in category 'standard queries') ----- - packageBrowserWindowColor - ^ self - valueOfFlag: #packageBrowserWindowColor - ifAbsent: [Color - r: 1.0 - g: 1.0 - b: 0.6]! Item was removed: - ----- Method: Preferences class>>monticelloToolWindowColor (in category 'standard queries') ----- - monticelloToolWindowColor - ^ self - valueOfFlag: #monticelloToolWindowColor - ifAbsent: [Color - r: 0.627 - g: 0.69 - b: 0.976]! |
Free forum by Nabble | Edit this page |