[squeak-dev] [Simulation errors] ObjectTracer on: true

Marcel Taeumel marcel.taeumel at hpi.de
Thu Mar 26 09:01:06 UTC 2020


Hi Christoph.

> I know they don't work like usual objects because many boolean/nil selectors are inlined ATM.

It's not only that. You can count special treatment for some basic objects throughout the system. Not just message dispatching.

It would be great to get some overview on that. :-)

Best,
Marcel
Am 26.03.2020 09:09:53 schrieb Tobias Pape <das.linux at gmx.de>:

> On 26.03.2020, at 09:01, Thiede, Christoph wrote:
>
> Hi Tobias,
>
> > true false nil are special. :)
> > The ObjectTracer on whatever cannot be ever true.
>
> I know they don't work like usual objects because many boolean/nil selectors are inlined ATM.
> However, this only affects specific selectors.
> The following worked - if ObjectTracer would not cause a recursion:
> (ObjectTracer on: true) xor: (ObjectTracer on: false)
>
> IMHO, everything in Smalltalk should be an object and should also behave like an object, especially in terms of message dispatching. Is there any other reason to deviate from these rules besides performance?

No, but the only gain changing things here is some kind of artificial purity, which for its own sake yields nothing.


>
> Best,
> Christoph
>
> PS: You cannot suppress the debuggers spawn by an ObjectTracer ... Should we maybe use some kind of notification for this? IWLT do the following:
> [(ObjectTracer on: true) xor: (ObjectTracer on: false)] on: WarningOrSo do: #resume.
> Von: Squeak-dev im Auftrag von Tobias Pape
> Gesendet: Mittwoch, 25. März 2020 21:57:43
> An: The general-purpose Squeak developers list
> Betreff: Re: [squeak-dev] [Simulation errors] ObjectTracer on: true
>
>
> > On 25.03.2020, at 21:35, Thiede, Christoph wrote:
> >
> > Hi all!
> >
> > I rarely discovered that much errors with one single command :-)
> >
> > Steps to reproduce
> >
> > Print it:
> >
> > (ObjectTracer on: true) ifTrue: [1]
> > Expected behavior
> >
> > It is printed: 1
> >
>
> No :D
> true false nil are special. :)
> The ObjectTracer on whatever cannot be ever true.
>
> -t
>
> > Actual behavior
> >
> > The following tracer notifications appear (proceed them all):
> >
> > • (3x) #printStringLimitedTo:, #longPrintOn:limitedTo:indent: and again #printStringLimitedTo:, caused by SmalltalkImage >> #logSqueakError:inContext:
> > • #mustBeBoolean
> > • (3 more print message called by #logSqueakError:inContext: again, see the next error)
> > • Error: Where's the jump?
> > Caused by #mustBeBooleanIn:, #skipBackBeforeJump
> > If you still keep proceeding:
> >
> > • (3 more print message called by #logSqueakError:inContext: again, see the next error)
> > • Finally, the NonBooleanReceiver error from 2.
> > • VM crashes.
> > Summarizing the bugs
> >
> > ObjectTracer traces too much
> >
> > The amount of messages printed by the ObjectTracer is an unintended side effect of the way it signals calls via the debugger. The debugger logs this error, including the stack trace. How can we avoid this? Should we suppress all further notifications from one ObjectTracer instance during the first one is debugged?
> >
> > #mustBeBoolean is sent to boolean proxy
> >
> > This is caused by the simulation of the inlined #ifTrue: call.
> > I don't know whether this is worth to be fixed before Scorch?
> > If yes, I think we would need to disable inlining for this particular selector or make inlining opt-out-able as proposed here (this would probably be way too slow).
> >
> > #mustBoBoolean depends on caller chain
> >
> > It turns out that #mustBeBoolean relies on being called from a context that just did a jump. This makes it impossible to forward this message as usual via a transparent proxy/decorator.
> >
> > We use this pattern in other methods as well. How can we enable transparent wrappers not to collide with method contexts depending on their sender?
> >
> > Best,
> > Christoph



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20200326/6447ceec/attachment.html>


More information about the Squeak-dev mailing list