incubator-kato-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From monte...@apache.org
Subject svn commit: r885844 - in /incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti: javaruntime/model/JThread.java reader/CJVMTIBinReader.java
Date Tue, 01 Dec 2009 17:41:50 GMT
Author: monteith
Date: Tue Dec  1 17:41:50 2009
New Revision: 885844

URL: http://svn.apache.org/viewvc?rev=885844&view=rev
Log:
Implement JavaThread.getObject() in CJVMTI.

Modified:
    incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JThread.java
    incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/reader/CJVMTIBinReader.java

Modified: incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JThread.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JThread.java?rev=885844&r1=885843&r2=885844&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JThread.java
(original)
+++ incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/javaruntime/model/JThread.java
Tue Dec  1 17:41:50 2009
@@ -40,7 +40,7 @@
 	public  short daemon=0;
 	public int   groupID=0;
 	public String threadName=null;
-	
+	private JObject object = null;
 
 	private List<JavaStackFrame> frames=new LinkedList<JavaStackFrame>();
 	
@@ -72,80 +72,11 @@
 	}
 	@Override
 	public JavaObject getObject() throws CorruptDataException {
-		
-		return new JavaObject(){
-
-			@Override
-			public void arraycopy(int srcStart, Object dst, int dstStart,
-					int length) throws CorruptDataException,
-					MemoryAccessException {
-				// TODO Auto-generated method stub
-				
-			}
-
-			@Override
-			public int getArraySize() throws CorruptDataException {
-				// TODO Auto-generated method stub
-				return 0;
-			}
-
-			@Override
-			public long getHashcode() throws DataUnavailable,
-					CorruptDataException {
-				// TODO Auto-generated method stub
-				return 0;
-			}
-
-			@Override
-			public JavaHeap getHeap() throws CorruptDataException,
-					DataUnavailable {
-				// TODO Auto-generated method stub
-				return null;
-			}
-
-			@Override
-			public ImagePointer getID() {
-				return new SimpleImagePointer(id);
-			}
-
-			@Override
-			public JavaClass getJavaClass() throws CorruptDataException {
-				// TODO Auto-generated method stub
-				return null;
-			}
-
-			@Override
-			public long getPersistentHashcode() throws DataUnavailable,
-					CorruptDataException {
-				// TODO Auto-generated method stub
-				return 0;
-			}
-
-			@Override
-			public List getReferences() {
-				// TODO Auto-generated method stub
-				return null;
-			}
-
-			@Override
-			public List getSections() {
-				// TODO Auto-generated method stub
-				return null;
-			}
-
-			@Override
-			public long getSize() throws CorruptDataException {
-				// TODO Auto-generated method stub
-				return 0;
-			}
-
-			@Override
-			public boolean isArray() throws CorruptDataException {
-				// TODO Auto-generated method stub
-				return false;
-			}};
-		
-		
+		return object;
+	}
+	
+	public void setObject(JObject object) {
+		this.object = object;
 	}
 	
 	@Override

Modified: incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/reader/CJVMTIBinReader.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/reader/CJVMTIBinReader.java?rev=885844&r1=885843&r2=885844&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/reader/CJVMTIBinReader.java
(original)
+++ incubator/kato/trunk/org.apache.kato/kato.cjvmti/src/main/java/org/apache/kato/jvmti/reader/CJVMTIBinReader.java
Tue Dec  1 17:41:50 2009
@@ -1156,6 +1156,7 @@
 		t.groupID = 0;
 		t.priority = (short) variablesIn.readInt();
 		t.daemon = (short) variablesIn.readByte();
+		t.setObject((JObject) model.getObjectAtAddress(objectRef));
 		readMonitor(t);
 		readContendedMonitor(t);
 



Mime
View raw message