5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 # include "incls/_precompiled.incl" 26 # include "incls/_simpleThresholdPolicy.cpp.incl" 27 28 // Print an event. 29 void SimpleThresholdPolicy::print_event(EventType type, methodHandle mh, methodHandle imh, 30 int bci, CompLevel level) { 31 bool inlinee_event = mh() != imh(); 32 33 ttyLocker tty_lock; 34 tty->print("%lf: [", os::elapsedTime()); 35 36 int invocation_count = mh->invocation_count(); 37 int backedge_count = mh->backedge_count(); 38 switch(type) { 39 case CALL: 40 tty->print("call"); 41 break; 42 case LOOP: 43 tty->print("loop"); 44 break; 45 case COMPILE: 46 tty->print("compile"); | 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #include "precompiled.hpp" 26 #include "compiler/compileBroker.hpp" 27 #include "memory/resourceArea.hpp" 28 #include "runtime/arguments.hpp" 29 #include "runtime/simpleThresholdPolicy.hpp" 30 #include "runtime/simpleThresholdPolicy.inline.hpp" 31 32 // Print an event. 33 void SimpleThresholdPolicy::print_event(EventType type, methodHandle mh, methodHandle imh, 34 int bci, CompLevel level) { 35 bool inlinee_event = mh() != imh(); 36 37 ttyLocker tty_lock; 38 tty->print("%lf: [", os::elapsedTime()); 39 40 int invocation_count = mh->invocation_count(); 41 int backedge_count = mh->backedge_count(); 42 switch(type) { 43 case CALL: 44 tty->print("call"); 45 break; 46 case LOOP: 47 tty->print("loop"); 48 break; 49 case COMPILE: 50 tty->print("compile"); |