[Vm-dev] VM Maker: CogTools-eem.70.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Jun 17 17:59:59 UTC 2014


Eliot Miranda uploaded a new version of CogTools to project VM Maker:
http://source.squeak.org/VMMaker/CogTools-eem.70.mcz

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

Name: CogTools-eem.70
Author: eem
Time: 17 June 2014, 10:59:51.468 am
UUID: 558f0b66-463f-4b27-a542-718fd8485e78
Ancestors: CogTools-eem.69

Get new and old space sizes right in VMProfiler report.

=============== Diff against CogTools-eem.69 ===============

Item was changed:
  ----- Method: VMProfiler class>>reportGCStats:upTime:on: (in category 'reports') -----
  reportGCStats: gcStatsArray upTime: elapsedMilliseconds on: str
  	| oldSpaceEnd youngSpaceEnd memoryEnd fullGCs fullGCTime incrGCs incrGCTime tenureCount rootOverflows |
  	gcStatsArray ifNil: [^self].
  
+ 	oldSpaceEnd	:= gcStatsArray at: 2. "a.k.a. oldSpace size on Spur"
- 	oldSpaceEnd	:= gcStatsArray at: 1. "a.k.a. oldSpace size on Spur"
  	fullGCs			:= gcStatsArray at: 7.
  	fullGCTime		:= gcStatsArray at: 8.
  	incrGCs			:= gcStatsArray at: 9.
  	incrGCTime		:= gcStatsArray at: 10.
  	tenureCount	:= gcStatsArray at: 11.
  	rootOverflows	:= gcStatsArray at: 22.
  
  	str	cr.
  	str	nextPutAll: '**Memory**'; cr.
  	str	nextPutAll:	'	old			';
  		nextPutAll: oldSpaceEnd asStringWithCommasSigned; nextPutAll: ' bytes'; cr.
  	self amOnSpur
  		ifTrue:
  			[(gcStatsArray at: 54) ifNotNil:
  				[:freeSpace|
  				 str	nextPutAll: '	free		';
  					nextPutAll: freeSpace asStringWithCommasSigned; nextPutAll: ' bytes'; cr]]
  		ifFalse:
+ 			[youngSpaceEnd	:= gcStatsArray at: 1.
- 			[youngSpaceEnd	:= gcStatsArray at: 2.
  			 memoryEnd		:= gcStatsArray at: 3.
  			 str	nextPutAll: '	young		';
  				nextPutAll: (youngSpaceEnd - oldSpaceEnd) asStringWithCommasSigned; nextPutAll: ' bytes'; cr.
  			 str	nextPutAll: '	used		';
  				nextPutAll: youngSpaceEnd asStringWithCommasSigned; nextPutAll: ' bytes'; cr.
  			 str	nextPutAll: '	free		';
  				nextPutAll: (memoryEnd - youngSpaceEnd) asStringWithCommasSigned; nextPutAll: ' bytes'; cr].
  
  	str	cr.
  	str	nextPutAll: '**GCs**'; cr.
  	str	nextPutAll: '	full			';
  		print: fullGCs; nextPutAll: ' totalling '; nextPutAll: fullGCTime asStringWithCommas; nextPutAll: 'ms (';
  		print: fullGCTime / elapsedMilliseconds * 100 maxDecimalPlaces: 3;
  		nextPutAll: '% elapsed time)'.
  	fullGCs = 0 ifFalse:
  		[str	nextPutAll: ', avg '; print: fullGCTime / fullGCs maxDecimalPlaces: 3; nextPutAll: 'ms'].
  	str	cr.
  	str	nextPutAll: (self amOnSpur ifTrue: ['	scavenges	'] ifFalse: ['	incr			']);
  		print: incrGCs; nextPutAll: ' totalling '; nextPutAll: incrGCTime asStringWithCommas; nextPutAll: 'ms (';
  		print: incrGCTime / elapsedMilliseconds * 100 maxDecimalPlaces: 3;
  		nextPutAll: '% elapsed time)'.
  	incrGCs = 0 ifFalse:
  		[str nextPutAll:', avg '; print: incrGCTime / incrGCs maxDecimalPlaces: 3; nextPutAll: 'ms'].
  	str cr.
  	str	nextPutAll: '	tenures		';
  		nextPutAll: tenureCount asStringWithCommas.
  	tenureCount = 0 ifFalse:
  		[str nextPutAll: ' (avg '; print: (incrGCs / tenureCount) asInteger; nextPutAll: ' GCs/tenure)'].
  	str	cr.
  	str	nextPutAll: '	root table	';
  		nextPutAll: rootOverflows asStringWithCommas; nextPutAll:' overflows'.
  	str cr.
  
  	(gcStatsArray size >= 63 and: [(gcStatsArray at: 63) isInteger]) ifTrue:
  		[| numCompactions compactionMsecs |
  		str cr; nextPutAll: '**Compiled Code Compactions**'; cr.
  		numCompactions := gcStatsArray at: 62.
  		compactionMsecs := gcStatsArray at: 63.
  		str	tab;
  			print: numCompactions; nextPutAll: ' totalling ';
  			nextPutAll: compactionMsecs asStringWithCommas; nextPutAll: 'ms (';
  			print: compactionMsecs / elapsedMilliseconds * 100 maxDecimalPlaces: 3;
  			nextPutAll: '% elapsed time)'.
  		numCompactions = 0 ifFalse:
  			[str	nextPutAll: ', avg '; print: compactionMsecs / numCompactions maxDecimalPlaces: 3; nextPutAll: 'ms'].
  		str	cr].
  
  	gcStatsArray size >= 61 ifTrue:
  		[str cr; nextPutAll: '**Events**'; cr.
  		(56 to: 61)
  			with: #('Process switches' 'ioProcessEvents calls' 'Interrupt checks' 'Event checks' 'Stack overflows' 'Stack page divorces')
  			do: [:index :eventName| | value n |
  				value := gcStatsArray at: index.
  				n := 22 - eventName size // 4 + 1.
  				str	nextPutAll: eventName; tab: n; print: value; nextPutAll: ' (';
  					print: (value * 1000 / elapsedMilliseconds) rounded; nextPutAll: ' per second)'; cr]]!



More information about the Vm-dev mailing list