[Vm-dev] Stack VMs with primitives for AndreasSystemProfiler?

Juan Vuletich juanlists at jvuletich.org
Thu Feb 28 02:12:48 UTC 2013


Hi Eliot,

>  On Wed, Feb 27, 2013 at 10:03 AM, Eliot Miranda
> <eliot.miranda at gmail.com>wrote:
>
>> Hi Juan,
>>
>> On Wed, Feb 27, 2013 at 8:45 AM, Juan Vuletich (mail lists) <
>> juanlists at jvuletich.org> wrote:
>>
>>>
>>> Quoting "David T. Lewis" <lewis at mail.msen.com>:
>>>
>>>
>>>> On Wed, Feb 27, 2013 at 08:19:20AM -0300, Juan Vuletich (mail lists)
>>>> wrote:
>>>>
>>>>>
>>>>> Hi Folks,
>>>>>
>>>>> In Cuis 4.1 (
>>>>> https://github.com/jvuletich/**Cuis/blob/master/**
>>>>> Cuis4WithLatestUpdates/Cuis4.**1-1619.zip?raw=true<https://github.com/jvuletich/Cuis/blob/master/Cuis4WithLatestUpdates/Cuis4.1-1619.zip?raw=true>)
>>>>> I included AndreasSystemProfiler. But sometimes it is good to use a
>>>>> StackVM for profiling, to avoid Cog inlining and get results that are
>>>>> easier to
>>>>> follow.
>>>>>
>>>>> The Mac and Windows VMs referenced from squeakVM.org don't include
>>>>> the
>>>>> required primitives. The only VMs with those primitives I found are
>>>>> CogVMs from Eliot's site.
>>>>>
>>>>>
>>>> Thanks,
>>>>
>>>> I just added a mantis issue for this:
>>>>
>>>> http://bugs.squeak.org/view.**php?id=7746<http://bugs.squeak.org/view.php?id=7746>
>>>>
>>>> Eliot, can you give me a quick pointer to the primitives in Cog that
>>>> need
>>>> to be added to the interpreter VM? Thanks.
>>>>
>>>>  Does anybody know if there are plans to add those primitives to
>>>>> StackVMs?
>>>>>
>>>>>
>>>> A terminology note, this issue is for the interpreter VM. The stack VM
>>>> is
>>>> part of Cog, and I expect that a stack VM will already contain the
>>>> necessary
>>>> primitives (though I did not check).
>>>>
>>>
>>> Thanks for the correction. I understand that the interpreter VMs will
>>> have the primitives in the future. Thank you!
>>>
>>> Let me restate, then. Does anybody know if there are recent StackVMs
>>> precompiled for major platforms? I could not find any at Eliot´s site.
>>>
>>
>> I could be encouraged to build and add these to my site.  But I wonder
>> why
>> you need them.  What's wrong with the Cog VMs?
>>
>
> First of all, Cog doesn't do inlining; it only does good inline cacheing,
> including memoing whether a send is an MNU.  Second, one can disable the
> JIT using -cogmaxlits -1 on the command line.  You'll get something slower
> than the StackVM (because it'll be asking the jit whether methods should
> be
> jit all the time) but you should get values close to the StackVM.

Thanks for the correction wrt inlining. There's nothing wrong with Cog.
Cog is wonderful. Also thanks for the -cogmaxlits -1 tip. I'm sure I'll
find use for it.

Let me explain my problem.

Tim's recent feedback on performance in Raspberry PI made me want to go do
some profiling on a slow machine. The slowest machine I have at hand is a
Thinkpad T23, Pentium III, 1.1GHz. I use a program called "Cpukiller3",
that can slow it down to (for example) Raspi performance levels. Besides,
I integrated AndreasSystemProfiler in Cuis, and I prefer using it. Now I
need a suitable Windows VM:
- CogVM: Can't run on the P-III, as it doesn't include SSE2 instructions.
- StackVM: Not currently built by you. I don't know if it would require
SSE2, anyway.
- InterpreterVM a.k.a. ClosureVM. Currently doesn't include the new
profiling primitives. Will include them, eventually. Right now, this is
what I'm using, limited to less precise MessageTally. It is also what I've
been using for several years to look for code to optimize in Cuis.

Additionally, wrt Cog, on 2013/1/23 you wrote:
"That said there are still limitations with primitives and Cog.  Currently
Cog only samples "interpreter" primitives.  Those primitives it implements
in machine code (integer and float arithmetic, closure evaluation, at:,
identityHash) are not sampled and won't show up; they will be charged to
the calling method.".
I'm not sure if this is a real issue. And I don't know if this limitation
applies to StackVM or InterpreterVM. Can you please clarify?

Another option would be some software for that can slow down an Atom or
Core processor in a reliable and predictable way, and just use Cog. So
far, I couldn't find any. Suggestions welcome!

Finally, I could take the dust off my XO (300MHz Geode processor) and do
profiling there. It is already slow enough, and can run Cog.

Thanks in advance, Eliot.

>
>>
>>>
>>>
>>>  Dave
>>>>
>>>>  Thanks,
>>>>> Juan Vuletich
>>>>>
>>>>
>>>>
>>>
>>>
>>> Cheers,
>>> Juan Vuletich
>>>
>>>
>>
>>
>> --
>> best,
>> Eliot
>>
>
>
>
> --
> best,
> Eliot
>

Cheers,
Juan Vuletich


More information about the Vm-dev mailing list