Request for review(XL): 6958292 C1: Enable parallel compilation

Igor Veresov igor.veresov at oracle.com
Thu Jun 3 18:19:53 PDT 2010


On 6/3/10 6:07 PM, Igor Veresov wrote:
> On 6/3/10 5:18 PM, Vladimir Kozlov wrote:
>>
>> c1_Compiler.cpp:
>>
>> Should you save arena in Compiler::initialize_all()?
>>
>> 49 // note: to use more than on instance
>> ^ one ?
>>
> Right. Thanks.
>
>> In Compiler::initialize() why you read ciEnv::current()?
>
> Didn't notice that, no reason why we should.
>
>>
>>
>> c1_Compilation.hpp:
>>
>> Did you try to remove new(size_t size) and leave only one with arena to
>> find all places which use 'new'
>> and replace then with new(arena) ?
>>
>> ! void* operator new(size_t size) { return
>> Compilation::current()->arena()->Amalloc(size); }
>> ! void* operator new(size_t size, Arena* arena) {
>> ! return arena->Amalloc(size);
>> ! }
>>
>> For example, I see in IR::IR() you can use new(compilation->arena())
>> IRScope(.
>
> Good point. I'll do that. Thanks!

On the other hand since there isn't really much performance difference, 
I'm not sure it's worth it. In fact we didn't see any measurable 
difference between the tls variable access and global variable access. 
So, provided that new is inlined there shouldn't be much of difference 
is you pass the area or get it from tls.

igor

>
> igor
>
>
>>
>> Vladimir
>>
>> Tom Rodriguez wrote:
>>> Just to summarize the changes:
>>>
>>> Refactor the initialization steps into global setup to allocate some
>>> persistent pieces, and per compilation setup.
>>>
>>> Move state out of static fields into per thread structures.
>>>
>>> Convert visitor patterns that used functions to use closures.
>>>
>>> Remove the machinery that allowed the appearance of multithreading in
>>> the tiered world when it wasn't really supported.
>>>
>>> tom
>>>
>>> On Jun 3, 2010, at 11:45 AM, Igor Veresov wrote:
>>>
>>>> I'd like to push this Tom's implementation of parallel compilation in
>>>> C1.
>>>>
>>>> Webrev: http://cr.openjdk.java.net/~iveresov/6958292/webrev/
>>>>
>>>> Thanks,
>>>> igor
>>>
>



More information about the hotspot-compiler-dev mailing list