|
From: <ls...@us...> - 2007-01-07 18:38:09
|
Revision: 3041
http://jnode.svn.sourceforge.net/jnode/?rev=3041&view=rev
Author: lsantha
Date: 2007-01-07 10:38:08 -0800 (Sun, 07 Jan 2007)
Log Message:
-----------
Classpath patches.
Modified Paths:
--------------
trunk/core/src/classpath/vm/gnu/java/lang/management/VMThreadMXBeanImpl.java
Added Paths:
-----------
trunk/core/src/classpath/vm/gnu/java/lang/management/VMOperatingSystemMXBeanImpl.java
Added: trunk/core/src/classpath/vm/gnu/java/lang/management/VMOperatingSystemMXBeanImpl.java
===================================================================
--- trunk/core/src/classpath/vm/gnu/java/lang/management/VMOperatingSystemMXBeanImpl.java (rev 0)
+++ trunk/core/src/classpath/vm/gnu/java/lang/management/VMOperatingSystemMXBeanImpl.java 2007-01-07 18:38:08 UTC (rev 3041)
@@ -0,0 +1,71 @@
+/* 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...@me...)
+ * @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 double getSystemLoadAverage(){
+ //todo implement it
+ throw new UnsupportedOperationException();
+ }
+
+}
Modified: trunk/core/src/classpath/vm/gnu/java/lang/management/VMThreadMXBeanImpl.java
===================================================================
--- trunk/core/src/classpath/vm/gnu/java/lang/management/VMThreadMXBeanImpl.java 2007-01-07 16:10:30 UTC (rev 3040)
+++ trunk/core/src/classpath/vm/gnu/java/lang/management/VMThreadMXBeanImpl.java 2007-01-07 18:38:08 UTC (rev 3041)
@@ -43,7 +43,7 @@
* Provides access to information about the threads
* of the virtual machine. An instance of this bean is
* obtained by calling
- * {@link ManagementFactory#getThreadMXBean()}.
+ * {@link java.lang.management.ManagementFactory#getThreadMXBean()}.
* See {@link java.lang.management.ThreadMXBean} for
* full documentation.
*
@@ -60,6 +60,19 @@
/**
* 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 long[] findDeadlockedThreads(){
+ //todo implement
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * Returns the ids of cycles of deadlocked threads, occurring
* due to monitor ownership.
*
* @return the ids of the deadlocked threads.
@@ -144,6 +157,31 @@
}
/**
+ * 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 void getLockInfo(ThreadInfo info){
+ //todo implement
+ throw new UnsupportedOperationException();
+ }
+
+ /**
+ * 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 void getMonitorInfo(ThreadInfo info){
+ //todo implement
+ throw new UnsupportedOperationException();
+ }
+
+ /**
* Returns the current peak number of live threads.
*
* @return the peak number of live threads.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|