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 "jvm.h"
27 #include "memory/allocation.inline.hpp"
28 #include "os_aix.inline.hpp"
29 #include "runtime/os.hpp"
30 #include "runtime/os_perf.hpp"
31
32 #include CPU_HEADER(vm_version_ext)
33
34 #include <stdio.h>
35 #include <stdarg.h>
36 #include <unistd.h>
37 #include <errno.h>
38 #include <string.h>
39 #include <sys/resource.h>
40 #include <sys/types.h>
41 #include <sys/stat.h>
42 #include <dirent.h>
43 #include <stdlib.h>
44 #include <dlfcn.h>
45 #include <pthread.h>
46 #include <limits.h>
47
48 /**
49 /proc/[number]/stat
50 Status information about the process. This is used by ps(1). It is defined in /usr/src/linux/fs/proc/array.c.
867 FREE_C_HEAP_ARRAY(char, cpu_desc);
868 _cpu_info->set_cpu_description(NULL);
869 }
870 delete _cpu_info;
871 }
872 }
873
874 int CPUInformationInterface::cpu_information(CPUInformation& cpu_info) {
875 if (_cpu_info == NULL) {
876 return OS_ERR;
877 }
878
879 cpu_info = *_cpu_info; // shallow copy assignment
880 return OS_OK;
881 }
882
883 class NetworkPerformanceInterface::NetworkPerformance : public CHeapObj<mtInternal> {
884 friend class NetworkPerformanceInterface;
885 private:
886 NetworkPerformance();
887 NetworkPerformance(const NetworkPerformance& rhs); // no impl
888 NetworkPerformance& operator=(const NetworkPerformance& rhs); // no impl
889 bool initialize();
890 ~NetworkPerformance();
891 int network_utilization(NetworkInterface** network_interfaces) const;
892 };
893
894 NetworkPerformanceInterface::NetworkPerformance::NetworkPerformance() {
895
896 }
897
898 bool NetworkPerformanceInterface::NetworkPerformance::initialize() {
899 return true;
900 }
901
902 NetworkPerformanceInterface::NetworkPerformance::~NetworkPerformance() {
903 }
904
905 int NetworkPerformanceInterface::NetworkPerformance::network_utilization(NetworkInterface** network_interfaces) const
906 {
907 return FUNCTIONALITY_NOT_IMPLEMENTED;
908 }
|
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 "jvm.h"
27 #include "memory/allocation.inline.hpp"
28 #include "os_aix.inline.hpp"
29 #include "runtime/os.hpp"
30 #include "runtime/os_perf.hpp"
31 #include "utilities/macros.hpp"
32
33 #include CPU_HEADER(vm_version_ext)
34
35 #include <stdio.h>
36 #include <stdarg.h>
37 #include <unistd.h>
38 #include <errno.h>
39 #include <string.h>
40 #include <sys/resource.h>
41 #include <sys/types.h>
42 #include <sys/stat.h>
43 #include <dirent.h>
44 #include <stdlib.h>
45 #include <dlfcn.h>
46 #include <pthread.h>
47 #include <limits.h>
48
49 /**
50 /proc/[number]/stat
51 Status information about the process. This is used by ps(1). It is defined in /usr/src/linux/fs/proc/array.c.
868 FREE_C_HEAP_ARRAY(char, cpu_desc);
869 _cpu_info->set_cpu_description(NULL);
870 }
871 delete _cpu_info;
872 }
873 }
874
875 int CPUInformationInterface::cpu_information(CPUInformation& cpu_info) {
876 if (_cpu_info == NULL) {
877 return OS_ERR;
878 }
879
880 cpu_info = *_cpu_info; // shallow copy assignment
881 return OS_OK;
882 }
883
884 class NetworkPerformanceInterface::NetworkPerformance : public CHeapObj<mtInternal> {
885 friend class NetworkPerformanceInterface;
886 private:
887 NetworkPerformance();
888 NONCOPYABLE(NetworkPerformance);
889 bool initialize();
890 ~NetworkPerformance();
891 int network_utilization(NetworkInterface** network_interfaces) const;
892 };
893
894 NetworkPerformanceInterface::NetworkPerformance::NetworkPerformance() {
895
896 }
897
898 bool NetworkPerformanceInterface::NetworkPerformance::initialize() {
899 return true;
900 }
901
902 NetworkPerformanceInterface::NetworkPerformance::~NetworkPerformance() {
903 }
904
905 int NetworkPerformanceInterface::NetworkPerformance::network_utilization(NetworkInterface** network_interfaces) const
906 {
907 return FUNCTIONALITY_NOT_IMPLEMENTED;
908 }
|