// Simple methods are as good being compiled with C1 as C2. // Determine if a given method is such a case. bool SimpleThresholdPolicy::is_trivial(methodOop method) { if (method->is_accessor()) return true; if (method->code() != NULL) { methodDataOop mdo = method->method_data(); if (mdo != NULL && mdo->num_loops() == 0 && (method->code_size() < 5 || (mdo->num_blocks() < 4) && (method->code_size() < 15))) { return !mdo->would_profile(); } } return false; }