Request for reviews (S): 8002069: Assert failed in C2: assert(field->edge_count() > 0) failed: sanity

Vladimir Ivanov vladimir.x.ivanov at oracle.com
Tue Nov 6 13:57:46 PST 2012


Vladimir K.,

I'd like to clarify one thing with code style.

Why do you guard verification code with ASSERT?
Isn't it enough to have VerifyConnectionGraph non-product [1], so 
compiler can just eliminate relevant code as dead?

As a use case: it's much easier and less error-prone to enable 
non-product code guarded by a flag just by changing flag type rather 
than replacing all relevant asserts. I envision such situations be 
useful during development/testing/problem diagnostics.

Otherwise, the fix looks good.

Best regards,
Vladimir Ivanov

[1] src/share/vm/opto/c2_globals.hpp:460:  notproduct(bool, 
VerifyConnectionGraph , true,

On 11/3/12 2:34 AM, Vladimir Kozlov wrote:
> http://cr.openjdk.java.net/~kvn/8002069/webrev/
>
> The reference to a field on a dead path (which is not eliminated yet) of
> bimorphic inlined call has different type (oop) instead of real (int)
> field type.
>
> Added missed type check:
>
> -          if (store != NULL && store->is_Store()) {
> +          if (store != NULL && store->is_Store() &&
> +              store->as_Store()->memory_type() == ft) {
>
> The rest of changes are additional verification and verbose output
> during failure which helped me to debug the problem.
>
> Added compiler regression test.
>
> Tested with CTW and compiler regression tests.
>
> Thanks,
> Vladimir
>


More information about the hotspot-compiler-dev mailing list