[FIX] Leds separated and GamesRemoval (was [Q] Are Leds game s ?)
Daniel Vainsencher
danielv at netvision.net.il
Wed Nov 27 20:27:25 UTC 2002
PackageInfo (on SM) externalUsers is useful for detecting this sort of
thing...
Daniel
"Magistrello Alejandro (SFA)" <magistra at TELEFONICA.COM.AR> wrote:
> This message is in MIME format. Since your mail reader does not understand
> this format, some or all of this message may not be legible.
>
> --Boundary_(ID_RkaJROxIvVW7LINcbt6b8w)
> Content-type: text/plain
> Content-transfer-encoding: 7BIT
>
> and now the attachment ;-)
>
>
> <<GamesRemoval-asm.1.cs>>
>
> > -----Mensaje original-----
> > De: Magistrello Alejandro (SFA) [SMTP:magistra at TELEFONICA.COM.AR]
> > Enviado el: martes 26 de noviembre de 2002 20:42
> > Para: 'squeak-dev at lists.squeakfoundation.org'
> > Asunto: RE: [FIX] Leds separated and GamesRemoval (was [Q] Are Leds
> > game s ?)
> >
> > Hi Markus and all,
> >
> > its SystemDictionary>>macroBenchmarks that plays with a FreeCell
> >
> > please try the attached cs
> >
> > best regards
> > Alejandro
> >
> > > -----Mensaje original-----
> > > De: Magistrello Alejandro (SFA) [SMTP:magistra at TELEFONICA.COM.AR]
> > > Enviado el: martes 26 de noviembre de 2002 20:14
> > > Para: 'squeak-dev at lists.squeakfoundation.org'
> > > Asunto: RE: [FIX] Leds separated and GamesRemoval (was [Q] Are Leds
> > > game s ?)
> > >
> > >
> > > >>GamesRemoval is based on Ballon3DRemoval.
> > > >>
> > > >>
> > > >Is it possible that it leaves 'AnObsoleteFreeCell' which couldn't be
> > > >found by PointerFinder?
> > >
> > > oops, you're rigth, but can't find why :-(.
> > >
> > > and also now
> > >
> > > Smalltalk obsoleteMethodReferences
> > > and
> > > Smalltalk browseObsoleteMethodReferences
> > >
> > > fails because CompiledMethod dnu: methodReference
> > >
> > >
> > > >Kind regards, Markus
> > >
> > > best regards,
> > > Alejandro
>
> --Boundary_(ID_RkaJROxIvVW7LINcbt6b8w)
> Content-type: application/octet-stream; name=GamesRemoval-asm.1.cs
> Content-transfer-encoding: quoted-printable
> Content-disposition: attachment; filename=GamesRemoval-asm.1.cs
>
> 'From Squeak3.4alpha of ''11 November 2002'' [latest update: #5108] on =
> 26 November 2002 at 8:35:51 pm'!=0D"Change Set: =
> GamesRemoval-asm=0DDate: 26 November 2002=0DAuthor: Alejandro =
> Magistrello=0D=0DRemoves a reference to FreeCell=0Dthen separates Led* =
> classes into a new category.=0Dthen answer yes if you want to remove =
> the games from the system"!=0D=0D=0D!SystemDictionary methodsFor: =
> 'housekeeping' stamp: 'asm 11/26/2002 20:33'!=0DmacroBenchmarks=0D =
> "Reports an array of times taken to run a number of macro operations =0D =
> indicative of typical Squeak activity, each run after a full =0D =
> garbageCollection, and with exactly 10Mb of free space available. In =0D =
> addition it puts up a window with recent VM statistics local to each =
> test."=0D "PLEASE TAKE NOTE: The goal of these benchmarks is to provide =
> a simple =0D basis for A/B performance comparisons with a given Squeak =
> image. For =0D example JIT vs interpreter, new GC vs old, etc. However, =
> a number of =0D these benchmarks will 'drift' with evolution of the =
> Squeak image, as, =0D for instance, if the number of methods decompiled =
> in macroBenchmark1 =0D were to change. Therefore it is essential =
> *never* to make comarisons =0D between macroBenchmarks run from two =
> different images."=0D "Smalltalk macroBenchmarks #(43215 53122 81336 =
> 26927 8993 12607 9024) =0D 400MHz G3"=0D | interp time saveMorphs =
> freeCell report fullReport individualTimes |=0D individualTimes _ =
> OrderedCollection new.=0D fullReport _ String=0D streamContents: =
> [:strm | =0D Smalltalk timeStamp: strm.=0D "1: Decompile, =
> pretty-print, and compile a bunch of =0D methods. Does not install =
> in classes, so does not flush =0D cache. "=0D strm cr; cr; =
> nextPutAll: 'Benchmark #1: '; print: (time _ self=0D =
> standardTime: [Smalltalk macroBenchmark1]); nextPutAll: 'ms'; cr; =
> nextPutAll: '---------------------'; cr; nextPutAll: Utilities =
> vmStatisticsShortString.=0D individualTimes addLast: time.=0D =
> "2: Build morphic tiles for all methods over 800 bytes =0D (;-). =
> Does no display."=0D strm cr; nextPutAll: 'Benchmark #2: '; print: =
> (time _ self=0D standardTime: [SyntaxMorph testAllMethodsOver: =
> 800]); nextPutAll: 'ms'; cr; nextPutAll: '---------------------'; cr; =
> nextPutAll: Utilities vmStatisticsShortString.=0D individualTimes =
> addLast: time.=0D "3: Translate the interpreter with inlining. =0D =
> Does not include any plugins."=0D strm cr; nextPutAll: =
> 'Benchmark #3: '; print: (time _ self=0D standardTime: =
> [Smalltalk macroBenchmark2]); nextPutAll: 'ms'; cr; nextPutAll: =
> '---------------------'; cr; nextPutAll: Utilities =
> vmStatisticsShortString.=0D individualTimes addLast: time.=0D =
> "4: Run the context step simulator. =0D 200 iterations printing pi =
> and 15 factorial."=0D strm cr; nextPutAll: 'Benchmark #4: '; print: =
> (time _ self=0D standardTime: [Smalltalk macroBenchmark3]); =
> nextPutAll: 'ms'; cr; nextPutAll: '---------------------'; cr; =
> nextPutAll: Utilities vmStatisticsShortString.=0D individualTimes =
> addLast: time.=0D "5: Run the InterpreterSimulator for 150,000 =
> bytecodes. =0D Will only run if you have mini.image in your =0D =
> directory. "=0D strm cr; nextPutAll: 'Benchmark #5: ';=0D =
> print: ((FileDirectory default includesKey: 'mini.image')=0D =
> ifTrue: [interp _ InterpreterSimulator new openOn: 'mini.image'.=0D =
> time _ self=0D standardTime: [interp runForNBytes: =
> 150000].=0D interp close.=0D Display restore.=0D =
> time]=0D ifFalse: [time _ 0]); nextPutAll: 'ms'; cr; =
> nextPutAll: '---------------------'; cr; nextPutAll: Utilities =
> vmStatisticsShortString.=0D individualTimes addLast: time.=0D =
> "6: Open 10 browsers and close them. =0D Includes browsing to a =
> specific method."=0D strm cr; nextPutAll: 'Benchmark #6: ';=0D =
> print: (Smalltalk isMorphic=0D ifTrue: [saveMorphs _ self =
> currentWorld submorphs.=0D self currentWorld removeAllMorphs.=0D =
> "heh, heh"=0D time _ self=0D standardTime: =
> [1=0D to: 10=0D do: [:i | Browser =
> fullOnClass: SystemDictionary selector: #macroBenchmarks].=0D =
> self currentWorld submorphs=0D do: [:m | =0D =
> m delete.=0D self currentWorld doOneCycle]].=0D =
> self currentWorld addAllMorphs: saveMorphs.=0D time]=0D =
> ifFalse: [time _ 0]); nextPutAll: 'ms'; cr; nextPutAll: =
> '---------------------'; cr; nextPutAll: Utilities =
> vmStatisticsShortString.=0D individualTimes addLast: time.=0D =
> "7: Play a game of FreeCell with display, while running =0D the =
> MessageTally. =0D Thanks to Bob Arning for the clever part of this =
> one."=0D "commented asm so games can be removed"=0D " =0D =
> strm cr; nextPutAll: 'Benchmark #7: '; =0D print: (Smalltalk =
> isMorphic =0D ifTrue: ["=0D "Play a trivial game of FreeCell =
> with MessageTally and =0D report. "=0D " =0D (freeCell _ =
> FreeCell new) openInWorld. =0D time _ self standardTime: [freeCell =
> board pickGame: 1]. =0D (((report _ self currentWorld =
> firstSubmorph) isKindOf: =0D SystemWindow) and: [self currentWorld =
> firstSubmorph =0D label =3D 'Spy Results']) =0D ifTrue: [report =
> delete]. =0D freeCell delete. =0D time] =0D ifFalse: [time =
> _ 0]); =0D nextPutAll: 'ms'; cr; nextPutAll: =
> '---------------------'; =0D cr; nextPutAll: Utilities =
> vmStatisticsShortString. =0D individualTimes addLast: time."=0D =
> individualTimes addLast: time.=0D strm cr; nextPutAll: =
> '---------------------'; cr; nextPutAll: 'Total time =3D '; print: =
> individualTimes sum; nextPutAll: ' milliseconds.'; cr].=0D StringHolder =
> new textContents: fullReport;=0D openLabel: 'Macro Benchmark =
> Results'.=0D ^ individualTimes asArray! !=0D=0D"Postscript:=0DSeparates =
> Led* classes to a new category"=0DSmalltalk organization addCategory: =
> 'Morphic-Leds'.=0DSystemOrganization classifyAll: #(LedDigitMorph =
> LedCharacterMorph LedMorph LedTimerMorph) under: =
> 'Morphic-Leds'.=0D=0D"Remove the games from the system."=0D(self =
> confirm: 'Do you want to remove Games right away?') ifTrue:[=0D "get =
> rid of the Games project"=0D (Project named: 'Games') ifNotNilDo:[:prj| =
> Project deletingProject: prj].=0D "Dump everything"=0D =
> SystemOrganization removeCategoriesMatching: 'Morphic-Games*'.=0D =
> "Flush MCRs"=0D MethodChangeRecord allInstancesDo:[:mcr| mcr =
> noteNewMethod: nil].=0D "And get all the memory back"=0D Smalltalk =
> garbageCollect.]!=0D=
>
> --Boundary_(ID_RkaJROxIvVW7LINcbt6b8w)--
More information about the Squeak-dev
mailing list
|