harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Fursov" <mike.fur...@gmail.com>
Subject Re: [drlvm][vm, mmtk] adding thread-local storage functionality to vmmagic
Date Thu, 17 Aug 2006 13:10:39 GMT
I agree that we need TLS access in vmmagic, but I thought about slightly
different and more primitive implementation.
Writing something like this:
SegmentRegisterFS  segFs = new SegmentRegisterFS();
or this:
SegmentRegisterGS  segGs = new SegmentRegisterGS();

we add the knowledge of the platform to Java code. (+ 'new' operation is not
used (constructor is private) for the most of the MMTk types)
My proposal is to write something like this:

Address addr = TLS.getAddressByOffset(offset_in_TLS)

and to forget about platform related problems. Leave it to JIT or VM to
decide how to access to TLS on particular platform.

Why do you think we need to support platform specific issues in helpers? Is
there any example that shows that we can't write a helper without reference
platform details? I think we should avoid #ifdef's in Java as much as we

Mikhail Fursov

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message