harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gregory Shimansky <gshiman...@gmail.com>
Subject Re: [drlvm][ti] thread unsafe global list of compiled stubs
Date Fri, 08 Dec 2006 23:56:46 GMT
Alexei Fedotov wrote:
> Gregory,
> Thank you for explaining. As far as I unerstand writing to the thread
> unsafe list is enough to cause segmentation fault on smp. You need to
> update two fields, and this cannot be done atomically.

Writing to the list won't do any harm as long as the list is not used. 
Only the head of the list is used for writing, and if some ->next fields 
have wrong pointers it won't matter as long as no one reads the list.

> According to the wiki page [1] I need to cleanup CodeChunkInfo
> structures anyway. Access to the code chunks is synchronized via
> method locks. I believe it would be a good idea to unify these chunk
> storages. Won't you object?

Yes I object. There is no reason to mix JIT generated code chunks and VM 
generated stubs. These are two totally different code areas, and over 
synchronization is not needed just because the code pieces call each 
other. As I've written, in case JVMTI is disabled, 
compile_add_dynamic_generated_code_chunk should not do anything at all, 
it should just return.


View raw message