incubator-kato-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spo...@apache.org
Subject svn commit: r777088 - in /incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview: ./ commands/ commands/helpers/ commands/infocommands/ commands/xcommands/
Date Thu, 21 May 2009 12:04:21 GMT
Author: spoole
Date: Thu May 21 12:04:20 2009
New Revision: 777088

URL: http://svn.apache.org/viewvc?rev=777088&view=rev
Log:
update katoview to support new API structure 

Modified:
    incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/Session.java
    incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/DeadlockCommand.java
    incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/HeapdumpCommand.java
    incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/WhatisCommand.java
    incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/helpers/ClassOutput.java
    incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/helpers/Utils.java
    incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/infocommands/InfoClassCommand.java
    incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/infocommands/InfoHeapCommand.java
    incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/infocommands/InfoJitmCommand.java
    incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/infocommands/InfoLockCommand.java
    incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/infocommands/InfoProcCommand.java
    incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/infocommands/InfoSymCommand.java
    incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/infocommands/InfoThreadCommand.java
    incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/xcommands/XDCommand.java
    incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/xcommands/XJCommand.java
    incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/xcommands/XKCommand.java
    incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/xcommands/XXCommand.java

Modified: incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/Session.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/Session.java?rev=777088&r1=777087&r2=777088&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/Session.java
(original)
+++ incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/Session.java
Thu May 21 12:04:20 2009
@@ -186,7 +186,7 @@
 		
 		variables.put(
 				"current_address_space",
-				(ImageAddressSpace)loadedImage.getAddressSpaces().next()
+				(ImageAddressSpace)loadedImage.getAddressSpaces().get(0)
 		);
 		
 		out.println("For a list of commands, type \"help\"; " +

Modified: incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/DeadlockCommand.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/DeadlockCommand.java?rev=777088&r1=777087&r2=777088&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/DeadlockCommand.java
(original)
+++ incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/DeadlockCommand.java
Thu May 21 12:04:20 2009
@@ -63,7 +63,7 @@
 		{
 			SortedMap monitorNodes = new TreeMap();
 			JavaRuntime jr = (JavaRuntime)itRuntime.next();
-			Iterator itMonitor = jr.getMonitors();
+			Iterator itMonitor = jr.getMonitors().iterator();
 			int nodeListNum = 0;
 			
 			out.print("\n  deadlocks for runtime #" + jrnum + "\n");
@@ -119,7 +119,7 @@
 				MonitorNode currNode = (MonitorNode)values.next();
 				JavaMonitor currMonitor = currNode.getMonitor();
 				
-				Iterator itWaiters = currMonitor.getEnterWaiters();
+				Iterator itWaiters = currMonitor.getEnterWaiters().iterator();
 				while (itWaiters.hasNext()) {
 					JavaThread waiter = (JavaThread)itWaiters.next();
 					JavaObject threadObject;

Modified: incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/HeapdumpCommand.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/HeapdumpCommand.java?rev=777088&r1=777087&r2=777088&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/HeapdumpCommand.java
(original)
+++ incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/HeapdumpCommand.java
Thu May 21 12:04:20 2009
@@ -167,7 +167,7 @@
 		Set workingSet = new HashSet();
 		workingSet.addAll(heapsToDump);
 		
-		Iterator heapIt = runtime.getHeaps();
+		Iterator heapIt = runtime.getHeaps().iterator();
 		
 		while(heapIt.hasNext()) {
 			Object potential = heapIt.next();
@@ -241,7 +241,7 @@
 			return null;
 		}
 		
-		Iterator runtimeIterator = process.getRuntimes();
+		Iterator runtimeIterator = process.getRuntimes().iterator();
 		
 		if(! runtimeIterator.hasNext()) {
 			out.error("Cannot find a runtime");
@@ -261,7 +261,7 @@
 	private void dumpMultipleHeapsInOneFile(JavaRuntime runtime,
 			String version, boolean is64Bit, boolean phdFormat, String filename, Set heapsToDump)
throws IOException
 	{
-		Iterator heapIterator = runtime.getHeaps();
+		Iterator heapIterator = runtime.getHeaps().iterator();
 		
 		HeapDumpFormatter formatter = getFormatter(filename, version, is64Bit, phdFormat);
 		
@@ -293,7 +293,7 @@
 
 	private void dumpMultipleHeapsInSeparateFiles(JavaRuntime runtime,String version, boolean
is64Bit, boolean phdFormat,String baseFileName, Set heapsToDump) throws IOException
 	{
-		Iterator heapIterator = runtime.getHeaps();
+		Iterator heapIterator = runtime.getHeaps().iterator();
 		
 		HeapDumpFormatter formatter = null;
 		
@@ -345,7 +345,7 @@
 	 */
 	private void dumpClasses(HeapDumpFormatter formatter, JavaRuntime runtime) throws IOException
 	{
-		Iterator classLoaderIt = runtime.getJavaClassLoaders();
+		Iterator classLoaderIt = runtime.getJavaClassLoaders().iterator();
 		
 		int numberOfClasses = 0;
 		
@@ -360,7 +360,7 @@
 			
 			JavaClassLoader thisClassLoader = (JavaClassLoader)potential;
 			
-			Iterator classesIt = thisClassLoader.getDefinedClasses();
+			Iterator classesIt = thisClassLoader.getDefinedClasses().iterator();
 			
 ITERATING_CLASSES:while(classesIt.hasNext()) {
 				potential = classesIt.next();
@@ -416,7 +416,7 @@
 	private void dumpHeap(HeapDumpFormatter formatter, JavaHeap thisHeap)
 			throws IOException
 	{
-		Iterator objectIterator = thisHeap.getObjects();
+		Iterator objectIterator = thisHeap.getObjects().iterator();
 
 		while (objectIterator.hasNext()) {
 			Object next = objectIterator.next();
@@ -550,7 +550,7 @@
 				reportError("Couldn't find java.lang.Class class",null);
 				return;
 			}
-			Iterator fieldsIt = javaLangClassObject.getDeclaredFields();
+			Iterator fieldsIt = javaLangClassObject.getDeclaredFields().iterator();
 			
 			while(fieldsIt.hasNext()) {
 				Object potential = fieldsIt.next();
@@ -615,7 +615,7 @@
 	private void addStaticReferences(JavaClass thisClass, List references)
 			throws CorruptDataException, MemoryAccessException
 	{
-		Iterator fieldsIt = thisClass.getDeclaredFields();
+		Iterator fieldsIt = thisClass.getDeclaredFields().iterator();
 			
 		while(fieldsIt.hasNext()) {
 			Object potential = fieldsIt.next();
@@ -726,7 +726,7 @@
 	{
 		while(thisClass != null) {
 			
-			Iterator fieldsIt = thisClass.getDeclaredFields();
+			Iterator fieldsIt = thisClass.getDeclaredFields().iterator();
 			
 WALKING_FIELDS: while(fieldsIt.hasNext()) {
 				Object potential = fieldsIt.next();

Modified: incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/WhatisCommand.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/WhatisCommand.java?rev=777088&r1=777087&r2=777088&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/WhatisCommand.java
(original)
+++ incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/WhatisCommand.java
Thu May 21 12:04:20 2009
@@ -82,7 +82,7 @@
 	private void findInRuntime(JavaRuntime jr, long address)
 	{
 		JavaHeap jh;
-		Iterator itHeap = jr.getHeaps();
+		Iterator itHeap = jr.getHeaps().iterator();
 		int count = 1;
 		
 		while (itHeap.hasNext()) {
@@ -100,10 +100,10 @@
 	{
 		//TODO: checkWithinValidMemRange(sb, ...);
 		
-		if (isWithinImageSections(jh.getSections(), null, false, address)){
+		if (isWithinImageSections(jh.getSections().iterator(), null, false, address)){
 			//if it's start or within the range of an object
-			if (!isStartOfObj(jh.getObjects(), address)){
-				if (!isWithinObjectRange(jh.getObjects(), address)){
+			if (!isStartOfObj(jh.getObjects().iterator(), address)){
+				if (!isWithinObjectRange(jh.getObjects().iterator(), address)){
 					out.print("\t\t0x" + Long.toHexString(address) + " is orphaned on the heap.\n");
 				}
 			}
@@ -112,10 +112,10 @@
 			out.print("\t\t0x" + Long.toHexString(address) + " is not within this heap.\n");
 			//TODO : function to indicate 16 or 32 bit 
 			long bound = 12; //bounds default to 16 for 32 bit system.
-			checkClassInRange(jh.getObjects(), bound, address);
+			checkClassInRange(jh.getObjects().iterator(), bound, address);
 		}
 		
-		checkMethodInRange(jh.getObjects(), address);
+		checkMethodInRange(jh.getObjects().iterator(), address);
 	}
 	
 	
@@ -130,11 +130,11 @@
 				//go to the next iteration
 				continue;
 			}
-			Iterator methods = jClass.getDeclaredMethods();
+			Iterator methods = jClass.getDeclaredMethods().iterator();
 			while(methods.hasNext()){
 				JavaMethod jMethod = (JavaMethod)methods.next();
-				Iterator bytecodeSections = jMethod.getBytecodeSections();
-				Iterator compiledSections = jMethod.getCompiledSections();
+				Iterator bytecodeSections = jMethod.getBytecodeSections().iterator();
+				Iterator compiledSections = jMethod.getCompiledSections().iterator();
 				isWithinImageSections(bytecodeSections, jMethod, false, address);
 				isWithinImageSections(compiledSections, jMethod, true, address);
 			}

Modified: incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/helpers/ClassOutput.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/helpers/ClassOutput.java?rev=777088&r1=777087&r2=777088&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/helpers/ClassOutput.java
(original)
+++ incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/helpers/ClassOutput.java
Thu May 21 12:04:20 2009
@@ -52,7 +52,7 @@
 		
 		// we've found a class, so we'll print out its static fields
 		boolean found = false;
-		Iterator itField = jc.getDeclaredFields();
+		Iterator itField = jc.getDeclaredFields().iterator();
 		while (itField.hasNext())
 		{
 			JavaField jf = (JavaField)itField.next();
@@ -107,7 +107,7 @@
 		
 		// we've found a class, so we'll print out its static fields
 		boolean found = false;
-		Iterator itField = jc.getDeclaredFields();
+		Iterator itField = jc.getDeclaredFields().iterator();
 		while (itField.hasNext())
 		{
 			JavaField jf = (JavaField)itField.next();
@@ -252,7 +252,7 @@
 			for (int i = (classList.size()-1); i >=0 ; i--){
 				
 				jc = (JavaClass)classList.get(i);
-				Iterator itField = jc.getDeclaredFields();
+				Iterator itField = jc.getDeclaredFields().iterator();
 				
 				if (itField.hasNext()){
 					if (jc.equals(initialJC)){
@@ -354,7 +354,7 @@
 			JavaMethod jMethod = (JavaMethod)methods.next();
 			try{
 				out.print("Bytecode range(s): ");
-				Iterator imageSections = jMethod.getBytecodeSections();
+				Iterator imageSections = jMethod.getBytecodeSections().iterator();
 				boolean firstSectionPassed = false;
 				while (imageSections.hasNext()){
 					ImageSection is = (ImageSection)imageSections.next();

Modified: incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/helpers/Utils.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/helpers/Utils.java?rev=777088&r1=777087&r2=777088&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/helpers/Utils.java
(original)
+++ incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/helpers/Utils.java
Thu May 21 12:04:20 2009
@@ -75,14 +75,14 @@
 		ImageAddressSpace ias;
 		ImageProcess ip;
 		
-		itAddressSpace = loadedImage.getAddressSpaces();
+		itAddressSpace = loadedImage.getAddressSpaces().iterator();
 		while (itAddressSpace.hasNext()) {
 			ias = (ImageAddressSpace)itAddressSpace.next();
-			itProcess = ias.getProcesses();
+			itProcess = ias.getProcesses().iterator();
 			while (itProcess.hasNext())
 			{
 				ip = (ImageProcess)itProcess.next();
-				itRuntime = ip.getRuntimes();
+				itRuntime = ip.getRuntimes().iterator();
 				while (itRuntime.hasNext()) {
 					// this iterator can contain ManagedRuntime or CorruptData objects
 					Object next = itRuntime.next();
@@ -180,7 +180,7 @@
 	public static ImageAddressSpace _extractAddressSpace(Image loadedImage)
 	{
 		ImageAddressSpace space = null;
-		Iterator spaces = loadedImage.getAddressSpaces();
+		Iterator spaces = loadedImage.getAddressSpaces().iterator();
 		
 		while ((null == space) && (spaces.hasNext())) {
 			space = (ImageAddressSpace) spaces.next();
@@ -595,7 +595,7 @@
 				Exceptions.getCorruptDataExceptionString() + ")>";
 		}
 		
-		Iterator itJavaField = jc.getDeclaredFields();
+		Iterator itJavaField = jc.getDeclaredFields().iterator();
 		JavaField jf = null;
 		while (itJavaField.hasNext())
 		{
@@ -723,11 +723,11 @@
 	}
 
 	public static Iterator getAddressSapceSectionInfo(Image loadedImage){
-		Iterator itAddressSpace = loadedImage.getAddressSpaces();
+		Iterator itAddressSpace = loadedImage.getAddressSpaces().iterator();
 		Vector vSections = new Vector();
 		while(itAddressSpace.hasNext()){
 			ImageAddressSpace imageAddressSpace = (ImageAddressSpace)itAddressSpace.next();
-			Iterator iSections = imageAddressSpace.getImageSections();
+			Iterator iSections = imageAddressSpace.getImageSections().iterator();
 			while(iSections.hasNext()){
 				vSections.add(iSections.next());
 			}
@@ -780,14 +780,14 @@
 	
 	public static JavaClass getClassGivenName(String className, JavaRuntime jr, Output out)
 	{
-		Iterator itJavaClassLoader = jr.getJavaClassLoaders();
+		Iterator itJavaClassLoader = jr.getJavaClassLoaders().iterator();
 		boolean found = false;
 		JavaClass jc = null;
 		
 		while (itJavaClassLoader.hasNext() && !found)
 		{
 			JavaClassLoader jcl = (JavaClassLoader)itJavaClassLoader.next();
-			Iterator itJavaClass = jcl.getDefinedClasses();
+			Iterator itJavaClass = jcl.getDefinedClasses().iterator();
 			while (itJavaClass.hasNext() && !found)
 			{
 				jc = (JavaClass)itJavaClass.next();

Modified: incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/infocommands/InfoClassCommand.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/infocommands/InfoClassCommand.java?rev=777088&r1=777087&r2=777088&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/infocommands/InfoClassCommand.java
(original)
+++ incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/infocommands/InfoClassCommand.java
Thu May 21 12:04:20 2009
@@ -207,7 +207,7 @@
 	
 	private void printMethods(JavaClass jClass){
 		out.print("Methods......\n\n");
-		ClassOutput.printMethods(jClass.getDeclaredMethods(), out);
+		ClassOutput.printMethods(jClass.getDeclaredMethods().iterator(), out);
 		out.print("\n");
 	}
 	
@@ -235,14 +235,14 @@
 	
 	private void printRuntimeClasses(JavaRuntime jr) {
 		Map javaClasses = new HashMap();
-		Iterator itClassLoader = jr.getJavaClassLoaders();
+		Iterator itClassLoader = jr.getJavaClassLoaders().iterator();
 		
 		// create Map of all classes in this JavaRuntime's class loaders
 		while (itClassLoader.hasNext()) {
 			JavaClassLoader jcl = (JavaClassLoader)itClassLoader.next();
 			
 			// Check for any corrupt data for this classloader
-			Iterator itCache = jcl.getCachedClasses();
+			Iterator itCache = jcl.getCachedClasses().iterator();
 			while (itCache.hasNext()) {
 				Object next = itCache.next();
 				if (next instanceof CorruptData){
@@ -257,7 +257,7 @@
 				}
 			}
 			
-			Iterator itClass = jcl.getDefinedClasses();
+			Iterator itClass = jcl.getDefinedClasses().iterator();
 			while (itClass.hasNext()) {
 				javaClasses.put((JavaClass)itClass.next(), new Datum());
 			}
@@ -298,10 +298,10 @@
 	}
 	
 	private void updateInstanceCount(JavaRuntime jr, Map javaClasses) {
-		Iterator itHeap = jr.getHeaps();
+		Iterator itHeap = jr.getHeaps().iterator();
 		while (itHeap.hasNext()) {
 			JavaHeap jh = (JavaHeap)itHeap.next();
-			Iterator itObject = jh.getObjects();
+			Iterator itObject = jh.getObjects().iterator();
 			while (itObject.hasNext()) {
 				Object next = itObject.next();
 				// Check that this is a JavaObject (there may be CorruptData objects in the 

Modified: incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/infocommands/InfoHeapCommand.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/infocommands/InfoHeapCommand.java?rev=777088&r1=777087&r2=777088&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/infocommands/InfoHeapCommand.java
(original)
+++ incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/infocommands/InfoHeapCommand.java
Thu May 21 12:04:20 2009
@@ -101,7 +101,7 @@
 	}
 	private void printHeapInfo(String param, JavaRuntime runtime, Output out){
 		
-		Iterator itHeaps = runtime.getHeaps();
+		Iterator itHeaps = runtime.getHeaps().iterator();
 		int countheaps = 1;
 		
 		while (itHeaps.hasNext())
@@ -116,7 +116,7 @@
 	}
 	private void printSectionInfo(JavaHeap theHeap, Output out){
 		
-		Iterator itSections = theHeap.getSections();
+		Iterator itSections = theHeap.getSections().iterator();
 		int countSections = 1;
 		
 		while (itSections.hasNext()){
@@ -142,7 +142,7 @@
 		
 		boolean foundHeap = false;
 		
-		Iterator itHeaps = jr.getHeaps();
+		Iterator itHeaps = jr.getHeaps().iterator();
 		int countheaps = 1;
 		
 		while (itHeaps.hasNext())
@@ -169,14 +169,14 @@
 		long size = 0;
 		long totalObjectSize = 0;
 		
-		Iterator itSections = theHeap.getSections();
+		Iterator itSections = theHeap.getSections().iterator();
 		while (itSections.hasNext()){
 			ImageSection theSection = (ImageSection)itSections.next();
 			size = size + theSection.getSize();
 		}
 		out.print("\t  Size of heap: "+ size + " bytes\n");
 		
-		Iterator itObjects = theHeap.getObjects();
+		Iterator itObjects = theHeap.getObjects().iterator();
 		try{
 			while (itObjects.hasNext()){
 				JavaObject theObject = (JavaObject)itObjects.next();

Modified: incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/infocommands/InfoJitmCommand.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/infocommands/InfoJitmCommand.java?rev=777088&r1=777087&r2=777088&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/infocommands/InfoJitmCommand.java
(original)
+++ incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/infocommands/InfoJitmCommand.java
Thu May 21 12:04:20 2009
@@ -54,16 +54,16 @@
 			while (itJavaRuntime.hasNext())
 			{
 				JavaRuntime jr = (JavaRuntime)itJavaRuntime.next();
-				Iterator itJavaClassLoader = jr.getJavaClassLoaders();
+				Iterator itJavaClassLoader = jr.getJavaClassLoaders().iterator();
 				while (itJavaClassLoader.hasNext())
 				{
 					JavaClassLoader jcl = (JavaClassLoader)itJavaClassLoader.next();
-					Iterator itJavaClass = jcl.getDefinedClasses();
+					Iterator itJavaClass = jcl.getDefinedClasses().iterator();
 					
 					while (itJavaClass.hasNext())
 					{
 						JavaClass jc = (JavaClass)itJavaClass.next();
-						Iterator itJavaMethod = jc.getDeclaredMethods();
+						Iterator itJavaMethod = jc.getDeclaredMethods().iterator();
 						
 						String jcName;
 						try {
@@ -90,9 +90,9 @@
 								sig = Exceptions.getCorruptDataExceptionString();
 							}
 
-							if (jm.getCompiledSections().hasNext())
+							if (jm.getCompiledSections().isEmpty()==false)
 							{
-								Iterator itImageSection = jm.getCompiledSections();
+								Iterator itImageSection = jm.getCompiledSections().iterator();
 								while (itImageSection.hasNext())
 								{
 									ImageSection is = (ImageSection)itImageSection.next();

Modified: incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/infocommands/InfoLockCommand.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/infocommands/InfoLockCommand.java?rev=777088&r1=777087&r2=777088&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/infocommands/InfoLockCommand.java
(original)
+++ incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/infocommands/InfoLockCommand.java
Thu May 21 12:04:20 2009
@@ -47,7 +47,7 @@
 		
 		while(runtimes.hasNext()){
 			JavaRuntime jRuntime = (JavaRuntime)runtimes.next();
-			Iterator monitors = jRuntime.getMonitors();
+			Iterator monitors = jRuntime.getMonitors().iterator();
 			
 			out.println("\nSystem locks...");
 			while (monitors.hasNext()){
@@ -71,7 +71,7 @@
 					}
 					
 					// List any threads waiting on enter or notify for this monitor
-					Iterator itEnterWaiter = jMonitor.getEnterWaiters();
+					Iterator itEnterWaiter = jMonitor.getEnterWaiters().iterator();
 					while (itEnterWaiter.hasNext()) {
 						JavaThread jThread = (JavaThread)itEnterWaiter.next();
 						try {
@@ -81,7 +81,7 @@
 							out.println("\twaiting thread id: <unknown>");
 						}
 					}
-					Iterator itNotifyWaiter = jMonitor.getNotifyWaiters();
+					Iterator itNotifyWaiter = jMonitor.getNotifyWaiters().iterator();
 					while (itNotifyWaiter.hasNext()) {
 						JavaThread jThread = (JavaThread)itNotifyWaiter.next();
 						try {

Modified: incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/infocommands/InfoProcCommand.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/infocommands/InfoProcCommand.java?rev=777088&r1=777087&r2=777088&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/infocommands/InfoProcCommand.java
(original)
+++ incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/infocommands/InfoProcCommand.java
Thu May 21 12:04:20 2009
@@ -68,7 +68,7 @@
 		ImageAddressSpace ias;
 		int asnum = 0;
 		
-		itAddressSpace = loadedImage.getAddressSpaces();
+		itAddressSpace = loadedImage.getAddressSpaces().iterator();
 		while (itAddressSpace.hasNext()) 
 		{
 			ias = (ImageAddressSpace)itAddressSpace.next();
@@ -106,7 +106,7 @@
 
 		// FIXME: should output architecture (32/64-bit), endianness before threads
 
-		Iterator itThread = ip.getThreads();
+		Iterator itThread = ip.getThreads().iterator();
 		while (itThread.hasNext())
 		{
 			Object next = itThread.next();

Modified: incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/infocommands/InfoSymCommand.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/infocommands/InfoSymCommand.java?rev=777088&r1=777087&r2=777088&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/infocommands/InfoSymCommand.java
(original)
+++ incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/infocommands/InfoSymCommand.java
Thu May 21 12:04:20 2009
@@ -44,14 +44,14 @@
 	public void doCommand(Stack args, Image loadedImage, HashMap properties)
 	{
 		int asnum = 0;
-		Iterator itAddressSpace = loadedImage.getAddressSpaces();
+		Iterator itAddressSpace = loadedImage.getAddressSpaces().iterator();
 		
 		// iterate through the address spaces
 		while (itAddressSpace.hasNext()) {
 			ImageAddressSpace ias = (ImageAddressSpace)itAddressSpace.next();
 			out.print("\n\tlibraries for address space # " + asnum + "\n");
 			
-			Iterator itProcess = ias.getProcesses();
+			Iterator itProcess = ias.getProcesses().iterator();
 			
 			// iterate through the processes
 			while (itProcess.hasNext())	{
@@ -69,7 +69,7 @@
 				
 				Iterator iLibs;
 				try {
-					iLibs = ip.getLibraries();
+					iLibs = ip.getLibraries().iterator();
 				} catch (DataUnavailable du) {
 					iLibs = null;
 					out.println(Exceptions.getDataUnavailableString());
@@ -90,7 +90,7 @@
 						}
 						out.print(", sections:\n");
 
-						Iterator itSection = imageModule.getSections();
+						Iterator itSection = imageModule.getSections().iterator();
 					
 						// iterate through the library sections
 						while (itSection.hasNext()) {

Modified: incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/infocommands/InfoThreadCommand.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/infocommands/InfoThreadCommand.java?rev=777088&r1=777087&r2=777088&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/infocommands/InfoThreadCommand.java
(original)
+++ incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/infocommands/InfoThreadCommand.java
Thu May 21 12:04:20 2009
@@ -132,7 +132,7 @@
 		ImageAddressSpace ias;
 		int asnum = 0;
 		
-		itAddressSpace = loadedImage.getAddressSpaces();
+		itAddressSpace = loadedImage.getAddressSpaces().iterator();
 		while (itAddressSpace.hasNext()) {
 			ias = (ImageAddressSpace)itAddressSpace.next();
 			out.print("\n\tnative threads for address space # " + asnum + "\n");
@@ -160,7 +160,7 @@
 		ImageProcess ip;
 		boolean found = false;
 		
-		itProcess = ias.getProcesses();
+		itProcess = ias.getProcesses().iterator();
 		while (itProcess.hasNext())
 		{
 			ip = (ImageProcess)itProcess.next();
@@ -190,7 +190,7 @@
 		ImageThread it;
 		boolean found = false;
 		
-		itThread = ip.getThreads();
+		itThread = ip.getThreads().iterator();
 		while (itThread.hasNext())
 		{
 			Object next = itThread.next();
@@ -216,7 +216,7 @@
 				out.print("\t   stack sections:");
 				out.print("\n");
 				
-				Iterator itStackSection = it.getStackSections();
+				Iterator itStackSection = it.getStackSections().iterator();
 				while (itStackSection.hasNext()) {
 					Object nextStackSection = itStackSection.next();
 					if (nextStackSection instanceof CorruptData) {
@@ -255,7 +255,7 @@
 		out.print("\n");
 		
 		int count = 0;
-		Iterator itImageRegister = it.getRegisters();
+		Iterator itImageRegister = it.getRegisters().iterator();
 		while (itImageRegister.hasNext())
 		{
 			if (count % 4 == 0)
@@ -303,7 +303,7 @@
 		ImageStackFrame isf;
 		
 		try {
-			itStackFrame = it.getStackFrames();
+			itStackFrame = it.getStackFrames().iterator();
 		} catch (DataUnavailable d) {
 			out.print("\t   error with stack frames: " + Exceptions.getDataUnavailableString() + "\n");
 			return;
@@ -348,7 +348,7 @@
 			if (mr instanceof JavaRuntime)
 			{
 				JavaRuntime jr = (JavaRuntime)mr;
-				Iterator itThread = jr.getThreads();
+				Iterator itThread = jr.getThreads().iterator();
 				
 				while (itThread.hasNext()) {
 					JavaThread jt = (JavaThread)itThread.next();
@@ -391,15 +391,15 @@
 	{
 		Map monitors = new HashMap();
 		
-		Iterator itMonitor = jr.getMonitors();
+		Iterator itMonitor = jr.getMonitors().iterator();
 		while (itMonitor.hasNext()) {
 			JavaMonitor jm = (JavaMonitor)itMonitor.next();
-			Iterator itEnterWaiter = jm.getEnterWaiters();
+			Iterator itEnterWaiter = jm.getEnterWaiters().iterator();
 			while (itEnterWaiter.hasNext()) {
 				JavaThread jt = (JavaThread)itEnterWaiter.next();
 				monitors.put(jt, new MonitorState(jm, MonitorState.WAITING_TO_ENTER));
 			}
-			Iterator itNotifyWaiter = jm.getNotifyWaiters();
+			Iterator itNotifyWaiter = jm.getNotifyWaiters().iterator();
 			while (itNotifyWaiter.hasNext()) {
 				JavaThread jt = (JavaThread)itNotifyWaiter.next();
 				monitors.put(jt, new MonitorState(jm, MonitorState.WAITING_TO_BE_NOTIFIED_ON));
@@ -496,7 +496,7 @@
 		JavaStackFrame jsf;
 		JavaLocation jl;
 
-		itStackFrame = jt.getStackFrames();
+		itStackFrame = jt.getStackFrames().iterator();
 		if (!itStackFrame.hasNext()) {
 			out.print("<no frames to print>\n");
 			return;
@@ -575,7 +575,7 @@
 	{
 		// Prints a summary list of native thread IDs
 		int count = 0;
-		Iterator itThread = ip.getThreads();
+		Iterator itThread = ip.getThreads().iterator();
 			
 		while (itThread.hasNext()) {
 			Object next = itThread.next();

Modified: incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/xcommands/XDCommand.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/xcommands/XDCommand.java?rev=777088&r1=777087&r2=777088&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/xcommands/XDCommand.java
(original)
+++ incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/xcommands/XDCommand.java
Thu May 21 12:04:20 2009
@@ -72,7 +72,7 @@
 		for (int index = 0; index < numUnits; index++)
 		{
 			boolean found = false;
-			Iterator itImageAddressSpace = loadedImage.getAddressSpaces();
+			Iterator itImageAddressSpace = loadedImage.getAddressSpaces().iterator();
 			long currAddr = address.longValue() + (index * unitSize);
 			
 			out.print("\t");

Modified: incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/xcommands/XJCommand.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/xcommands/XJCommand.java?rev=777088&r1=777087&r2=777088&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/xcommands/XJCommand.java
(original)
+++ incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/xcommands/XJCommand.java
Thu May 21 12:04:20 2009
@@ -138,7 +138,7 @@
 			Output out, boolean supers)
 	{
 		JavaHeap jh;
-		Iterator itHeap = jr.getHeaps();
+		Iterator itHeap = jr.getHeaps().iterator();
 		int count = 1;
 		
 		while (itHeap.hasNext()) {
@@ -157,7 +157,7 @@
 			boolean supers, JavaRuntime jr)
 	{
 		JavaObject jo;
-		Iterator itObject = jh.getObjects();
+		Iterator itObject = jh.getObjects().iterator();
 		boolean found = false;
 
 		if (objName != null)

Modified: incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/xcommands/XKCommand.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/xcommands/XKCommand.java?rev=777088&r1=777087&r2=777088&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/xcommands/XKCommand.java
(original)
+++ incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/xcommands/XKCommand.java
Thu May 21 12:04:20 2009
@@ -139,12 +139,12 @@
 	
 	private boolean printSymbol(long pointer, long diff, int pointerSize, ImageAddressSpace
ias)
 	{
-		Iterator itProcess = ias.getProcesses();
+		Iterator itProcess = ias.getProcesses().iterator();
 		while (itProcess.hasNext()) {
 			ImageProcess ip = (ImageProcess)itProcess.next();
 			Iterator itModule;
 			try {
-				itModule = ip.getLibraries();
+				itModule = ip.getLibraries().iterator();
 			} catch (CorruptDataException e) {
 				// FIXME
 				itModule = null;
@@ -154,7 +154,7 @@
 			}
 			while (null != itModule && itModule.hasNext()) {
 				ImageModule im = (ImageModule)itModule.next();
-				Iterator itImageSection = im.getSections();
+				Iterator itImageSection = im.getSections().iterator();
 				while (itImageSection.hasNext()) {
 					ImageSection is = (ImageSection)itImageSection.next();
 					long startAddr = is.getBaseAddress().getAddress();
@@ -164,7 +164,7 @@
 						/* can we find a matching symbol? */
 						long maxDifference = pointer - startAddr;
 						ImageSymbol bestSymbol = null;
-						for (Iterator iter = im.getSymbols(); iter.hasNext();) {
+						for (Iterator iter = im.getSymbols().iterator(); iter.hasNext();) {
 							Object next = iter.next();
 							if (next instanceof CorruptData)
 								continue;
@@ -218,7 +218,7 @@
 	
 	private int getIASPointerSize(ImageAddressSpace ias)
 	{
-		return ((ImageProcess)ias.getProcesses().next()).getPointerSize();
+		return ((ImageProcess)ias.getProcesses().iterator().next()).getPointerSize();
 	}
 
 	private String toAdjustedHex(long l, int pointerSize)

Modified: incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/xcommands/XXCommand.java
URL: http://svn.apache.org/viewvc/incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/xcommands/XXCommand.java?rev=777088&r1=777087&r2=777088&view=diff
==============================================================================
--- incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/xcommands/XXCommand.java
(original)
+++ incubator/kato/trunk/org.apache.kato.tools.katoview/src/org/apache/kato/dtfjview/commands/xcommands/XXCommand.java
Thu May 21 12:04:20 2009
@@ -73,7 +73,7 @@
 		for (int index = 0; index < numUnits; index++)
 		{
 			boolean found = false;
-			Iterator itImageAddressSpace = loadedImage.getAddressSpaces();
+			Iterator itImageAddressSpace = loadedImage.getAddressSpaces().iterator();
 			long currAddr = address.longValue() + (index * unitSize);
 			
 			out.print("\t");



Mime
View raw message