<br><br><div class="gmail_quote">On Fri, Oct 31, 2008 at 4:08 AM, Gwenael Casaccio <span dir="ltr">&lt;<a href="mailto:mrgwen@gmail.com">mrgwen@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;">
Why don&#39;t you use Valgrind with Callgrind or Cachegrind :</blockquote><div><br></div><div>It&#39;s an idea. &nbsp;I guess because my need is for an efficient simulation of the ISA, not a detailed performance analysis of the CPU, this doesn&#39;t seem compelling. &nbsp;But it might be a way to optimize the JIT&#39;s code generator.</div>
<div><br></div><div>Thanks.</div><div>&nbsp;</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><br>
<br>
Cachegrind<br>
<br>
Cachegrind is a cache profiler. It performs detailed simulation of the I1, D1 and L2 caches in your CPU and so can accurately pinpoint the sources of cache misses in your code. It identifies the number of cache misses, memory references and instructions executed for each line of source code, with per-function, per-module and whole-program summaries. It is useful with programs written in any language. Cachegrind runs programs about 20--100x slower than normal.<br>

Callgrind<br>
Callgrind, by Josef Weidendorfer, is an extension to Cachegrind. It provides all the information that Cachegrind does, plus extra information about callgraphs. It was folded into the main Valgrind distribution in version <a href="http://3.2.0." target="_blank">3.2.0.</a> Available separately is an amazing visualisation tool, KCachegrind, which gives a much better overview of the data that Callgrind collects; it can also be used to visualise Cachegrind&#39;s output.<div class="Ih2E3d">
<br>
<br>
On 10/31/08 2:36 AM, Eliot Miranda wrote:<br>
</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="Ih2E3d">
<br>
<br>
On Thu, Oct 30, 2008 at 6:21 PM, Igor Stasenko &lt;<a href="mailto:siguctua@gmail.com" target="_blank">siguctua@gmail.com</a><br></div><div class="Ih2E3d">
&lt;mailto:<a href="mailto:siguctua@gmail.com" target="_blank">siguctua@gmail.com</a>&gt;&gt; wrote:<br>
<br>
 &nbsp; &nbsp;2008/10/31 Eliot Miranda &lt;<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a><br></div>
 &nbsp; &nbsp;&lt;mailto:<a href="mailto:eliot.miranda@gmail.com" target="_blank">eliot.miranda@gmail.com</a>&gt;&gt;:<div><div></div><div class="Wj3C7c"><br>
 &nbsp; &nbsp; &gt; Hi All,<br>
 &nbsp; &nbsp; &gt; I wonder if anyone has any 32-bit processor implementations,<br>
 &nbsp; &nbsp;either in<br>
 &nbsp; &nbsp; &gt; Smalltalk or in some other, preferrably easy-to-parse, formal<br>
 &nbsp; &nbsp;semantics. In<br>
 &nbsp; &nbsp; &gt; implementing the new JIT VM I would like to continue developing<br>
 &nbsp; &nbsp;in Smalltalk<br>
 &nbsp; &nbsp; &gt; using VMMaker/Slang, but this implies having a processor<br>
 &nbsp; &nbsp;simulation in<br>
 &nbsp; &nbsp; &gt; Smalltalk to produce actual machine code for. Ideally this would<br>
 &nbsp; &nbsp;be an x86<br>
 &nbsp; &nbsp; &gt; of some description (doesn&#39;t need to be bang up to date, 386<br>
 &nbsp; &nbsp;would be fine).<br>
 &nbsp; &nbsp; &gt; I&#39;d also welcome an ARM.<br>
 &nbsp; &nbsp; &gt; TIA<br>
 &nbsp; &nbsp; &gt;<br>
<br>
 &nbsp; &nbsp;Hi Eliot.<br>
 &nbsp; &nbsp;To my knowledge, Exupery is the only project which dealing with<br>
 &nbsp; &nbsp;assembly code.<br>
 &nbsp; &nbsp;There are some mechanisms to define instructions.<br>
<br>
<br>
I understand that. But I&#39;m not too interested in code generation (I can<br>
write this myself or adapt other code). What I need is a processor<br>
simulation to generate code for, preferrably a clone of an x86, one that<br>
executes its own instruction set. Then I can test the JIT in Smalltalk.<br>
<br>
I believe Peter Deutsch write a 68000 simulator when he implemented PS,<br>
the first Smalltalk-80 JIT, but I could be wrong and perhaps he only<br>
implemented an assembler for the 68000.<br>
<br>
<br>
<br>
<br>
 &nbsp; &nbsp; &gt;<br>
 &nbsp; &nbsp; &gt;<br>
<br>
<br>
<br>
 &nbsp; &nbsp;--<br>
 &nbsp; &nbsp;Best regards,<br>
 &nbsp; &nbsp;Igor Stasenko AKA sig.<br>
<br>
<br>
<br></div></div>
------------------------------------------------------------------------<br>
<br>
<br>
</blockquote>
<br>
<br>
</blockquote></div><br>