Leon Matthes uploaded a new version of CogTools to project VM Maker: http://source.squeak.org/VMMaker/CogTools.threaded-LM.95.mcz
==================== Summary ====================
Name: CogTools.threaded-LM.95 Author: LM Time: 4 December 2023, 4:40:58.625858 pm UUID: def501d4-7faf-462b-8ba6-07ce0bff977b Ancestors: CogTools-LM.94
Start adding support for threaded VM profiler
=============== Diff against CogTools-LM.94 ===============
Item was changed: ----- Method: VMProfileGraphLabelMorph>>drawClippedOn: (in category 'drawing') ----- drawClippedOn: clippedCanvas "Display the labels at their relative positions sloping down at 45 degrees. Draw a label every font height pixels along to avoid a mess when there are lots of labels." | labelForm lfc rotatedLabelForm rlfc warp degSin degCos side rect pts minDelta lastX margin range rotationOffset xs | labelForm := Form extent: self height * 2 @ font height depth: 4. rotatedLabelForm := Form extent: self height asPoint depth: 4. lfc := labelForm getCanvas. rlfc := rotatedLabelForm getCanvas. warp := (WarpBlt current toForm: rotatedLabelForm) sourceForm: labelForm; colorMap: (labelForm colormapIfNeededFor: rotatedLabelForm); cellSize: 2 "smooothing"; "installs a new colormap if cellSize > 1" combinationRule: Form paint. degSin := 45 degreeSin. degCos := 45 degreeCos. "See Form>>rotateBy:magnify:smoothing:" side := labelForm extent r. rect := (0@0 extent: side@side) align: (side / 2) asPoint with: labelForm extent / 2. pts := rect innerCorners collect: [:pt | | p | p := pt - rect center. ((labelForm width / 2.0) + (p x asFloat*degCos) + (p y asFloat*degSin)) @ ((labelForm height / 2.0) - (p x asFloat*degSin) + (p y asFloat*degCos))]. minDelta := font height / 1.5. lastX := font height negated. margin := model graphMargin. range := self width - margin - margin. rotationOffset := (labelForm height / 2 * 2 sqrt) ceiling. (xs := positionedLabels keys asSortedCollection) withIndexDo: [:fractionalX :index| | x | x := (fractionalX * range) rounded. (lastX + minDelta <= x or: [index < xs size and: [lastX + minDelta + minDelta <= ((xs at: index + 1) * range)]]) ifTrue: [lfc fillColor: Color black; + drawString: (positionedLabels at: fractionalX) asString at: 0@0 font: font color: Color white. - drawString: (positionedLabels at: fractionalX) at: 0@0 font: font color: Color white. rlfc fillColor: Color black. warp copyQuad: pts toRect: rotatedLabelForm boundingBox. clippedCanvas image: rotatedLabelForm at: self bounds origin + ((fractionalX * range max: lastX + minDelta) floor + margin - rotationOffset@0) sourceRect: rotatedLabelForm boundingBox rule: Form erase. true ifTrue: [| box | box := (self bounds origin + ((fractionalX * range) floor + margin@0)) extent: 1@6. Display fill: box rule: Form over fillColor: Color gray]. lastX := x]]!
Item was changed: ----- Method: VMProfiler>>getVMProfileSamplesInto: (in category 'primitives') ----- getVMProfileSamplesInto: sampleBuffer - "Stop profiling the virtual machine and if the argument is a - Bitmap of the right size, copy the profile data into it. Otherwise fail."
+ ^ self getVMProfileThread: 0 SamplesInto: sampleBuffer! - <primitive: 252> - ^self primitiveFailed!
Item was added: + ----- Method: VMProfiler>>getVMProfileThread:SamplesInto: (in category 'primitives') ----- + getVMProfileThread: threadIndex SamplesInto: sampleBuffer + "Stop profiling the virtual machine and if the argument is a + Bitmap of the right size, copy the profile data into it. Otherwise fail." + + <primitive: 252> + ^self primitiveFailed!
vm-dev@lists.squeakfoundation.org