[squeak-dev] squeak profiling

John M McIntosh johnmci at smalltalkconsulting.com
Sat Apr 19 18:12:39 UTC 2008


On Apr 19, 2008, at 1:28 AM, Riccardo Lucchese wrote:

> Hi,
>
> I'm working on profiling squeak/etoys for the olpc project.

Well I'll note since you are working with a specific hardware setup  
it's worth considering looking very
carefully at the compiler optimization for the CPU in question. I'd  
guess the compiler setting used
by the build process is fairly generic and does not take advantage of  
specific platform optimizations,
thus producing safe and lousy code to make a 80386 happy...

oh say see
http://lists.laptop.org/pipermail/devel/2007-November/007430.html
http://wiki.laptop.org/go/Geode_optimization_effort
http://gcc.gnu.org/ml/gcc-patches/2006-08/msg00452.html


Also setting -DUSE_INLINE_MEMORY_ACCESSORS or NOT setting
in the compiler options to change the code usage for accessors in  
interp.c  might also have a different result.
since that changes now memory accessing is done.


The other area is variable accessing, you'll note the foo structure is  
built and the variables are sorted by
usage, I did this to guess better at cache line optimization versus a  
random distribution, or sorted alphabetically.
However I don't think anyone has done a careful study to see how best  
the variables should be arranged. Mind
when I did this on the powerpc I was *unable* to see any difference.


Lastly
ArraysToGlobalStruct-JMM.1.cs
in the squeak mac source tree is used to modify VMMaker to put or not  
put arrays in the global structure foo.
In the past depending on the compiler would produce good or horrible  
code for accessing an array that
was part of a structure.

You would need to look at this change set, the current VMMaker code,  
then see if using it makes a
difference in the assembler code generated.


Oh and -fgcse

Fiddling with that might produce different things depending on the  
compiler....

--
= 
= 
= 
========================================================================
John M. McIntosh <johnmci at smalltalkconsulting.com>
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
= 
= 
= 
========================================================================





More information about the Squeak-dev mailing list