Login  Register

Re: GPGPU sampler

Posted by Josh Gargus on Dec 26, 2009; 7:30am
URL: https://forum.world.st/GPGPU-sampler-tp978778p979316.html

There's a terse explanation at:  http://wiki.squeak.org/squeak/49 ... I'll elaborate.

The .changes file is a change log of code that has changed in the image.  Whenever you change a method, that code is appended to the .changes file (so, for example, if you crash Squeak then your changes aren't lost forever... they can be recovered from the .changes file... see http://wiki.squeak.org/squeak/2168).  The actual source code for each method isn't actually stored in the image.  Instead, each method contains an index into the .changes file to look up the source code.  Some implications for our situation:

- if there is no .changes file, then there is no source code.  However, Squeak can decompile the bytecodes in a CompiledMethod object to recover the source code.  Awesome!  Except that it doesn't know the names of temporary variables and method arguments, so instead of meaningful names, you see "t1", "t2", "t3", etc.

- if you've been programming in an image for a while, there are probably many methods that you have changed several times.  All of these versions are in the .changes file.  Condensing changes rewrites the .changes file, keeping only the most recent version of each changed method; the resulting changes file is much smaller.  At the same time, the methods in the image must be updated with new indices into the .changes file in order to point to the new location of their source code.  If you condense changes but don't save the image, then your image will try to look for the source code in the old location in the new, smaller .changes file.  Often, the old location will be past the end of the new file, leading to the error that I mentioned.

Cheers,
Josh





On Dec 25, 2009, at 12:44 PM, Matthew Chadwick wrote:

> Josh Gargus wrote:
>>
>> Did you perhaps condense changes and then not save the image?  (just guessing)
>
>
> that's exactly what i did, after looking up .changes files (i don't know what it's for). i thought it sounded like a good idea to save space.
>
> - will try again, but without that step...
>