17618 Failing test: ReleaseTest>>#testInstalledMethodsWithIncorrectTrailerKind Interesting bug.(CompiledMethod allInstances select:[:m | (m at: m size) = 24]) collect:[:k | k -> k trailer kind] "an Array(String class>>#gtInspectorFourtyTwo->#EmbeddedSourceQCompress OSEnvironment>>#getEnv:->#EmbeddedSourceQCompress OSEnvironment>>#getEnv:->#EmbeddedSourceQCompress GlobalVariable class>>#gtExampleSmalltalk->#EmbeddedSourceQCompress VirtualMachine class>>#gtExampleBasic->#EmbeddedSourceQCompress GLMBrowser class>>#gtExampleBasic->#EmbeddedSourceQCompress RPackageTag class>>#gtExamplePackageTag->#EmbeddedSourceQCompress Object class>>#gtExampleBasic->#EmbeddedSourceQCompress GLMCompositePresentation class>>#gtExampleCompositePresentation->#EmbeddedSourceQCompress LiteralVariable class>>#gtExampleUniqueLiteralVariable->#EmbeddedSourceQCompress GTSpotterRecorderEvent class>>#gtExampleAnySubclass->#EmbeddedSourceQCompress MetacelloAbstractPackageSpec class>>#gtExamplePackageSpec->#EmbeddedSourceQCompress MetacelloProjectReferenceSpec class>>#gtExampleProjectReferenceSpec->#EmbeddedSourceQCompress MetacelloProjectSpec class>>#gtExampleMetacelloSpec->#EmbeddedSourceQCompress MetacelloSpec class>>#gtExampleMetacelloSpec->#EmbeddedSourceQCompress MetacelloVersion class>>#gtExampleMetacelloVersion->#EmbeddedSourceQCompress GLMPresentation class>>#gtExampleBasic->#EmbeddedSourceQCompress Bag class>>#gtExampleBagWithTenElements->#EmbeddedSourceQCompress Bag class>>#gtExampleBagWithOneElement->#EmbeddedSourceQCompress GTDummyExamplesRecursive class>>#h->#EmbeddedSourceQCompress GLMAlertBrick class>>#gtExample->#EmbeddedSourceQCompress GTDummyExampleProvider>>#a->#EmbeddedSourceQCompress GTDummyExampleProvider>>#b->#EmbeddedSourceQCompress GTDummyExampleWithAssertions>>#a->#EmbeddedSourceQCompress GTDummyExampleWithAssertions>>#b->#EmbeddedSourceQCompress GTDummyExamples class>>#l->#EmbeddedSourceQCompress GTDummyExamples class>>#o->#EmbeddedSourceQCompress GTDummyExamplesInvalid class>>#a:->#EmbeddedSourceQCompress GTDummyExamplesPragmas class>>#a->#EmbeddedSourceQCompress GTDummyExamplesPragmas class>>#c->#EmbeddedSourceQCompress GTDummyExamplesPragmas class>>#b->#EmbeddedSourceQCompress GLMCollapsableBrick class>>#gtExample->#EmbeddedSourceQCompress FileReference class>>#gtExampleText->#EmbeddedSourceQCompress GTSpotterStep class>>#gtExampleBasic->#EmbeddedSourceQCompress GTEventAnnouncement class>>#gtExampleEmptyAnnouncement->#EmbeddedSourceQCompress UndefinedObject>>#DoIt->#EmbeddedSourceQCompress UndefinedObject>>#DoIt->#EmbeddedSourceQCompress)" |
It seems, the gt-Methods are actually methods not in any method dictionary. And if I inspect the real methods from the method dictionary, that "flag" is different.2016-02-26 22:50 GMT+01:00 Nicolai Hess <[hidden email]>:
|
I would be curious to find out as well :)
Doru > On Feb 26, 2016, at 11:16 PM, Nicolai Hess <[hidden email]> wrote: > > It seems, the gt-Methods are actually methods not in any method dictionary. > And if I inspect the real methods from the method dictionary, that "flag" is different. > But I can not find any object pointing to this elements, and they arent cleaned up with > Smalltalk garbageCollect ... > > 2016-02-26 22:50 GMT+01:00 Nicolai Hess <[hidden email]>: > 17618 Failing test: ReleaseTest>>#testInstalledMethodsWithIncorrectTrailerKind > Interesting bug. > someone who can tell me what exactly is this trailer kind and why it is based > on some "flag" in "method at: method size". > And why it seems to be wrong for many GT-methods: > > (CompiledMethod allInstances select:[:m | (m at: m size) = 24]) collect:[:k | > k -> k trailer kind] "an Array(String class>>#gtInspectorFourtyTwo->#EmbeddedSourceQCompress OSEnvironment>>#getEnv:->#EmbeddedSourceQCompress OSEnvironment>>#getEnv:->#EmbeddedSourceQCompress GlobalVariable class>>#gtExampleSmalltalk->#EmbeddedSourceQCompress VirtualMachine class>>#gtExampleBasic->#EmbeddedSourceQCompress GLMBrowser class>>#gtExampleBasic->#EmbeddedSourceQCompress RPackageTag class>>#gtExamplePackageTag->#EmbeddedSourceQCompress Object class>>#gtExampleBasic->#EmbeddedSourceQCompress GLMCompositePresentation class>>#gtExampleCompositePresentation->#EmbeddedSourceQCompress LiteralVariable class>>#gtExampleUniqueLiteralVariable->#EmbeddedSourceQCompress GTSpotterRecorderEvent class>>#gtExampleAnySubclass->#EmbeddedSourceQCompress MetacelloAbstractPackageSpec class>>#gtExamplePackageSpec->#EmbeddedSourceQCompress MetacelloProjectReferenceSpec class>>#gtExampleProjectReferenceSpec->#EmbeddedSourceQCompress MetacelloProjectSpec class>>#gtExampleMetacelloSpec->#EmbeddedSourceQCompress MetacelloSpec class>>#gtExampleMetacelloSpec->#EmbeddedSourceQCompress MetacelloVersion class>>#gtExampleMetacelloVersion->#EmbeddedSourceQCompress GLMPresentation class>>#gtExampleBasic->#EmbeddedSourceQCompress Bag class>>#gtExampleBagWithTenElements->#EmbeddedSourceQCompress Bag class>>#gtExampleBagWithOneElement->#EmbeddedSourceQCompress GTDummyExamplesRecursive class>>#h->#EmbeddedSourceQCompress GLMAlertBrick class>>#gtExample->#EmbeddedSourceQCompress GTDummyExampleProvider>>#a->#EmbeddedSourceQCompress GTDummyExampleProvider>>#b->#EmbeddedSourceQCompress GTDummyExampleWithAssertions>>#a->#EmbeddedSourceQCompress GTDummyExampleWithAssertions>>#b->#EmbeddedSourceQCompress GTDummyExamples class>>#l->#EmbeddedSourceQCompress GTDummyExamples class>>#o->#EmbeddedSourceQCompress GTDummyExamplesInvalid class>>#a:->#EmbeddedSourceQCompress GTDummyExamplesPragmas class>>#a->#EmbeddedSourceQCompress GTDummyExamplesPragmas class>>#c->#EmbeddedSourceQCompress GTDummyExamplesPragmas class>>#b->#EmbeddedSourceQCompress GLMCollapsableBrick class>>#gtExample->#EmbeddedSourceQCompress FileReference class>>#gtExampleText->#EmbeddedSourceQCompress GTSpotterStep class>>#gtExampleBasic->#EmbeddedSourceQCompress GTEventAnnouncement class>>#gtExampleEmptyAnnouncement->#EmbeddedSourceQCompress UndefinedObject>>#DoIt->#EmbeddedSourceQCompress UndefinedObject>>#DoIt->#EmbeddedSourceQCompress)" > -- www.tudorgirba.com www.feenk.com "Being happy is a matter of choice." |
In reply to this post by Nicolai Hess-3-2
Hi Nicolai,
On Fri, Feb 26, 2016 at 1:50 PM, Nicolai Hess <[hidden email]> wrote:
There's a rich class comment in CompiledMethodTrailer which explains a lot, but let me add a little. Back in the day the source pointer in methods (the pointer that says which of the two source files and where in the file a method's source is kept) was stored in three bytes added onto the end of a CompiledMethod after its endPC. Then Dan Ingalls added the ability to not have source files at all but just to have named temporary variables. he added a compressed version of the temp names in bytes tacked on at the end of a method, replacing the source pointer. IIRC the difference between a source pointer, no source pointer, or a compressed version of the temp names was all encoded in the last byte. Round about 2009 Igor Stasenko did a really nice reimplementation of this scheme where he factored out the encoding tricks into CompiledMethodTrailer, allowing one to generalize the scheme and add new encoding types, for a total of 256 different kinds of trailer. (and if you already know all of this, forgive me for trying to teach you to suck eggs) Anyway this trailer is CompiledMethodTrailer >>encodeEmbeddedSourceQCompress "data is string with method's source code, encode it using qCompress method" self encodeUsingQCompress CompiledMethodTrailer >>decodeEmbeddedSourceQCompress "data is string with method's source code, encoded using qCompress method" self qDecompress. HTH
_,,,^..^,,,_ best, Eliot |
2016-02-27 0:36 GMT+01:00 Eliot Miranda <[hidden email]>:
Ah, yes, thanks, sorry, should have read the class comments first:-)
Interesting.
Yes I do remember his work on this.
Thanks Eliot
|
On Sat, Feb 27, 2016 at 12:32:06PM +0100, Nicolai Hess wrote:
> 2016-02-27 0:36 GMT+01:00 Eliot Miranda <[hidden email]>: > > > > > Round about 2009 Igor Stasenko did a really nice reimplementation of this > > scheme where he factored out the encoding tricks into > > CompiledMethodTrailer, allowing one to generalize the scheme and add new > > encoding types, for a total of 256 different kinds of trailer. > > > > Yes I do remember his work on this. > Igor's enchancement also enabled us to eliminate the size restriction on the changes file. Dave |
In reply to this post by Nicolai Hess-3-2
Ok, but still I do not understand how did the methods end up having a problem with the method trailer? And what can we do about it?
Doru > On Feb 27, 2016, at 12:32 PM, Nicolai Hess <[hidden email]> wrote: > > > > 2016-02-27 0:36 GMT+01:00 Eliot Miranda <[hidden email]>: > Hi Nicolai, > > On Fri, Feb 26, 2016 at 1:50 PM, Nicolai Hess <[hidden email]> wrote: > 17618 Failing test: ReleaseTest>>#testInstalledMethodsWithIncorrectTrailerKind > Interesting bug. > someone who can tell me what exactly is this trailer kind and why it is based > on some "flag" in "method at: method size". > > There's a rich class comment in CompiledMethodTrailer which explains a lot, but let me add a little. > > Ah, yes, thanks, sorry, should have read the class comments first:-) > > > Back in the day the source pointer in methods (the pointer that says which of the two source files and where in the file a method's source is kept) was stored in three bytes added onto the end of a CompiledMethod after its endPC. Then Dan Ingalls added the ability to not have source files at all but just to have named temporary variables. he added a compressed version of the temp names in bytes tacked on at the end of a method, replacing the source pointer. IIRC the difference between a source pointer, no source pointer, or a compressed version of the temp names was all encoded in the last byte. > > > Interesting. > > > Round about 2009 Igor Stasenko did a really nice reimplementation of this scheme where he factored out the encoding tricks into CompiledMethodTrailer, allowing one to generalize the scheme and add new encoding types, for a total of 256 different kinds of trailer. > > Yes I do remember his work on this. > > > (and if you already know all of this, forgive me for trying to teach you to suck eggs) > Anyway this trailer is > > CompiledMethodTrailer >>encodeEmbeddedSourceQCompress > > "data is string with method's source code, encode it using qCompress method" > self encodeUsingQCompress > > CompiledMethodTrailer >>decodeEmbeddedSourceQCompress > > "data is string with method's source code, encoded using qCompress method" > self qDecompress. > > HTH > > Thanks Eliot > > > And why it seems to be wrong for many GT-methods: > > (CompiledMethod allInstances select:[:m | (m at: m size) = 24]) collect:[:k | > k -> k trailer kind] "an Array(String class>>#gtInspectorFourtyTwo->#EmbeddedSourceQCompress OSEnvironment>>#getEnv:->#EmbeddedSourceQCompress OSEnvironment>>#getEnv:->#EmbeddedSourceQCompress GlobalVariable class>>#gtExampleSmalltalk->#EmbeddedSourceQCompress VirtualMachine class>>#gtExampleBasic->#EmbeddedSourceQCompress GLMBrowser class>>#gtExampleBasic->#EmbeddedSourceQCompress RPackageTag class>>#gtExamplePackageTag->#EmbeddedSourceQCompress Object class>>#gtExampleBasic->#EmbeddedSourceQCompress GLMCompositePresentation class>>#gtExampleCompositePresentation->#EmbeddedSourceQCompress LiteralVariable class>>#gtExampleUniqueLiteralVariable->#EmbeddedSourceQCompress GTSpotterRecorderEvent class>>#gtExampleAnySubclass->#EmbeddedSourceQCompress MetacelloAbstractPackageSpec class>>#gtExamplePackageSpec->#EmbeddedSourceQCompress MetacelloProjectReferenceSpec class>>#gtExampleProjectReferenceSpec->#EmbeddedSourceQCompress MetacelloProjectSpec class>>#gtExampleMetacelloSpec->#EmbeddedSourceQCompress MetacelloSpec class>>#gtExampleMetacelloSpec->#EmbeddedSourceQCompress MetacelloVersion class>>#gtExampleMetacelloVersion->#EmbeddedSourceQCompress GLMPresentation class>>#gtExampleBasic->#EmbeddedSourceQCompress Bag class>>#gtExampleBagWithTenElements->#EmbeddedSourceQCompress Bag class>>#gtExampleBagWithOneElement->#EmbeddedSourceQCompress GTDummyExamplesRecursive class>>#h->#EmbeddedSourceQCompress GLMAlertBrick class>>#gtExample->#EmbeddedSourceQCompress GTDummyExampleProvider>>#a->#EmbeddedSourceQCompress GTDummyExampleProvider>>#b->#EmbeddedSourceQCompress GTDummyExampleWithAssertions>>#a->#EmbeddedSourceQCompress GTDummyExampleWithAssertions>>#b->#EmbeddedSourceQCompress GTDummyExamples class>>#l->#EmbeddedSourceQCompress GTDummyExamples class>>#o->#EmbeddedSourceQCompress GTDummyExamplesInvalid class>>#a:->#EmbeddedSourceQCompress GTDummyExamplesPragmas class>>#a->#EmbeddedSourceQCompress GTDummyExamplesPragmas class>>#c->#EmbeddedSourceQCompress GTDummyExamplesPragmas class>>#b->#EmbeddedSourceQCompress GLMCollapsableBrick class>>#gtExample->#EmbeddedSourceQCompress FileReference class>>#gtExampleText->#EmbeddedSourceQCompress GTSpotterStep class>>#gtExampleBasic->#EmbeddedSourceQCompress GTEventAnnouncement class>>#gtExampleEmptyAnnouncement->#EmbeddedSourceQCompress UndefinedObject>>#DoIt->#EmbeddedSourceQCompress UndefinedObject>>#DoIt->#EmbeddedSourceQCompress)" > > _,,,^..^,,,_ > best, Eliot -- www.tudorgirba.com www.feenk.com "Being happy is a matter of choice." |
Free forum by Nabble | Edit this page |