8024275: During CTW: assert(sig_bt[member_arg_pos] == T_OBJECT) failed: dispatch argument must be an object

Thu, 12 Sep 2013 14:53:44 -0700

author
twisti
date
Thu, 12 Sep 2013 14:53:44 -0700
changeset 5723
3a4e6c929bf3
parent 5660
34bd5e86aadb
child 5724
591b49112612

8024275: During CTW: assert(sig_bt[member_arg_pos] == T_OBJECT) failed: dispatch argument must be an object
Reviewed-by: kvn, vlivanov

src/share/vm/classfile/classLoader.cpp file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/vm/classfile/classLoader.cpp	Wed Sep 11 09:34:00 2013 +0200
     1.2 +++ b/src/share/vm/classfile/classLoader.cpp	Thu Sep 12 14:53:44 2013 -0700
     1.3 @@ -1319,6 +1319,25 @@
     1.4    // The CHECK at the caller will propagate the exception out
     1.5  }
     1.6  
     1.7 +/**
     1.8 + * Returns if the given method should be compiled when doing compile-the-world.
     1.9 + *
    1.10 + * TODO:  This should be a private method in a CompileTheWorld class.
    1.11 + */
    1.12 +static bool can_be_compiled(methodHandle m, int comp_level) {
    1.13 +  assert(CompileTheWorld, "must be");
    1.14 +
    1.15 +  // It's not valid to compile a native wrapper for MethodHandle methods
    1.16 +  // that take a MemberName appendix since the bytecode signature is not
    1.17 +  // correct.
    1.18 +  vmIntrinsics::ID iid = m->intrinsic_id();
    1.19 +  if (MethodHandles::is_signature_polymorphic(iid) && MethodHandles::has_member_arg(iid)) {
    1.20 +    return false;
    1.21 +  }
    1.22 +
    1.23 +  return CompilationPolicy::can_be_compiled(m, comp_level);
    1.24 +}
    1.25 +
    1.26  void ClassLoader::compile_the_world_in(char* name, Handle loader, TRAPS) {
    1.27    int len = (int)strlen(name);
    1.28    if (len > 6 && strcmp(".class", name + len - 6) == 0) {
    1.29 @@ -1362,8 +1381,7 @@
    1.30            int comp_level = CompilationPolicy::policy()->initial_compile_level();
    1.31            for (int n = 0; n < k->methods()->length(); n++) {
    1.32              methodHandle m (THREAD, k->methods()->at(n));
    1.33 -            if (CompilationPolicy::can_be_compiled(m, comp_level)) {
    1.34 -
    1.35 +            if (can_be_compiled(m, comp_level)) {
    1.36                if (++_codecache_sweep_counter == CompileTheWorldSafepointInterval) {
    1.37                  // Give sweeper a chance to keep up with CTW
    1.38                  VM_ForceSafepoint op;
    1.39 @@ -1375,7 +1393,7 @@
    1.40                                              methodHandle(), 0, "CTW", THREAD);
    1.41                if (HAS_PENDING_EXCEPTION) {
    1.42                  clear_pending_exception_if_not_oom(CHECK);
    1.43 -                tty->print_cr("CompileTheWorld (%d) : Skipping method: %s", _compile_the_world_class_counter, m->name()->as_C_string());
    1.44 +                tty->print_cr("CompileTheWorld (%d) : Skipping method: %s", _compile_the_world_class_counter, m->name_and_sig_as_C_string());
    1.45                } else {
    1.46                  _compile_the_world_method_counter++;
    1.47                }
    1.48 @@ -1391,11 +1409,13 @@
    1.49                                                methodHandle(), 0, "CTW", THREAD);
    1.50                  if (HAS_PENDING_EXCEPTION) {
    1.51                    clear_pending_exception_if_not_oom(CHECK);
    1.52 -                  tty->print_cr("CompileTheWorld (%d) : Skipping method: %s", _compile_the_world_class_counter, m->name()->as_C_string());
    1.53 +                  tty->print_cr("CompileTheWorld (%d) : Skipping method: %s", _compile_the_world_class_counter, m->name_and_sig_as_C_string());
    1.54                  } else {
    1.55                    _compile_the_world_method_counter++;
    1.56                  }
    1.57                }
    1.58 +            } else {
    1.59 +              tty->print_cr("CompileTheWorld (%d) : Skipping method: %s", _compile_the_world_class_counter, m->name_and_sig_as_C_string());
    1.60              }
    1.61  
    1.62              nmethod* nm = m->code();

mercurial