diff options
author | Matthias Klose <doko@gcc.gnu.org> | 2007-06-03 23:18:43 +0000 |
---|---|---|
committer | Matthias Klose <doko@gcc.gnu.org> | 2007-06-03 23:18:43 +0000 |
commit | e1bea0c0687c5f4551b3a6058ec37ce3705fa6cc (patch) | |
tree | a9c9e7d91c484d53fe154f9285fc57325572ce50 /libjava/gnu/java/lang | |
parent | af333b9a7f9e1cc1029bec56d48f2de63acdf686 (diff) | |
download | gcc-e1bea0c0687c5f4551b3a6058ec37ce3705fa6cc.zip gcc-e1bea0c0687c5f4551b3a6058ec37ce3705fa6cc.tar.gz gcc-e1bea0c0687c5f4551b3a6058ec37ce3705fa6cc.tar.bz2 |
libjava/classpath/ChangeLog.gcj:
2007-05-31 Matthias Klose <doko@ubuntu.com>
* javax/management/NotificationBroadcasterSupport.java
(getNotificationInfo): Add cast.
* native/jni/qt-peer/Makefile.am (AM_CXXFLAGS): Add libstdc++ include
directories.
* native/jni/qt-peer/Makefile.in: Regenerate.
libjava/ChangeLog:
2007-06-03 Matthias Klose <doko@ubuntu.com>
* java/io/natFileWin32.cc (setFilePermissions): New (stub only).
_access: Handle EXEC query, stub only.
2007-06-03 Matthias Klose <doko@ubuntu.com>
Merged from classpath:
* gnu/java/nio/SelectorProviderImpl.java: Whitespace merge.
* java/lang/System.java(inheritedChannel): New.
* java/lang/Character.java: Remove stray`;'.
* java/net/MulticastSocket.java: Merged.
* java/text/DateFormatSymbols.java(getInstance): New, comment updates.
* java/text/Collator.java(getInstance): Merged.
* java/util/Calendar.java: New attributes ALL_STYLES, SHORT, LONG.
getDisplayName, getDisplayNames: New.
* java/util/logging/Logger.java: Merged.
* Regenerate .class and .h files.
2007-06-03 Matthias Klose <doko@ubuntu.com>
* java/io/File.java: Merge with classpath-0.95, new method
setFilePermissions, new attribute EXEC.
* java/io/natFilePosix.cc (setFilePermissions): New.
_access: Handle EXEC query.
* classpath/lib/java/io/File.class, java/io/File.h: Regenerate.
2007-06-03 Matthias Klose <doko@ubuntu.com>
Imported GNU Classpath 0.95.
* classpath/Makefile.in,
classpath/native/jni/midi-dssi/Makefile.in,
classpath/native/jni/classpath/Makefile.in,
classpath/native/jni/Makefile.in,
classpath/native/jni/gconf-peer/Makefile.in,
classpath/native/jni/java-io/Makefile.in,
classpath/native/jni/native-lib/Makefile.in,
classpath/native/jni/java-util/Makefile.in,
classpath/native/jni/midi-alsa/Makefile.in,
classpath/native/jni/java-lang/Makefile.in,
classpath/native/jni/java-nio/Makefile.in,
classpath/native/jni/java-net/Makefile.in,
classpath/native/jni/xmlj/Makefile.in,
classpath/native/jni/qt-peer/Makefile.in,
classpath/native/jni/gtk-peer/Makefile.in,
classpath/native/Makefile.in, classpath/native/jawt/Makefile.in,
classpath/native/fdlibm/Makefile.in,
classpath/native/plugin/Makefile.in,
classpath/resource/Makefile.in, classpath/scripts/Makefile.in,
classpath/tools/Makefile.in, classpath/doc/Makefile.in,
classpath/doc/api/Makefile.in, classpath/lib/Makefile.in,
classpath/external/Makefile.in, classpath/external/jsr166/Makefile.in,
classpath/external/sax/Makefile.in,
classpath/external/w3c_dom/Makefile.in,
classpath/external/relaxngDatatype/Makefile.in,
classpath/include/Makefile.in,
classpath/examples/Makefile.in: Regenerate.
* classpath/config.guess, classpath/config.sub,
classpath/ltmain.sh : Update.
* classpath/configure, classpath/depcomp, classpath/missing,
classpath/aclocal.m4, classpath/install-sh: Regenerate.
* gnu/classpath/Configuration.java (CLASSPATH_VERSION): Now 0.95.
* sources.am: Regenerate.
* Makefile.in: Regenerate.
* Update the .class files and generated CNI header files, add new
.class and generated CNI header files.
* Remove generated files for removed java source files:
classpath/gnu/java/net/BASE64.java,
classpath/gnu/java/security/util/Base64.java,
classpath/gnu/java/awt/peer/gtk/GThreadMutex.java,
classpath/gnu/java/awt/peer/gtk/GThreadNativeMethodRunner.java,
classpath/gnu/java/awt/font/autofit/Scaler.java,
classpath/gnu/classpath/jdwp/util/Value.java,
classpath/gnu/javax/net/ssl/Base64.java.
* Remove empty directories.
* Makefile.am(nat_source_files): Add natVMOperatingSystemMXBeanImpl.cc.
* java/lang/Class.java(setAccessible): Merge from classpath.
* java/util/Locale.java: Remove.
* gnu/java/lang/management/VMOperatingSystemMXBeanImpl.java,
gnu/java/lang/management/natVMOperatingSystemMXBeanImpl.cc: New.
* gcj/javaprims.h: Update class declarations.
* scripts/classes.pl: Update usage.
* HACKING: Mention to build all peers.
From-SVN: r125302
Diffstat (limited to 'libjava/gnu/java/lang')
10 files changed, 180 insertions, 59 deletions
diff --git a/libjava/gnu/java/lang/management/BeanImpl.h b/libjava/gnu/java/lang/management/BeanImpl.h index 56b8a05..be48395 100644 --- a/libjava/gnu/java/lang/management/BeanImpl.h +++ b/libjava/gnu/java/lang/management/BeanImpl.h @@ -34,7 +34,6 @@ extern "Java" { class OpenMBeanInfo; class OpenMBeanParameterInfo; - class OpenType; } } } @@ -55,9 +54,7 @@ public: // actually protected public: virtual ::javax::management::MBeanInfo * getMBeanInfo(); private: - ::javax::management::openmbean::OpenType * getTypeFromClass(::java::lang::Class *); JArray< ::javax::management::openmbean::OpenMBeanParameterInfo * > * translateSignature(JArray< ::javax::management::MBeanParameterInfo * > *); - ::javax::management::openmbean::OpenMBeanParameterInfo * translate(::java::lang::String *); ::javax::management::openmbean::OpenMBeanInfo * __attribute__((aligned(__alignof__( ::javax::management::StandardMBean)))) openInfo; public: static ::java::lang::Class class$; diff --git a/libjava/gnu/java/lang/management/MemoryMXBeanImpl$ListenerData.h b/libjava/gnu/java/lang/management/MemoryMXBeanImpl$ListenerData.h deleted file mode 100644 index 0be0fe8..0000000 --- a/libjava/gnu/java/lang/management/MemoryMXBeanImpl$ListenerData.h +++ /dev/null @@ -1,55 +0,0 @@ - -// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- - -#ifndef __gnu_java_lang_management_MemoryMXBeanImpl$ListenerData__ -#define __gnu_java_lang_management_MemoryMXBeanImpl$ListenerData__ - -#pragma interface - -#include <java/lang/Object.h> -extern "Java" -{ - namespace gnu - { - namespace java - { - namespace lang - { - namespace management - { - class MemoryMXBeanImpl; - class MemoryMXBeanImpl$ListenerData; - } - } - } - } - namespace javax - { - namespace management - { - class NotificationFilter; - class NotificationListener; - } - } -} - -class gnu::java::lang::management::MemoryMXBeanImpl$ListenerData : public ::java::lang::Object -{ - -public: - MemoryMXBeanImpl$ListenerData(::gnu::java::lang::management::MemoryMXBeanImpl *, ::javax::management::NotificationListener *, ::javax::management::NotificationFilter *, ::java::lang::Object *); - virtual ::javax::management::NotificationListener * getListener(); - virtual ::javax::management::NotificationFilter * getFilter(); - virtual ::java::lang::Object * getPassback(); - virtual jboolean equals(::java::lang::Object *); -private: - ::javax::management::NotificationListener * __attribute__((aligned(__alignof__( ::java::lang::Object)))) listener; - ::javax::management::NotificationFilter * filter; - ::java::lang::Object * passback; -public: // actually package-private - ::gnu::java::lang::management::MemoryMXBeanImpl * this$0; -public: - static ::java::lang::Class class$; -}; - -#endif // __gnu_java_lang_management_MemoryMXBeanImpl$ListenerData__ diff --git a/libjava/gnu/java/lang/management/OperatingSystemMXBeanImpl.h b/libjava/gnu/java/lang/management/OperatingSystemMXBeanImpl.h index 41385fe..af79980 100644 --- a/libjava/gnu/java/lang/management/OperatingSystemMXBeanImpl.h +++ b/libjava/gnu/java/lang/management/OperatingSystemMXBeanImpl.h @@ -32,6 +32,7 @@ public: ::java::lang::String * getArch(); jint getAvailableProcessors(); ::java::lang::String * getName(); + jdouble getSystemLoadAverage(); ::java::lang::String * getVersion(); static ::java::lang::Class class$; }; diff --git a/libjava/gnu/java/lang/management/ThreadMXBeanImpl.h b/libjava/gnu/java/lang/management/ThreadMXBeanImpl.h index 3a8fd5f..6127548 100644 --- a/libjava/gnu/java/lang/management/ThreadMXBeanImpl.h +++ b/libjava/gnu/java/lang/management/ThreadMXBeanImpl.h @@ -31,6 +31,8 @@ class gnu::java::lang::management::ThreadMXBeanImpl : public ::gnu::java::lang:: public: ThreadMXBeanImpl(); + JArray< ::java::lang::management::ThreadInfo * > * dumpAllThreads(jboolean, jboolean); + JArray< jlong > * findDeadlockedThreads(); JArray< jlong > * findMonitorDeadlockedThreads(); JArray< jlong > * getAllThreadIds(); jlong getCurrentThreadCpuTime(); @@ -43,9 +45,12 @@ public: JArray< ::java::lang::management::ThreadInfo * > * getThreadInfo(JArray< jlong > *); ::java::lang::management::ThreadInfo * getThreadInfo(jlong, jint); JArray< ::java::lang::management::ThreadInfo * > * getThreadInfo(JArray< jlong > *, jint); + JArray< ::java::lang::management::ThreadInfo * > * getThreadInfo(JArray< jlong > *, jboolean, jboolean); jlong getThreadUserTime(jlong); jlong getTotalStartedThreadCount(); jboolean isCurrentThreadCpuTimeSupported(); + jboolean isObjectMonitorUsageSupported(); + jboolean isSynchronizerUsageSupported(); jboolean isThreadContentionMonitoringEnabled(); jboolean isThreadContentionMonitoringSupported(); jboolean isThreadCpuTimeEnabled(); @@ -58,6 +63,8 @@ private: static ::java::lang::String * THREAD_TIME_SUPPORT; static ::java::lang::String * CONTENTION_SUPPORT; static ::java::lang::String * TIME_ENABLED; + static ::java::lang::String * MONITOR_SUPPORT; + static ::java::lang::String * SYNCHRONIZER_SUPPORT; jboolean __attribute__((aligned(__alignof__( ::gnu::java::lang::management::BeanImpl)))) timeEnabled; jboolean contentionEnabled; public: diff --git a/libjava/gnu/java/lang/management/VMOperatingSystemMXBeanImpl.h b/libjava/gnu/java/lang/management/VMOperatingSystemMXBeanImpl.h new file mode 100644 index 0000000..183f4ba --- /dev/null +++ b/libjava/gnu/java/lang/management/VMOperatingSystemMXBeanImpl.h @@ -0,0 +1,37 @@ + +// DO NOT EDIT THIS FILE - it is machine generated -*- c++ -*- + +#ifndef __gnu_java_lang_management_VMOperatingSystemMXBeanImpl__ +#define __gnu_java_lang_management_VMOperatingSystemMXBeanImpl__ + +#pragma interface + +#include <java/lang/Object.h> +extern "Java" +{ + namespace gnu + { + namespace java + { + namespace lang + { + namespace management + { + class VMOperatingSystemMXBeanImpl; + } + } + } + } +} + +class gnu::java::lang::management::VMOperatingSystemMXBeanImpl : public ::java::lang::Object +{ + +public: // actually package-private + VMOperatingSystemMXBeanImpl(); + static jdouble getSystemLoadAverage(); +public: + static ::java::lang::Class class$; +}; + +#endif // __gnu_java_lang_management_VMOperatingSystemMXBeanImpl__ diff --git a/libjava/gnu/java/lang/management/VMOperatingSystemMXBeanImpl.java b/libjava/gnu/java/lang/management/VMOperatingSystemMXBeanImpl.java new file mode 100644 index 0000000..20b3f9e --- /dev/null +++ b/libjava/gnu/java/lang/management/VMOperatingSystemMXBeanImpl.java @@ -0,0 +1,68 @@ +/* VMOperatingSystemMXBeanImpl.java - VM implementation of an OS bean + Copyright (C) 2006 Free Software Foundation + +This file is part of GNU Classpath. + +GNU Classpath is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU Classpath is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Classpath; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package gnu.java.lang.management; + +import gnu.classpath.Configuration; + +/** + * Provides access to information about the operating system. + * + * @author Andrew John Hughes (gnu_andrew@member.fsf.org) + * @since 1.6 + */ +final class VMOperatingSystemMXBeanImpl +{ + + static + { + if (Configuration.INIT_LOAD_LIBRARY) + { + System.loadLibrary("javalangmanagement"); + } + } + + /** + * Returns the system load average from the last + * minute. + * + * @return the system load average from the last + * minute. + */ + static native double getSystemLoadAverage(); + +} diff --git a/libjava/gnu/java/lang/management/VMThreadMXBeanImpl.h b/libjava/gnu/java/lang/management/VMThreadMXBeanImpl.h index 77577f76..4c8ab8c 100644 --- a/libjava/gnu/java/lang/management/VMThreadMXBeanImpl.h +++ b/libjava/gnu/java/lang/management/VMThreadMXBeanImpl.h @@ -31,12 +31,15 @@ class gnu::java::lang::management::VMThreadMXBeanImpl : public ::java::lang::Obj public: // actually package-private VMThreadMXBeanImpl(); + static JArray< jlong > * findDeadlockedThreads(); static JArray< jlong > * findMonitorDeadlockedThreads(); static JArray< ::java::lang::Thread * > * getAllThreads(); static JArray< jlong > * getAllThreadIds(); static jlong getCurrentThreadCpuTime(); static jlong getCurrentThreadUserTime(); static jint getDaemonThreadCount(); + static void getLockInfo(::java::lang::management::ThreadInfo *); + static void getMonitorInfo(::java::lang::management::ThreadInfo *); static jint getPeakThreadCount(); static jint getThreadCount(); static jlong getThreadCpuTime(jlong); diff --git a/libjava/gnu/java/lang/management/VMThreadMXBeanImpl.java b/libjava/gnu/java/lang/management/VMThreadMXBeanImpl.java index c5bcb63..1c061aa 100644 --- a/libjava/gnu/java/lang/management/VMThreadMXBeanImpl.java +++ b/libjava/gnu/java/lang/management/VMThreadMXBeanImpl.java @@ -60,6 +60,16 @@ final class VMThreadMXBeanImpl /** * Returns the ids of cycles of deadlocked threads, occurring + * due to monitor ownership or ownable synchronizer ownership. + * This will only be called if ownable synchronizer monitoring + * is supported. + * + * @return the ids of the deadlocked threads. + */ + static native long[] findDeadlockedThreads(); + + /** + * Returns the ids of cycles of deadlocked threads, occurring * due to monitor ownership. * * @return the ids of the deadlocked threads. @@ -138,6 +148,25 @@ final class VMThreadMXBeanImpl } /** + * Fill out the given {@link ThreadInfo} object + * with ownable synchronizer usage information. + * This is only called if ownable synchronizer + * usage monitoring is supported. + * + * @param info the {@link ThreadInfo} object to modify. + */ + static native void getLockInfo(ThreadInfo info); + + /** + * Fill out the given {@link ThreadInfo} object + * with monitor usage information. This is only + * called if monitor usage monitoring is supported. + * + * @param info the {@link ThreadInfo} object to modify. + */ + static native void getMonitorInfo(ThreadInfo info); + + /** * Returns the current peak number of live threads. * * @return the peak number of live threads. diff --git a/libjava/gnu/java/lang/management/natVMOperatingSystemMXBeanImpl.cc b/libjava/gnu/java/lang/management/natVMOperatingSystemMXBeanImpl.cc new file mode 100644 index 0000000..daea76b --- /dev/null +++ b/libjava/gnu/java/lang/management/natVMOperatingSystemMXBeanImpl.cc @@ -0,0 +1,18 @@ +#include <config.h> + +#include <gnu/java/lang/management/VMOperatingSystemMXBeanImpl.h> +#include <gcj/cni.h> +#include <java/lang/UnsupportedOperationException.h> + +jdouble +gnu::java::lang::management::VMOperatingSystemMXBeanImpl::getSystemLoadAverage () +{ +#ifdef HAVE_GETLOADAVG + double avg[1]; + int nos = getloadavg(avg, 1); + if (nos == 1) + return avg[0]; + else +#endif + return -1; +} diff --git a/libjava/gnu/java/lang/management/natVMThreadMXBeanImpl.cc b/libjava/gnu/java/lang/management/natVMThreadMXBeanImpl.cc index df05300..5d48957 100644 --- a/libjava/gnu/java/lang/management/natVMThreadMXBeanImpl.cc +++ b/libjava/gnu/java/lang/management/natVMThreadMXBeanImpl.cc @@ -5,12 +5,17 @@ #include <java/lang/UnsupportedOperationException.h> jlongArray +gnu::java::lang::management::VMThreadMXBeanImpl::findDeadlockedThreads () +{ + throw new ::java::lang::UnsupportedOperationException (JvNewStringLatin1 ("gnu::java::lang::management::VMThreadMXBeanImpl::findDeadlockedThreads () not implemented")); +} + +jlongArray gnu::java::lang::management::VMThreadMXBeanImpl::findMonitorDeadlockedThreads () { throw new ::java::lang::UnsupportedOperationException (JvNewStringLatin1 ("gnu::java::lang::management::VMThreadMXBeanImpl::findMonitorDeadlockedThreads () not implemented")); } - jlong gnu::java::lang::management::VMThreadMXBeanImpl::getCurrentThreadCpuTime () { @@ -24,6 +29,17 @@ gnu::java::lang::management::VMThreadMXBeanImpl::getCurrentThreadUserTime () throw new ::java::lang::UnsupportedOperationException (JvNewStringLatin1 ("gnu::java::lang::management::VMThreadMXBeanImpl::getCurrentThreadUserTime () not implemented")); } +void +gnu::java::lang::management::VMThreadMXBeanImpl::getLockInfo (::java::lang::management::ThreadInfo *) +{ + throw new ::java::lang::UnsupportedOperationException (JvNewStringLatin1 ("gnu::java::lang::management::VMThreadMXBeanImpl::getLockInfo () not implemented")); +} + +void +gnu::java::lang::management::VMThreadMXBeanImpl::getMonitorInfo (::java::lang::management::ThreadInfo *) +{ + throw new ::java::lang::UnsupportedOperationException (JvNewStringLatin1 ("gnu::java::lang::management::VMThreadMXBeanImpl::getMonitorInfo () not implemented")); +} jint gnu::java::lang::management::VMThreadMXBeanImpl::getPeakThreadCount () |