jiangli@4936: /* jiangli@4936: * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. jiangli@4936: * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. jiangli@4936: * jiangli@4936: * This code is free software; you can redistribute it and/or modify it jiangli@4936: * under the terms of the GNU General Public License version 2 only, as jiangli@4936: * published by the Free Software Foundation. jiangli@4936: * jiangli@4936: * This code is distributed in the hope that it will be useful, but WITHOUT jiangli@4936: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or jiangli@4936: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License jiangli@4936: * version 2 for more details (a copy is included in the LICENSE file that jiangli@4936: * accompanied this code). jiangli@4936: * jiangli@4936: * You should have received a copy of the GNU General Public License version jiangli@4936: * 2 along with this work; if not, write to the Free Software Foundation, jiangli@4936: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. jiangli@4936: * jiangli@4936: * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA jiangli@4936: * or visit www.oracle.com if you need additional information or have any jiangli@4936: * questions. jiangli@4936: * jiangli@4936: */ jiangli@4936: #include "precompiled.hpp" jiangli@4936: #include "oops/methodCounters.hpp" jiangli@4936: #include "runtime/thread.inline.hpp" jiangli@4936: jiangli@4936: MethodCounters* MethodCounters::allocate(ClassLoaderData* loader_data, TRAPS) { iklam@5208: return new(loader_data, size(), false, MetaspaceObj::MethodCountersType, THREAD) MethodCounters(); jiangli@4936: } jiangli@4936: jiangli@4936: void MethodCounters::clear_counters() { jiangli@4936: invocation_counter()->reset(); jiangli@4936: backedge_counter()->reset(); jiangli@4936: set_interpreter_throwout_count(0); jiangli@4936: set_interpreter_invocation_count(0); jiangli@4936: }