PhiHo Hoang | 1 Jan 06:13 2003

It's now 2003 (was Re: [ENH][VM][FIX] faster garbage collection, and removal of unused vars)

HAPPY NEW YEAR, EVREYONE.

Cheers,

PhiHo.

----- Original Message ----- 
From: "John M McIntosh" <johnmci <at> smalltalkconsulting.com>
To: <squeak-dev <at> lists.squeakfoundation.org>
Sent: Monday, December 30, 2002 3:27 AM
Subject: [ENH][VM][FIX] faster garbage collection, and removal of unused
vars

> This change set provides a 18 - 28% improvement in the GC logic using
> an test image that has 1.1 million objects in it on the PowerPC.
> I won't comment on if this makes any difference on intel, however
> someone might try it and see what happens.
>
> In early December I took a look at the garbage collector and realized
> for the mark logic, at least on the PowerPC, we were moving three key
> variables  in and out of memory multiple times per object, versus
> keeping everything in a register or two. Also we managed to make some
> procedure calls for each object we looked at, which is time consuming.
>
> In discussing a possible fix with Tim, we realized that in some cases
> because of inlining, why some global variables actually become local
> variables because different SLANG methods are folded together.
>
> This change set add logic to review variable usage and if possible fold
> variables that only appear in one inlined method into a declaration
(Continue reading)

Gary Fisher | 1 Jan 19:08 2003
Picon

Re: It's now 2003 (was Re: [ENH][VM][FIX] faster garbage collection, and removal of unused vars)

A very happy 2003 to you and all, PhiHo!
 
Let's Squeak through another one!
 
Gary
 
----- Original Message -----
Sent: Wednesday, January 01, 2003 12:13 AM
Subject: It's now 2003 (was Re: [ENH][VM][FIX] faster garbage collection, and removal of unused vars)

HAPPY NEW YEAR, EVREYONE.

Cheers,

PhiHo.

----- Original Message -----
From: "John M McIntosh" <johnmci <at> smalltalkconsulting.com>
To: <squeak-dev <at> lists.squeakfoundation.org>
Sent: Monday, December 30, 2002 3:27 AM
Subject: [ENH][VM][FIX] faster garbage collection, and removal of unused
vars


> This change set provides a 18 - 28% improvement in the GC logic using
> an test image that has 1.1 million objects in it on the PowerPC.
> I won't comment on if this makes any difference on intel, however
> someone might try it and see what happens.
>
> In early December I took a look at the garbage collector and realized
> for the mark logic, at least on the PowerPC, we were moving three key
> variables  in and out of memory multiple times per object, versus
> keeping everything in a register or two. Also we managed to make some
> procedure calls for each object we looked at, which is time consuming.
>
> In discussing a possible fix with Tim, we realized that in some cases
> because of inlining, why some global variables actually become local
> variables because different SLANG methods are folded together.
>
> This change set add logic to review variable usage and if possible fold
> variables that only appear in one inlined method into a declaration
> within the one method and dropped them from the globals. Right now I
> only deal with interp.c, and I've not really studied say variables
> across N methods where N is > 2 but say < 6 to understand what could be
> done with a bit more tweaking.
>
> Interesting enough these variables are:
> field, parentField, child in the Mark Logic
> cntx, val in the interpret routine.
>
> A bit of slang changing was also done to:
>
> 1) Provide an array headerTypeBytes, a lookup array for the header byte
> length calculation versus doing a couple of IF statements.
> 2) A few restructuring hints to ensure procedure calls actually become
> inlined, where in the past they violated an inlining rule.
> 3) Some really large routines in the compacting logic were broken into
> multiple routines, because the logic is really in multiple steps and
> this helps the compiler (ah stupid compilers) deal with register
> allocation better. Also it helps one think about why we have multiple
> steps.
>
> I think a bit more work could be done in this area, but I'll look for
> feedback first.
>
> Also I've moved the logic from voidIsNotInt that dealt with ensuring
> bogus unused variables are deleted into this change set.
>
> Now for the Globals as a structure logic, I've attached an addendum
> change set (GCMakeItFasterGStruct-JMM.6.cs.gz) to provide the following
> feature: Declare foo as a pointer to the foo structure as a local, this
> makes for better powerpc code which improves overall performance by a
> few percentage points. You also need this changeset because of some
> structure changes if you've filed in the globals as a structure changes
> sets, and want the faster GC speed.
>
> --
> ========================================================================
> ===
> John M. McIntosh <johnmci <at> smalltalkconsulting.com> 1-800-477-2659
> Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
> ========================================================================
> ===
>

Ken Causey | 1 Jan 20:59 2003

Re: [BUG, Morphic Wrappers, BobsUI] Drag and Drop Browser Support broken in bobsui3a

Ah excellent.  I suppose the dependencies handling is one aspect of
package automation provided by SqueakMap et. al. that those of us trying
to track down bug sources have to keep in mind.  Thank you for taking
the time to track this down better than I did.

On Wed, 2003-01-01 at 08:41, yampa <at> mindspring.com wrote:
> Ken;
>  I have recreated this problem.  It is not in BobsUI, but appears to be in the
> Morphic Wrappers changeset, which I load and use for BobsUI. I loaded Morphic
> wrappers without BobsUI and still recreated the problem.  Since I didn't write
> Morphic Wrappers, I'd like the morphic wrappers authors to look at it before I
> tried to work on their code.  They are  Luciano Esteban Notarfrancesco and
> Gerardo Richarte.
> 
> Doug R.
> 
> > > Ken Causey wrote:
> > > > 
> > > > File BobsUI3a into a vanilla 5156 image and
> > enable browseWithDragNDrop.
> > > > Open a browser and drag from any of the
> > PluggableListMorphs and drop the
> > > > item back into the originating
> > PluggableListMorph.  A StringMorph is
> > > > left behind.  Additionally I'm seeing
> > behaviour with StarBrowser (if you
> > > > file it in of course) where the far left
> > tree display now changes
> > > > selection based simply on mouse movement
> > with no mouse down or up
> > > > required.  Note sure how closely these are
> > related but they are
> > > > coincidental with the filing in of
> > BobsUI3a.
> > > > 
> > > > Ken Causey
> > 

Tim Rowledge | 1 Jan 22:36 2003
Picon

File closing annoyances

I've been trying to see if I can rid the image of the obscenity known as
#readOnlyCopy with, unfortunately little luck so far. It's not so much
a problem with excising #readOnlyCopy as such as the fairly pervasive
assumption that files can be opened again and again and again.
Unfortunately it is not always true that you can open a file already
opened.

However, one place that really caught my eye whilst digging around was
the rather odd seeming close-and-reopen process whenever changes are
flushed to the changelog. This is despite the use of an explicit flush
method... (see SystemDictionary>forceChangesToDisk or similar)

Does anyone know if this oddity is still required, or why it is used?
Can it be dropped?

tim
--

-- 
Tim Rowledge, tim <at> sumeru.stanford.edu, http://sumeru.stanford.edu/tim
Strange OpCodes: MW: Multiply Work

David T. Lewis | 2 Jan 00:21 2003
Picon

Re: File closing annoyances

On Wed, Jan 01, 2003 at 01:36:49PM -0800, Tim Rowledge wrote:
> 
> However, one place that really caught my eye whilst digging around was
> the rather odd seeming close-and-reopen process whenever changes are
> flushed to the changelog. This is despite the use of an explicit flush
> method... (see SystemDictionary>forceChangesToDisk or similar)
> 
> Does anyone know if this oddity is still required, or why it is used?
> Can it be dropped?

I suspect that there are any number of platforms on which it would be
a bad idea to have the changes file open at the same time the VM
decides to crash. I feel a bit safer overall having the changes file
in a normally-closed condition.

However, now that you mention it... If you put a TimeProfile browser
on something like this:

| fs |
TimeProfileBrowser onBlock:
  [100 timesRepeat:
    [fs _ FileStream fileNamed: '/my/squeak/directory/squeak.changes'.
    fs close]]

You'll find that the real concern is in WeakRegistry>>remove:ifAbsent:

This actually turns out to be a very large performance impact on anything
that closes lots of files. CommandShell takes a bit hit on this for
instance.

I took a look at this a while ago, but was uncertain as to how to
improve it.

Dave

Tim Rowledge | 1 Jan 23:57 2003
Picon

Re: File closing annoyances

...and while I'm whining about this part of the image, what is it with
this abuse of FileStreams in ChangeRecord? The code absolutely assumes
that each change record will have an instance of a _closed_ filestream
that it can open and close when fetching the text of the associated
method. In order to get such a filestream you rely implicitly upon
having (ab)used readOnlyCopy. Yuck.

Using a file name to open and close would be a little less awful but
since we know (I'm pretty sure) that change records are in the change
file (or possibly one of several change files I suppose) why do we not
just use it as is? It's already opened after all.

Sigh. I know there's precious little chance of getting this changed;
look at the resistance to Flow. Grumble.

tim
--

-- 
Tim Rowledge, tim <at> sumeru.stanford.edu, http://sumeru.stanford.edu/tim
Useful random insult:- Her modem lights are on but there's no carrier.

Tim Rowledge | 2 Jan 00:27 2003
Picon

Re: File closing annoyances

"David T. Lewis" <lewis <at> mail.msen.com> is claimed by the authorities to have written:

> I suspect that there are any number of platforms on which it would be
> a bad idea to have the changes file open at the same time the VM
> decides to crash. I feel a bit safer overall having the changes file
> in a normally-closed condition.
Oh, but it _isn't_ normally closed; the code flushes the filestream and
then closes it and then opens it again!

tim

--

-- 
Tim Rowledge, tim <at> sumeru.stanford.edu, http://sumeru.stanford.edu/tim
Strange OpCodes: RDRI: Rotate Disk Right Immediate

John M McIntosh | 2 Jan 01:52 2003

Re: File closing annoyances

I think some VM's don't honor the flush, so the only way to flush  
(kinda) is
to close the file. Mm the mac VM didn't flush until VM version v3.06

If all VM folks agree the file is actually flushed using some
OS level flush routine, then I'd guess you could keep the file open?

On Wednesday, January 1, 2003, at 03:27  PM, Tim Rowledge wrote:

> "David T. Lewis" <lewis <at> mail.msen.com> is claimed by the authorities  
> to have written:
>
>> I suspect that there are any number of platforms on which it would be
>> a bad idea to have the changes file open at the same time the VM
>> decides to crash. I feel a bit safer overall having the changes file
>> in a normally-closed condition.
> Oh, but it _isn't_ normally closed; the code flushes the filestream and
> then closes it and then opens it again!
>
> tim
>
> --  
> Tim Rowledge, tim <at> sumeru.stanford.edu, http://sumeru.stanford.edu/tim
> Strange OpCodes: RDRI: Rotate Disk Right Immediate
>
>
>
>
--
======================================================================== 
===
John M. McIntosh <johnmci <at> smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
======================================================================== 
===

Ken Collins | 2 Jan 02:29 2003
Picon

[Q] Squeak and...

I am curious about which other Smalltalks Squeakers use. I imagine Squeak is 
a/the favorite of Squeakers, but I'm wondering what other favorites there 
are and why. I jump between Squeak, VW, and STX - always comming back to 
Squeak - mainly to look into widget/GUI stuff.

Cheers - and Happy New Year!
Ken

_________________________________________________________________
The new MSN 8 is here: Try it free* for 2 months 
http://join.msn.com/?page=dept/dialup

cottonsqueak | 2 Jan 06:30 2003
Picon
Picon

[ENH] QueueSoundComment-efc

from preamble:

"Change Set:		QueueSoundComment-efc
Date:			2 January 2003
Author:			Eddie Cottongim

A class comment for QueueSound."!
Attachment (QueueSoundComment-efc.cs.gz): application/octet-stream, 1010 bytes

Gmane