<br><br><div class="gmail_quote">On Thu, Mar 15, 2012 at 4:26 PM, Guillermo Polito <span dir="ltr">&lt;<a href="mailto:guillermopolito@gmail.com">guillermopolito@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br><br><div class="gmail_quote"><div class="im">On Thu, Mar 15, 2012 at 1:58 PM, Eliot Miranda <span dir="ltr">&lt;<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>&gt;</span> wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
 <br>Hi Guillermo,<br><br><div class="gmail_quote"><div class="im">On Wed, Mar 14, 2012 at 12:48 PM, Guillermo Polito <span dir="ltr">&lt;<a href="mailto:guillermopolito@gmail.com" target="_blank">guillermopolito@gmail.com</a>&gt;</span> wrote:<br>

</div><div class="im"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Eliot,<br><br>do you have a pointer of where can I see the differences between the old Squeak format and the cog image format, so I can make SystemTracer work on Cog vms?<br></blockquote><div><br></div></div><div><div class="h5">
<div>So the image format differences are</div>

<div>- floats are in platform order, not necessarily in big-endian order</div><div>- the layout of the specialObjectsArray is slightly different (documented in recreateSpecialObjectsArray)</div><div>- there are more words in the header, see StackInterpreter&gt;writeImageFileIO:, i.e.</div>


<div><br></div><div>in Cog:</div><div><div><span style="white-space:pre-wrap">        </span>self putLong: self imageFormatVersion toFile: f.</div><div><span style="white-space:pre-wrap">        </span>self putLong: headerSize toFile: f.</div>


<div><span style="white-space:pre-wrap">        </span>self putLong: imageBytes toFile: f.</div><div><span style="white-space:pre-wrap">        </span>self putLong: objectMemory startOfMemory toFile: f.</div>
<div><span style="white-space:pre-wrap">        </span>self putLong: objectMemory specialObjectsOop toFile: f.</div><div><span style="white-space:pre-wrap">        </span>self putLong: objectMemory newObjectHash toFile: f.</div>
<div><span style="white-space:pre-wrap">        </span>self putLong: self ioScreenSize toFile: f.</div><div><span style="white-space:pre-wrap">        </span>self putLong: self getImageHeaderFlags toFile: f.</div>
<div><span style="white-space:pre-wrap">        </span>self putLong: extraVMMemory toFile: f.</div><div><span style="white-space:pre-wrap">        </span>self putShort: desiredNumStackPages toFile: f.</div>
<div><span style="white-space:pre-wrap">        </span>self putShort: self unknownShortOrCodeSizeInKs toFile: f.</div><div><span style="white-space:pre-wrap">        </span>self putLong: desiredEdenBytes toFile: f.</div>
<div><span style="white-space:pre-wrap">        </span>self putShort: (maxExtSemTabSizeSet ifTrue: [self ioGetMaxExtSemTableSize] ifFalse: [0]) toFile: f.</div><div><span style="white-space:pre-wrap">        </span>self putShort: 0 toFile: f.</div>


<div><span style="white-space:pre-wrap">        </span>1 to: 4 do: [:i | self putLong: 0 toFile: f].  &quot;fill remaining header words with zeros&quot;</div></div><div><br></div><div>in Interpreter:</div><div>
<div><span style="white-space:pre-wrap">        </span>self putLong: (self imageFormatVersion) toFile: f.</div><div><span style="white-space:pre-wrap">        </span>self putLong: headerSize toFile: f.</div>
<div><span style="white-space:pre-wrap">        </span>self putLong: imageBytes toFile: f.</div><div><span style="white-space:pre-wrap">        </span>self putLong: (self startOfMemory) toFile: f.</div>
<div><span style="white-space:pre-wrap">        </span>self putLong: specialObjectsOop toFile: f.</div><div><span style="white-space:pre-wrap">        </span>self putLong: lastHash toFile: f.</div><div>
<span style="white-space:pre-wrap">        </span>self putLong: (self ioScreenSize) toFile: f.</div><div><span style="white-space:pre-wrap">        </span>self putLong: fullScreenFlag toFile: f.</div>
<div><span style="white-space:pre-wrap">        </span>self putLong: extraVMMemory toFile: f.</div><div><span style="white-space:pre-wrap">        </span>1 to: 7 do: [:i | self putLong: 0 toFile: f].  &quot;fill remaining header words with zeros&quot;</div>


</div><div><br></div><div>Then </div><div><br></div><div><div>getImageHeaderFlags</div><div><span style="white-space:pre-wrap">        </span>&quot;Answer the flags that are contained in the 7th long of the image header.&quot;</div>


<div><span style="white-space:pre-wrap">        </span>^fullScreenFlag &quot;0 or 1&quot;</div><div><span style="white-space:pre-wrap">        </span>+ (VMBIGENDIAN ifTrue: [0] ifFalse: [2]) &quot;this is the imageFloatsLittleEndian flag&quot;</div>


<div><span style="white-space:pre-wrap">        </span>+ (processHasThreadId ifTrue: [4] ifFalse: [0])</div><div><span style="white-space:pre-wrap">        </span>+ (flagInterpretedMethods ifTrue: [8] ifFalse: [0])</div>
<div><span style="white-space:pre-wrap">        </span>+ (preemptionYields ifTrue: [0] ifFalse: [16])</div><div><span style="white-space:pre-wrap">        </span>+ (noThreadingOfGUIThread ifTrue: [32] ifFalse: [0])</div>
<div><span style="white-space:pre-wrap">        </span>+ (imageHeaderFlags bitAnd: 63 bitInvert32) &quot;these are any flags we do not recognize&quot;</div></div><div><br></div><div>Now most of the information in the flags is accessible from vmParameterAt: (or some convenience methods).  e.g. vm parameter 49 is the max external semaphore table size, and vm parameter 48 is the following flags:</div>


<div><br></div><div><div>getCogVMFlags</div><div><span style="white-space:pre-wrap">        </span>&quot;Answer an array of flags indicating various properties of the Cog VM.</div><div><span style="white-space:pre-wrap">        </span> Bit 0: implies the image&#39;s Process class has threadId as its 3rd inst var (zero relative)</div>


<div><span style="white-space:pre-wrap">        </span> Bit 1: if set, methods that are interpreted will have the flag bit set in their header</div><div><span style="white-space:pre-wrap">        </span> Bit 2: if set, implies preempting a process does not put it to the back of its run queue&quot;</div>


<div><span style="white-space:pre-wrap">        </span>^objectMemory integerObjectOf: (processHasThreadId ifTrue: [1] ifFalse: [0])</div><div><span style="white-space:pre-wrap">                                                </span>+ (flagInterpretedMethods ifTrue: [2] ifFalse: [0])</div>


<div><span style="white-space:pre-wrap">                                                </span>+ (preemptionYields ifTrue: [0] ifFalse: [4])</div><div><span style="white-space:pre-wrap">                                                </span>+ (noThreadingOfGUIThread ifTrue: [8] ifFalse: [0])</div></div>

</div></div></div></blockquote><div><br>Hehe, in pharo the comment reaches up to 41 :).  I&#39;ll look at squeak to update it.<br></div></div></blockquote><div><br>And squeak&#39;s reach up to 40 :/ in <a href="http://ftp.squeak.org/4.1/SqueakV41.sources.gz">http://ftp.squeak.org/4.1/SqueakV41.sources.gz</a><br>
 </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail_quote"><div> </div><blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

<div class="gmail_quote"><div class="im"><div>
</div><div><br></div><div>Read the comment for vmParameterAt: to get things like num stack pages and cog code size.</div><div><br></div><div>Is this OK?  I know it&#39;s a bit of a mess. If you or I (we?) write it up where should we put the info?</div>


</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br><div class="im">Thanks,<br>Guille<br><br><div class="gmail_quote">
On Thu, Jan 27, 2011 at 6:36 PM, Levente Uzonyi <span dir="ltr">&lt;<a href="mailto:leves@elte.hu" target="_blank">leves@elte.hu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div>On Thu, 27 Jan 2011, Benjamin wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
It works for  PharoCore-1.1-11196-UNSTABLE.1 but it seems to be the only version where it works :S<br>
<br>
Does someone know why ?<br>
</blockquote>
<br></div>
It doesn&#39;t support Cog&#39;s image format. Try an image with the original Squeak format. You can convert your image with the latest SqueakVM. Only the unix VM was released with this feature yet, so you can use that<br>




<a href="http://squeakvm.org/unix/" target="_blank">http://squeakvm.org/unix/</a> or build a VM for your favorite platform.<span><font color="#888888"><br>
<br>
<br>
Levente</font></span><div><div><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
<br>
Thanks,<br>
<br>
Ben<br>
<br>
On Jan 27, 2011, at 3:36 PM, Benjamin wrote:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello guys,<br>
<br>
for one of my projects, I&#39;m trying to use SystemTracer to create  anew image, but it appears that it doesn&#39;t work on Pharo ...<br>
I can create a new image, but I can&#39;t open it. I&#39;ve tried with an older VM (Squeak 3.8.18beta1U), but it&#39;s the same ...<br>
<br>
<br>
Did someone already have this problem ? Does someone have a solution ?<br>
<br>
<br>
<br>
Thanks in advance,<br>
<br>
Ben<br>
</blockquote>
<br>
<br>
</blockquote>
<br>
</div></div></blockquote></div><br>
</div></blockquote></div><br><br clear="all"><span class="HOEnZb"><font color="#888888"><div><br></div>-- <br>best,<div>Eliot</div><br>
<br></font></span></blockquote></div><br>
</blockquote></div><br>