memory and VM issues
Tim Rowledge
tim at rowledge.org
Sat Jul 23 00:57:55 UTC 2005
Ross Boylan <RossBoylan at stanfordalumni.org> wrote:
>
[snip]
> Are you saying it probably just isn't going to work?
It's often very stressful to try to take one level of a package and mix
in some code developed on an image with a somewhat later version of the
package. It _can_ be done but like a dancing bear it's not som much
that it dances well....
> Or that it would
> be better to try VMMaker-tpr.37.mcz?
It would probably be simpler for you right now. Add the two attachments
to your 6665 image, then the vmmaker.37, then try it.
tim
--
Tim Rowledge, tim at rowledge.org, http://www.rowledge.org/tim
SET DEVICE=EXXON to screw up your environment.
-------------- next part --------------
'From Squeak3.8gamma of ''24 November 2004'' [latest update: #6599] on 27 April 2005 at 11:08:01 am'!
"Change Set: VMM38-64bit-imageUpdates
Date: 2005-04-27
Author: tim at rowledge.org, derived from original by ian.piumarta at squeakland.org and johnmci at smalltalkconsultants.com
Changes relative to 3.8g-6548 that add some initial 64-bit support to the image. Needs to go into the update stream asap"!
!SmalltalkImage methodsFor: 'vm parameters' stamp: 'tpr 4/27/2005 11:03'!
vmParameterAt: parameterIndex
"parameterIndex is a positive integer corresponding to one of the VM's internal
parameter/metric registers. Answer with the current value of that register.
Fail if parameterIndex has no corresponding register.
VM parameters are numbered as follows:
1 end of old-space (0-based, read-only)
2 end of young-space (read-only)
3 end of memory (read-only)
4 allocationCount (read-only)
5 allocations between GCs (read-write)
6 survivor count tenuring threshold (read-write)
7 full GCs since startup (read-only)
8 total milliseconds in full GCs since startup (read-only)
9 incremental GCs since startup (read-only)
10 total milliseconds in incremental GCs since startup (read-only)
11 tenures of surving objects since startup (read-only)
12-20 specific to the translating VM
21 root table size (read-only)
22 root table overflows since startup (read-only)
23 bytes of extra memory to reserve for VM buffers, plugins, etc.
24 memory threshold above which shrinking object memory (rw)
25 memory headroom when growing object memory (rw)
26 interruptChecksEveryNms - force an ioProcessEvents every N milliseconds, in case the image is not calling getNextEvent often (rw)
27 number of times mark loop iterated for current IGC/FGC (read-only) includes ALL marking
28 number of times sweep loop iterated for current IGC/FGC (read-only)
29 number of times make forward loop iterated for current IGC/FGC (read-only)
30 number of times compact move loop iterated for current IGC/FGC (read-only)
31 number of grow memory requests (read-only)
32 number of shrink memory requests (read-only)
33 number of root table entries used for current IGC/FGC (read-only)
34 number of allocations done before current IGC/FGC (read-only)
35 number of survivor objects after current IGC/FGC (read-only)
36 millisecond clock when current IGC/FGC completed (read-only)
37 number of marked objects for Roots of the world, not including Root Table entries for current IGC/FGC (read-only)
38 milliseconds taken by current IGC (read-only)
39 Number of finalization signals for Weak Objects pending when current IGC/FGC completed (read-only)
40 VM word size - 4 or 8 (read-only)"
<primitive: 254>
self primitiveFailed! !
!SystemDictionary methodsFor: 'sources, change log' stamp: 'JMM 4/13/2005 20:35'!
wordSize
"Answer the size (in bytes) of an object pointer."
"Smalltalk wordSize"
^[SmalltalkImage current vmParameterAt: 40] on: Error do: [4]! !
!SystemDictionary methodsFor: 'deprecated' stamp: 'tpr 4/27/2005 11:04'!
vmParameterAt: parameterIndex
"See comment for SmalltalkImage>vmParameterAt:"
^ self deprecated: 'Use SmalltalkImage current vmParameterAt:'
block: [SmalltalkImage current vmParameterAt: parameterIndex]
! !
-------------- next part --------------
'From Squeak3.8gamma of ''24 November 2004'' [latest update: #6599] on 27 April 2005 at 11:14:55 am'!
"Change Set: VMM38-gc-instrument-image
Date: 27 April 2005
Author: tim at rowledge.org derived from original by johnmci at smalltalkconsulting.com and andreas.raab at gmx.de
Image side methods to support revised GC handling of weak pointers and GC instrumentation. See SystemDictionary>forceTenure, isYoung: etc.
Needs to go into update stream asap"!
!SystemDictionary methodsFor: 'memory space' stamp: 'JMM 1/27/2005 13:23'!
forceTenure
"Primitive. Tell the GC logic to force a tenure on the next increment GC."
<primitive: 'primitiveForceTenure'>
^self primitiveFailed! !
!SystemDictionary methodsFor: 'memory space' stamp: 'ar 1/18/2005 16:46'!
isRoot: oop
"Primitive. Answer whether the object is currently a root for youngSpace."
<primitive: 'primitiveIsRoot'>
^self primitiveFailed! !
!SystemDictionary methodsFor: 'memory space' stamp: 'ar 1/18/2005 16:47'!
isYoung: oop
"Primitive. Answer whether the object currently resides in youngSpace."
<primitive: 'primitiveIsYoung'>
^self primitiveFailed! !
!SystemDictionary methodsFor: 'memory space' stamp: 'ar 1/18/2005 16:48'!
rootTable
"Primitive. Answer a snapshot of the VMs root table.
Keep in mind that the primitive may itself cause GC."
<primitive: 'primitiveRootTable'>
^self primitiveFailed! !
!SystemDictionary methodsFor: 'memory space' stamp: 'ar 1/18/2005 16:49'!
rootTableAt: index
"Primitive. Answer the nth element of the VMs root table"
<primitive: 'primitiveRootTableAt'>
^nil! !
!SystemDictionary methodsFor: 'memory space' stamp: 'JMM 1/27/2005 13:12'!
setGCBiasToGrow: aNumber
"Primitive. Indicate that the GC logic should be bias to grow"
<primitive: 'primitiveSetGCBiasToGrow'>
^self primitiveFailed
"Example:
Smalltalk setGCBiasToGrowGCLimit: 16*1024*1024.
Smalltalk setGCBiasToGrow: 1.
"! !
!SystemDictionary methodsFor: 'memory space' stamp: 'JMM 1/27/2005 12:27'!
setGCBiasToGrowGCLimit: aNumber
"Primitive. Indicate that the bias to grow logic should do a GC after aNumber Bytes"
<primitive: 'primitiveSetGCBiasToGrowGCLimit'>
^self primitiveFailed
"Example:
Smalltalk setGCBiasToGrowGCLimit: 16*1024*1024.
"! !
!SystemDictionary methodsFor: 'memory space' stamp: 'ar 1/18/2005 16:54'!
setGCSemaphore: semaIndex
"Primitive. Indicate the GC semaphore index to be signaled on GC occurance."
<primitive: 'primitiveSetGCSemaphore'>
^self primitiveFailed
"Example:
| index sema process |
sema := Semaphore new.
index := Smalltalk registerExternalObject: sema.
Smalltalk setGCSemaphore: index.
process := [
[[true] whileTrue:[
sema wait.
Smalltalk beep.
]] ensure:[
Smalltalk setGCSemaphore: 0.
Smalltalk unregisterExternalObject: sema.
].
] fork.
process inspect.
"! !
More information about the Squeak-dev
mailing list
|