incubator-kato-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spo...@apache.org
Subject svn commit: r896770 - in /incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics: image/NativeMemoryAccess.java runtime/java/JavaThread.java runtime/java/NativeJavaThread.java
Date Thu, 07 Jan 2010 07:37:20 GMT
Author: spoole
Date: Thu Jan  7 07:37:20 2010
New Revision: 896770

URL: http://svn.apache.org/viewvc?rev=896770&view=rev
Log:
introduced new NativeJavaThread interface on API and updated JavaThread to return it

Added:
    incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/image/NativeMemoryAccess.java
    incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/NativeJavaThread.java
Modified:
    incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaThread.java

Added: incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/image/NativeMemoryAccess.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/image/NativeMemoryAccess.java?rev=896770&view=auto
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/image/NativeMemoryAccess.java
(added)
+++ incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/image/NativeMemoryAccess.java
Thu Jan  7 07:37:20 2010
@@ -0,0 +1,32 @@
+package javax.tools.diagnostics.image;
+
+import java.util.List;
+
+public interface NativeMemoryAccess {
+
+	
+	 /**
+     * <p>Get the List of {@link ImageSection ImageSections} which make up the Java
Virtual Machine stack.
+     * </p>
+     * <p> 
+     * Some Java Virtual Machine implementations may use parts of the ImageThread's stack
+     * for JavaStackFrames.
+     * </p>
+     * 
+     * @return a collection of <code>ImageSections</code> which make up the Java
stack.
+     * 
+     * @see javax.tools.diagnostics.image.ImageSection
+     * @see javax.tools.diagnostics.image.ImageThread#getStackSections()
+     * @see javax.tools.diagnostics.image.CorruptData
+     */
+    List<ImageSection> getSections();
+    
+    /**
+     * <p>Get the address of the JNIEnv structure which represents this thread instance
in JNI.</p>
+     * 
+     * @return the address of the JNIEnv structure which represents this thread instance
in JNI.
+     * @throws CorruptDataException 
+     */
+    ImagePointer getJNIEnv() throws CorruptDataException;
+    
+}

Modified: incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaThread.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaThread.java?rev=896770&r1=896769&r2=896770&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaThread.java
(original)
+++ incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/JavaThread.java
Thu Jan  7 07:37:20 2010
@@ -69,13 +69,7 @@
 	/** The thread is in a vendor specific state */
 	int STATE_VENDOR_3					= 0x40000000;
 	
-    /**
-     * <p>Get the address of the JNIEnv structure which represents this thread instance
in JNI.</p>
-     * 
-     * @return the address of the JNIEnv structure which represents this thread instance
in JNI.
-     * @throws CorruptDataException 
-     */
-    ImagePointer getJNIEnv() throws CorruptDataException;
+    
     
     /**
      * <p>Get the Java priority of the thread.</p>
@@ -127,38 +121,7 @@
      */
     int getState() throws CorruptDataException;
     
-    /**
-     * <p>Returns the operating system level thread that executes the Java thread.</p>
-     * <p>This will return an {@link ImageThread} if an operating system level thread
can be
-     * returned, otherwise the <code>DataUnavailable</code> exception is thrown.
-     * There is no guarantee that there is a 1:1 relationship between <code>JavaThreads</code>
-     * and {@link ImageThread ImageThreads}.
-     * </p>
-     * 
-     * @return the ImageThread which this thread is currently bound to.
-     * @throws CorruptDataException If the underlying resource describing the native representation
of the thread
-     * is damaged.
-     * @throws DataUnavailable If no mapping is provided due to missing or limited underlying
resources.
-     * 
-     * @see ImageThread
-     */
-    ImageThread getImageThread() throws CorruptDataException, DataUnavailable;
-
-    /**
-     * <p>Get the List of {@link ImageSection ImageSections} which make up the Java
Virtual Machine stack.
-     * </p>
-     * <p> 
-     * Some Java Virtual Machine implementations may use parts of the ImageThread's stack
-     * for JavaStackFrames.
-     * </p>
-     * 
-     * @return a collection of <code>ImageSections</code> which make up the Java
stack.
-     * 
-     * @see javax.tools.diagnostics.image.ImageSection
-     * @see javax.tools.diagnostics.image.ImageThread#getStackSections()
-     * @see javax.tools.diagnostics.image.CorruptData
-     */
-    List<ImageSection> getStackSections();
+   
     
     /**
      * <p>Get the set of stack frames.</p>
@@ -191,6 +154,15 @@
      */
     String getName() throws CorruptDataException;
     
+    
+    /** 
+     * Returns a Native Java Thread object which can be used to inspect
+     * platform specific thread information.  
+     * 
+     * @throws DataUnavailable
+     */
+    public NativeJavaThread getNativeThread() throws DataUnavailable;
+    
 	/**
 	 * @param obj
 	 * @return true if the given object refers to the same Java Thread in the image

Added: incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/NativeJavaThread.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/NativeJavaThread.java?rev=896770&view=auto
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/NativeJavaThread.java
(added)
+++ incubator/kato/trunk/org.apache.kato/kato.api/src/main/java/javax/tools/diagnostics/runtime/java/NativeJavaThread.java
Thu Jan  7 07:37:20 2010
@@ -0,0 +1,49 @@
+/*******************************************************************************
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * 
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ ******************************************************************************/
+
+package javax.tools.diagnostics.runtime.java;
+
+import javax.tools.diagnostics.image.CorruptDataException;
+import javax.tools.diagnostics.image.DataUnavailable;
+import javax.tools.diagnostics.image.ImagePointer;
+import javax.tools.diagnostics.image.ImageThread;
+
+public interface NativeJavaThread {
+
+	 /**
+     * <p>Returns the operating system level thread that executes the Java thread.</p>
+     * <p>This will return an {@link ImageThread} if an operating system level thread
can be
+     * returned, otherwise the <code>DataUnavailable</code> exception is thrown.
+     * There is no guarantee that there is a 1:1 relationship between <code>JavaThreads</code>
+     * and {@link ImageThread ImageThreads}.
+     * </p>
+     * 
+     * @return the ImageThread which this thread is currently bound to.
+     * @throws CorruptDataException If the underlying resource describing the native representation
of the thread
+     * is damaged.
+     * @throws DataUnavailable If no mapping is provided due to missing or limited underlying
resources.
+     * 
+     * @see ImageThread
+     */
+    ImageThread getImageThread() throws CorruptDataException, DataUnavailable;
+
+    /**
+     * <p>Get the address of the JNIEnv structure which represents this thread instance
in JNI.</p>
+     * 
+     * @return the address of the JNIEnv structure which represents this thread instance
in JNI.
+     * @throws CorruptDataException 
+     */
+    ImagePointer getJNIEnv() throws CorruptDataException;
+    
+}



Mime
View raw message