VM improvement: speeding up failing calls of functions in missing
modules
Stephan Rudlof
sr at evolgo.de
Fri Jan 28 11:58:06 UTC 2000
Dear VM-Hackers,
attached is a bugfixed changeset according the hints of Andreas.
I have build in a primitive for clearing the missing modules cache, but
it isn't callable, because therefore I need a primitive number; any idea
Andreas?
BTW: The very slow failing of a primitive function located in a missing
module could be seen as a (performance) bug..., so how to call this
extension?
Stephan
Stephan Rudlof wrote:
>
> "Raab, Andreas" wrote:
> >
> > Stephan,
> >
> > I looked just briefly at it (I really like the idea!) but there are a couple
> > of problems with it. For one thing, you're storing oops in the
> > missingModuleCache which will not get remapped during GC. This may
> > eventually break the system or lead to strange results.
>
> You are absolutely correct! (Always the same problem...)
>
> First I had written a solution by extending specialObjects array by an
> entry missingModules array to survive GC (at this time I was aware of
> the problem!); then I've seen methodCache and atCache which are outside
> this array and the GC problem moved a little bit aside... (Should I make
> more breaks? Probably.)
>
> But there is a method Interpreter>>flushMethodCache with the comment:
> "Flush the method cache. The method cache is flushed on every
> programming change and garbage collect."
> ...
> , so they are surviving manually. But this strategy is not reliable for
> the purposes of the missingModules cache, what has to survive several
> GCs.
> So I have to go back to the first - correct - variant (which you haven't
> seen though).
>
> > Also, you should
> > keep in mind that the module names are really symbols, not strings (the
> > primitive does allow for strings but the compiler allocates these as symbols
> > for the sake of space and the convenience of browsing), so you could just
> > compare the oops rather than doing a full string compare.
>
> I didn't know that module names are always stored as symbols, and in
> dubio I try to fulfill the specification of the primitive.
> Is it safe to expect no changes regarding this point?
>
> > And, I would
> > really like to have a primitive that does allow clearing the missing module
> > cache programatically so one doesn't need to quit out of Squeak just for
> > adding a module.
>
> No problem.
>
> Thank you for your - fast - hints,
>
> Stephan
--
Stephan Rudlof (sr at evolgo.de)
"Genius doesn't work on an assembly line basis.
You can't simply say, 'Today I will be brilliant.'"
-- Kirk, "The Ultimate Computer", stardate 4731.3
-------------- next part --------------
A non-text attachment was scrubbed...
Name: VM_speedUpCallsOfMissingModules.8.cs
Type: application/octet-stream
Size: 19024 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20000128/46140d51/VM_speedUpCallsOfMissingModules.8.obj
More information about the Squeak-dev
mailing list
|