On Fri, Oct 31, 2008 at 4:08 AM, Gwenael Casaccio <mrgwen@gmail.com> wrote:
Why don't you use Valgrind with Callgrind or Cachegrind :

It's an idea.  I guess because my need is for an efficient simulation of the ISA, not a detailed performance analysis of the CPU, this doesn't seem compelling.  But it might be a way to optimize the JIT's code generator.

Thanks.
 


Cachegrind

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.
Callgrind
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 3.2.0. 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's output.


On 10/31/08 2:36 AM, Eliot Miranda wrote:


On Thu, Oct 30, 2008 at 6:21 PM, Igor Stasenko <siguctua@gmail.com
<mailto:siguctua@gmail.com>> wrote:

   2008/10/31 Eliot Miranda <eliot.miranda@gmail.com
   <mailto:eliot.miranda@gmail.com>>:

    > Hi All,
    > I wonder if anyone has any 32-bit processor implementations,
   either in
    > Smalltalk or in some other, preferrably easy-to-parse, formal
   semantics. In
    > implementing the new JIT VM I would like to continue developing
   in Smalltalk
    > using VMMaker/Slang, but this implies having a processor
   simulation in
    > Smalltalk to produce actual machine code for. Ideally this would
   be an x86
    > of some description (doesn't need to be bang up to date, 386
   would be fine).
    > I'd also welcome an ARM.
    > TIA
    >

   Hi Eliot.
   To my knowledge, Exupery is the only project which dealing with
   assembly code.
   There are some mechanisms to define instructions.


I understand that. But I'm not too interested in code generation (I can
write this myself or adapt other code). What I need is a processor
simulation to generate code for, preferrably a clone of an x86, one that
executes its own instruction set. Then I can test the JIT in Smalltalk.

I believe Peter Deutsch write a 68000 simulator when he implemented PS,
the first Smalltalk-80 JIT, but I could be wrong and perhaps he only
implemented an assembler for the 68000.




    >
    >



   --
   Best regards,
   Igor Stasenko AKA sig.



------------------------------------------------------------------------