[squeak-dev] The Trunk: SystemReporter-laza.6.mcz
commits at source.squeak.org
commits at source.squeak.org
Fri Jan 28 09:27:10 UTC 2011
Alexander Lazarević uploaded a new version of SystemReporter to project The Trunk:
http://source.squeak.org/trunk/SystemReporter-laza.6.mcz
==================== Summary ====================
Name: SystemReporter-laza.6
Author: laza
Time: 28 January 2011, 10:27:05.638 am
UUID: 7ed9fa46-bf91-6541-82e2-9a74f36fc098
Ancestors: SystemReporter-dtl.5
- fixed full image path name
- added build date for vm
- used canonical names for system attributes if possible
- changed indexing of parameters and options to match argumentAt: and optionAt:
=============== Diff against SystemReporter-dtl.5 ===============
Item was added:
+ ----- Method: SystemReporter>>enumerate:on: (in category 'private') -----
+ enumerate: aBlock on: aStream
+ self enumerate: aBlock startAt: 0 on: aStream!
Item was added:
+ ----- Method: SystemReporter>>enumerate:startAt:on: (in category 'private') -----
+ enumerate: aBlock startAt: first on: aStream
+ "Utilitymethod to enumerate Options or Parameters from first to 1000"
+ | idx value |
+ idx := first.
+ [value := aBlock value: idx.
+ value = nil or: [idx > 1000]] whileFalse: [
+ aStream
+ nextPut: $#;
+ nextPutAll: idx printString;
+ tab;
+ nextPutAll: value; cr.
+ idx := idx + 1
+ ].
+ idx = first ifTrue: [aStream nextPutAll: 'none'; cr]!
Item was changed:
----- Method: SystemReporter>>reportINI: (in category 'reporting') -----
reportINI: aStream
| exePath iniData iniPath |
self header: 'VM Configuration' on: aStream.
+ exePath := Smalltalk vm vmFileName.
- exePath := SmalltalkImage current getSystemAttribute: 0.
iniPath := (exePath copyUpToLast: $.), '.ini'.
aStream nextPutAll: iniPath; cr.
iniData := [
(FileStream readOnlyFileNamed: iniPath)
contentsOfEntireFile
] on: Error do:[:ex| ex return: ex printString].
aStream
nextPutAll: iniData!
Item was changed:
----- Method: SystemReporter>>reportImage: (in category 'reporting') -----
reportImage: aStream
self header: 'Image' on: aStream.
aStream
nextPutAll: SystemVersion current version; cr;
+ nextPutAll: Smalltalk image lastUpdateString; cr;
+ nextPutAll: Smalltalk image currentChangeSetString; cr;
+ nextPutAll: Smalltalk image imageName; cr!
- nextPutAll: SmalltalkImage current lastUpdateString; cr;
- nextPutAll: SmalltalkImage current currentChangeSetString; cr;
- nextPutAll: (SmalltalkImage current getSystemAttribute: 1); cr!
Item was changed:
----- Method: SystemReporter>>reportImageParameters: (in category 'reporting') -----
reportImageParameters: aStream
- | id value |
self header: 'Image Commandline Parameters' on: aStream.
+ self enumerate: [:idx | Smalltalk image argumentAt: idx] on: aStream.!
- id := 2.
- [value := (SmalltalkImage current getSystemAttribute: id).
- value = nil or: [id > 1000]] whileFalse: [
- aStream
- nextPut: $#;
- nextPutAll: (id - 1) printString;
- tab;
- nextPutAll: value; cr.
- id := id + 1
- ].
- id = 2 ifTrue: [aStream nextPutAll: 'none'; cr]
- !
Item was changed:
----- Method: SystemReporter>>reportOS: (in category 'reporting') -----
reportOS: aStream
self header: 'Operating System/Hardware' on: aStream.
aStream
+ nextPutAll: Smalltalk os platformName; space;
+ nextPutAll: Smalltalk os osVersion; space;
+ nextPutAll: Smalltalk os platformSubtype; cr
- nextPutAll: (SmalltalkImage current getSystemAttribute: 1001); space;
- nextPutAll: (SmalltalkImage current getSystemAttribute: 1002); space;
- nextPutAll: (SmalltalkImage current getSystemAttribute: 1003); cr
!
Item was changed:
----- Method: SystemReporter>>reportVM: (in category 'reporting') -----
reportVM: aStream
self header: 'Virtual Machine' on: aStream.
aStream
+ nextPutAll: (Smalltalk vm vmVersion); cr;
+ nextPutAll: (Smalltalk vm vmFileName); cr.
+ Smalltalk vm buildDate
+ ifNotNilDo: [:string | aStream nextPutAll: string; cr].
- nextPutAll: (SmalltalkImage current getSystemAttribute: 1004); cr;
- nextPutAll: (SmalltalkImage current getSystemAttribute: 0); cr.
[Smalltalk vm platformSourceVersion
ifNotNilDo: [:v | aStream nextPutAll: 'platform sources revision ', v; cr]]
on: Warning do: ["unsupported primitive"].
[Smalltalk vm interpreterSourceVersion
ifNotNilDo: [:v | aStream nextPutAll: 'VMMaker versionString ', v; cr]]
on: Warning do: ["unsupported primitive"]!
Item was changed:
----- Method: SystemReporter>>reportVMOptions: (in category 'reporting') -----
reportVMOptions: aStream
- | id value |
self header: 'Virtual Machine Commandline Options' on: aStream.
+ self enumerate: [:idx | Smalltalk vm optionAt: idx] startAt: 1 on: aStream!
- id := -1.
- [value := (SmalltalkImage current getSystemAttribute: id).
- value = nil or: [id < -1000]] whileFalse: [
- aStream
- nextPut: $#;
- nextPutAll: id negated printString;
- tab;
- nextPutAll: value; cr.
- id := id - 1
- ].
- id = -1 ifTrue: [aStream nextPutAll: 'none'; cr]
-
- !
More information about the Squeak-dev
mailing list
|