Sat, 24 Oct 2020 14:55:37 +0800
#15190 MIPS port of 8243823: JFR Backport - vm_version_ext_mips.(h|c)pp support
aoqi@9933 | 1 | /* |
aoqi@9933 | 2 | * Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved. |
aoqi@9933 | 3 | * Copyright (c) 2018, 2020, Loongson Technology. All rights reserved. |
aoqi@9933 | 4 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
aoqi@9933 | 5 | * |
aoqi@9933 | 6 | * This code is free software; you can redistribute it and/or modify it |
aoqi@9933 | 7 | * under the terms of the GNU General Public License version 2 only, as |
aoqi@9933 | 8 | * published by the Free Software Foundation. |
aoqi@9933 | 9 | * |
aoqi@9933 | 10 | * This code is distributed in the hope that it will be useful, but WITHOUT |
aoqi@9933 | 11 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
aoqi@9933 | 12 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
aoqi@9933 | 13 | * version 2 for more details (a copy is included in the LICENSE file that |
aoqi@9933 | 14 | * accompanied this code). |
aoqi@9933 | 15 | * |
aoqi@9933 | 16 | * You should have received a copy of the GNU General Public License version |
aoqi@9933 | 17 | * 2 along with this work; if not, write to the Free Software Foundation, |
aoqi@9933 | 18 | * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
aoqi@9933 | 19 | * |
aoqi@9933 | 20 | * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
aoqi@9933 | 21 | * or visit www.oracle.com if you need additional information or have any |
aoqi@9933 | 22 | * questions. |
aoqi@9933 | 23 | * |
aoqi@9933 | 24 | */ |
aoqi@9933 | 25 | |
aoqi@9933 | 26 | #ifndef CPU_MIPS_VM_VM_VERSION_EXT_MIPS_HPP |
aoqi@9933 | 27 | #define CPU_MIPS_VM_VM_VERSION_EXT_MIPS_HPP |
aoqi@9933 | 28 | |
aoqi@9933 | 29 | #include "runtime/vm_version.hpp" |
aoqi@9933 | 30 | #include "utilities/macros.hpp" |
aoqi@9933 | 31 | |
aoqi@9933 | 32 | class VM_Version_Ext : public VM_Version { |
aoqi@9933 | 33 | private: |
aoqi@9933 | 34 | static const size_t CPU_TYPE_DESC_BUF_SIZE = 256; |
aoqi@9933 | 35 | static const size_t CPU_DETAILED_DESC_BUF_SIZE = 4096; |
aoqi@9933 | 36 | |
aoqi@9933 | 37 | static int _no_of_threads; |
aoqi@9933 | 38 | static int _no_of_cores; |
aoqi@9933 | 39 | static int _no_of_sockets; |
aoqi@9933 | 40 | static bool _initialized; |
aoqi@9933 | 41 | static char _cpu_name[CPU_TYPE_DESC_BUF_SIZE]; |
aoqi@9933 | 42 | static char _cpu_desc[CPU_DETAILED_DESC_BUF_SIZE]; |
aoqi@9933 | 43 | |
aoqi@9933 | 44 | public: |
aoqi@9933 | 45 | static int number_of_threads(void); |
aoqi@9933 | 46 | static int number_of_cores(void); |
aoqi@9933 | 47 | static int number_of_sockets(void); |
aoqi@9933 | 48 | |
aoqi@9933 | 49 | static const char* cpu_name(void); |
aoqi@9933 | 50 | static const char* cpu_description(void); |
aoqi@9933 | 51 | static void initialize_cpu_information(void); |
aoqi@9933 | 52 | }; |
aoqi@9933 | 53 | |
aoqi@9933 | 54 | #endif // CPU_MIPS_VM_VM_VERSION_EXT_MIPS_HPP |