src/share/vm/oops/methodCounters.cpp

Tue, 30 Apr 2013 11:56:52 -0700

author
ccheung
date
Tue, 30 Apr 2013 11:56:52 -0700
changeset 4993
746b070f5022
parent 4936
aeaca88565e6
child 5208
a1ebd310d5c1
permissions
-rw-r--r--

8011661: Insufficient memory message says "malloc" when sometimes it should say "mmap"
Reviewed-by: coleenp, zgu, hseigel

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

mercurial