[Mono-dev] IMT patch

Massimiliano Mantione massi at ximian.com
Thu May 31 05:42:22 EDT 2007

Here is the IMT patch for an initial review.
See here for an explanation of what IMT is:

Initially it looked "mildly unstable": when rebuilding the whole Mono
I got a couple of NRE in the mcs symbol writer while compiling some
library; just typing make again worked, so the problem was very hard
to reproduce.
However, now I updated my tree, and I just cannot reproduce it anymore.
I fully rebuilt it three times, running the tests... no crashes.
The IMT size is set to a ridiculous 4 to get lots of collisions and
stress the thunks.

- Cleanup the code (mostly remove print statements).
  BTW, do you think some of the print statements can stay there anyway?
- Move "mono_convert_imt_slot_to_vtable_slot" elsewhere (mini.c?).
- Does setting "MonoClass.imt_collisions_bitmap" need locking?
  If yes, it should be the loader lock, but does acquiring it with the
  domain lock held (we are building the MonoVTable) risk a deadlock?
- Add cumulative size of thunks to mono stats.
- Also add general "performance" of the hash function to the stats?
  I mean, collision ratio and things like that...
- Measure memory savings and call slowdown.
- Tune IMT size and hash function (even if IMO the hash is already OK).
- Maybe rewrite the thunks to do binary search instead of linear.
- Port to all the other architectures.
- Remove the "non IMT" code paths.

Do you think this should be committed before the other archs are ported,
or should we wait for the port to be complete and commit without the
current code path?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: IMT.patch
Type: text/x-patch
Size: 21973 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20070531/2fc89124/attachment.bin 

More information about the Mono-devel-list mailing list