review(S): 7036236: VM crashes assert((!inside_attrs()) || is_error_reported()) failed ...
Igor Veresov
igor.veresov at oracle.com
Wed Apr 13 22:00:06 PDT 2011
Thanks!
On 4/13/11 9:37 PM, Vladimir Kozlov wrote:
> Looks good.
>
> Vladimir
>
> On 4/13/11 6:57 PM, Igor Veresov wrote:
>> [resending]
>>
>> Assert is caused by a race: CompileBroker::handle_full_code_cache()
>> can be called in different contexts, so a lock is
>> required when we're printing to xtty, since it's stateful. So I put
>> the xml element construction under a tty lock.
>>
>> However, CodeCache::log_state() calls largest_free_block() that will
>> unlock the tty lock, which will cause tearing and
>> the same assertion failure (this will also happen in
>> NMethodSweeper::log_sweep()). To alleviate this problem I moved the
>> call to log_state() before the tty lock is taken and made it do the
>> output to a stringStream, which is printed later
>> under the tty lock. This way we decouple the tty lock and
>> CodeCache_lock in largest_free_block().
>>
>> Also removed ttyUnlocker from largest_free_block(), since it's no
>> longer needed.
>>
>> Webrev: http://cr.openjdk.java.net/~iveresov/7036236/webrev.00/
>>
>> Thanks!
>> igor
More information about the hotspot-compiler-dev
mailing list