< prev index next >

src/share/vm/opto/graphKit.cpp

Print this page




2109   }
2110   return record_profile_for_speculation(n, exact_kls, maybe_null);
2111 }
2112 
2113 /**
2114  * Record profiling data from argument profiling at an invoke with the
2115  * type system so that it can propagate it (speculation)
2116  *
2117  * @param dest_method  target method for the call
2118  * @param bc           what invoke bytecode is this?
2119  */
2120 void GraphKit::record_profiled_arguments_for_speculation(ciMethod* dest_method, Bytecodes::Code bc) {
2121   if (!UseTypeSpeculation) {
2122     return;
2123   }
2124   const TypeFunc* tf    = TypeFunc::make(dest_method);
2125   int             nargs = tf->domain_sig()->cnt() - TypeFunc::Parms;
2126   int skip = Bytecodes::has_receiver(bc) ? 1 : 0;
2127   for (int j = skip, i = 0; j < nargs && i < TypeProfileArgsLimit; j++) {
2128     const Type *targ = tf->domain_sig()->field_at(j + TypeFunc::Parms);
2129     if (targ->basic_type() == T_OBJECT || targ->basic_type() == T_ARRAY) {
2130       bool maybe_null = true;
2131       ciKlass* better_type = NULL;
2132       if (method()->argument_profiled_type(bci(), i, better_type, maybe_null)) {
2133         record_profile_for_speculation(argument(j), better_type, maybe_null);
2134       }
2135       i++;
2136     }
2137   }
2138 }
2139 
2140 /**
2141  * Record profiling data from parameter profiling at an invoke with
2142  * the type system so that it can propagate it (speculation)
2143  */
2144 void GraphKit::record_profiled_parameters_for_speculation() {
2145   if (!UseTypeSpeculation) {
2146     return;
2147   }
2148   for (int i = 0, j = 0; i < method()->arg_size() ; i++) {
2149     if (_gvn.type(local(i))->isa_oopptr()) {




2109   }
2110   return record_profile_for_speculation(n, exact_kls, maybe_null);
2111 }
2112 
2113 /**
2114  * Record profiling data from argument profiling at an invoke with the
2115  * type system so that it can propagate it (speculation)
2116  *
2117  * @param dest_method  target method for the call
2118  * @param bc           what invoke bytecode is this?
2119  */
2120 void GraphKit::record_profiled_arguments_for_speculation(ciMethod* dest_method, Bytecodes::Code bc) {
2121   if (!UseTypeSpeculation) {
2122     return;
2123   }
2124   const TypeFunc* tf    = TypeFunc::make(dest_method);
2125   int             nargs = tf->domain_sig()->cnt() - TypeFunc::Parms;
2126   int skip = Bytecodes::has_receiver(bc) ? 1 : 0;
2127   for (int j = skip, i = 0; j < nargs && i < TypeProfileArgsLimit; j++) {
2128     const Type *targ = tf->domain_sig()->field_at(j + TypeFunc::Parms);
2129     if (targ->isa_oopptr() && !targ->isa_valuetypeptr()) {
2130       bool maybe_null = true;
2131       ciKlass* better_type = NULL;
2132       if (method()->argument_profiled_type(bci(), i, better_type, maybe_null)) {
2133         record_profile_for_speculation(argument(j), better_type, maybe_null);
2134       }
2135       i++;
2136     }
2137   }
2138 }
2139 
2140 /**
2141  * Record profiling data from parameter profiling at an invoke with
2142  * the type system so that it can propagate it (speculation)
2143  */
2144 void GraphKit::record_profiled_parameters_for_speculation() {
2145   if (!UseTypeSpeculation) {
2146     return;
2147   }
2148   for (int i = 0, j = 0; i < method()->arg_size() ; i++) {
2149     if (_gvn.type(local(i))->isa_oopptr()) {


< prev index next >