harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mikhail Fursov" <mike.fur...@gmail.com>
Subject [drlvm][gc] TLS access from GC: a proposal to refactor the code
Date Tue, 24 Oct 2006 12:28:39 GMT
I propose changing the method GC accesses TLS data.
The main problem is that GC stores it's data in VM_thread struct that has no
constant offset from the TLS base  (e.g. from the address stored in fs[14]

The structure we have today is:

fs[14] keeps pointer to HyThread*
HyThread keeps pointer  to VM_thread
VM_thread struct keeps GC information inlined: Byte

The proposal is to keep the GC information in HyThread inlined. Doing this
we will have static offsets for GC data in TLS and avoid extra memory access
for every alloc request.
I tried to refactor gc_cc to use TM directly and the patch is in JIRA:
GC gurus, please review the patch for gc_cc

Could we do the same for gcv5 and gcv4?
After it's ready we can remove the third parameter from

extern Managed_Object_Handle (*gc_alloc_fast)(unsigned size,
                                              Allocation_Handle type,
                                              void *thread_pointer);

method and inline GC allocation fast-path in JIT

Mikhail Fursov

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