The Trunk: System-mt.1216.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: System-mt.1216.mcz

commits-2
Marcel Taeumel uploaded a new version of System to project The Trunk:
http://source.squeak.org/trunk/System-mt.1216.mcz

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

Name: System-mt.1216
Author: mt
Time: 18 February 2021, 9:16:17.196751 am
UUID: 70862cfd-0be1-453a-b6af-8697996913ba
Ancestors: System-mt.1215

Replaces direct access to class var with accessor to make resetting of pragma preference work.

=============== Diff against System-mt.1215 ===============

Item was changed:
  ----- Method: MessageTally class>>initialize (in category 'class initialization') -----
  initialize
  "MessageTally initialize"
- "By default, show each process separately"
- ShowProcesses ifNil: [ShowProcesses := true].
  Smalltalk
  addToShutDownList: self after: Delay; "i.e. convert to relative times & stats after Delay sleeps."
  addToStartUpList: self before: Delay "i.e. convert back to absolute stats before Delay wakes."!

Item was changed:
  ----- Method: MessageTally class>>spyOn: (in category 'spying') -----
  spyOn: aBlock
  "Spy on aBlock, in the current process. Can include or not statistics on other processes in the report.
  [1000 timesRepeat: [
  100 timesRepeat: [120 factorial].
  (Delay forMilliseconds: 10) wait
  ]] forkAt: 45 named: '45'.
  MessageTally spyOn: [10000 timesRepeat: [1.23 printString]]
  "
+ ^self spyOn: aBlock reportOtherProcesses: self showProcesses!
- ^self spyOn: aBlock reportOtherProcesses: ShowProcesses!

Item was changed:
  ----- Method: MessageTally class>>spyOnProcess:forMilliseconds: (in category 'spying') -----
  spyOnProcess: aProcess forMilliseconds: msecDuration
  "
  Spy on aProcess for a certain amount of time
  | p1 p2 |  
  p1 := [100000 timesRepeat: [3.14159 printString. Processor yield]] newProcess.  
  p2 := [100000 timesRepeat: [3.14159 printString. Processor yield]] newProcess.
  p1 resume.
  p2 resume.  
  (Delay forMilliseconds: 100) wait.  
  MessageTally spyOnProcess: p1 forMilliseconds: 1000
  "
 
  ^self
  spyOnProcess: aProcess
  forMilliseconds: msecDuration
+ reportOtherProcesses: self showProcesses
- reportOtherProcesses: ShowProcesses
  !