sysperfana/perfinvestigator/com.nokia.carbide.cpp.pi.function/src/com/nokia/carbide/cpp/pi/function/NewFunctionAnalyse.java
changeset 5 844b047e260d
parent 2 b9ab3b238396
child 12 ae255c9aa552
equal deleted inserted replaced
4:615035072f7e 5:844b047e260d
    63 import com.nokia.carbide.cpp.internal.pi.analyser.NpiInstanceRepository;
    63 import com.nokia.carbide.cpp.internal.pi.analyser.NpiInstanceRepository;
    64 import com.nokia.carbide.cpp.internal.pi.model.Function;
    64 import com.nokia.carbide.cpp.internal.pi.model.Function;
    65 import com.nokia.carbide.cpp.internal.pi.model.GUITooltips;
    65 import com.nokia.carbide.cpp.internal.pi.model.GUITooltips;
    66 import com.nokia.carbide.cpp.internal.pi.model.GenericSampledTrace;
    66 import com.nokia.carbide.cpp.internal.pi.model.GenericSampledTrace;
    67 import com.nokia.carbide.cpp.internal.pi.model.GenericTrace;
    67 import com.nokia.carbide.cpp.internal.pi.model.GenericTrace;
       
    68 import com.nokia.carbide.cpp.internal.pi.model.IFunction;
    68 import com.nokia.carbide.cpp.internal.pi.model.ParsedTraceData;
    69 import com.nokia.carbide.cpp.internal.pi.model.ParsedTraceData;
    69 import com.nokia.carbide.cpp.internal.pi.model.TraceDataRepository;
    70 import com.nokia.carbide.cpp.internal.pi.model.TraceDataRepository;
    70 import com.nokia.carbide.cpp.internal.pi.test.PIAnalyser;
    71 import com.nokia.carbide.cpp.internal.pi.test.PIAnalyser;
    71 import com.nokia.carbide.cpp.internal.pi.utils.QuickSortImpl;
    72 import com.nokia.carbide.cpp.internal.pi.utils.QuickSortImpl;
    72 import com.nokia.carbide.cpp.internal.pi.utils.Sortable;
    73 import com.nokia.carbide.cpp.internal.pi.utils.Sortable;
   501 			
   502 			
   502 			if (!threads.containsKey(sample.thread.process.name+"::"+sample.thread.threadName+"_"+sample.thread.threadId)) //$NON-NLS-1$ //$NON-NLS-2$
   503 			if (!threads.containsKey(sample.thread.process.name+"::"+sample.thread.threadName+"_"+sample.thread.threadId)) //$NON-NLS-1$ //$NON-NLS-2$
   503 			{
   504 			{
   504 				threads.put(s,sample.thread);
   505 				threads.put(s,sample.thread);
   505 				//listData.add(sample.thread.process.name+"::"+sample.thread.threadName);
   506 				//listData.add(sample.thread.process.name+"::"+sample.thread.threadName);
   506 				threadSampleAmount.put(s,new Integer(1));
   507 				threadSampleAmount.put(s,Integer.valueOf(1));
   507 			}
   508 			}
   508 			else
   509 			else
   509 			{
   510 			{
   510 				int value = ((Integer)threadSampleAmount.get(s)).intValue();
   511 				int value = ((Integer)threadSampleAmount.get(s)).intValue();
   511 				threadSampleAmount.remove(s);
   512 				threadSampleAmount.remove(s);
   512 				threadSampleAmount.put(s,new Integer(value+1));
   513 				threadSampleAmount.put(s,Integer.valueOf(value+1));
   513 			}
   514 			}
   514 		}
   515 		}
   515 		
   516 		
   516 		while(threadSampleAmount.size() > 0)
   517 		while(threadSampleAmount.size() > 0)
   517 		{
   518 		{
   559 						if (test != null && this.originallySelectedThreads[i] != null)
   560 						if (test != null && this.originallySelectedThreads[i] != null)
   560 						{				
   561 						{				
   561 							if (this.originallySelectedThreads[i].equals(test))
   562 							if (this.originallySelectedThreads[i].equals(test))
   562 							{
   563 							{
   563 								//System.out.println("Match:"+this.originallySelectedThreads[i]+" index "+k);
   564 								//System.out.println("Match:"+this.originallySelectedThreads[i]+" index "+k);
   564 								selectedIndx.add(new Integer(k));
   565 								selectedIndx.add(Integer.valueOf(k));
   565 							}
   566 							}
   566 						}
   567 						}
   567 					}
   568 					}
   568 				}
   569 				}
   569 				
   570 				
   605 			    }
   606 			    }
   606 			}
   607 			}
   607 			if (!containsKey)
   608 			if (!containsKey)
   608 		    {
   609 		    {
   609 		        binaries.put(bi, sample);
   610 		        binaries.put(bi, sample);
   610 		        binarySampleAmount.put(bi, new Integer(1));
   611 		        binarySampleAmount.put(bi, Integer.valueOf(1));
   611 		    }
   612 		    }
   612 		    else
   613 		    else
   613 		    {
   614 		    {
   614 		        for (Enumeration<BinaryNameItem> e = binarySampleAmount.keys(); e.hasMoreElements();)
   615 		        for (Enumeration<BinaryNameItem> e = binarySampleAmount.keys(); e.hasMoreElements();)
   615 		        {
   616 		        {
   616 		            BinaryNameItem biTemp = e.nextElement();
   617 		            BinaryNameItem biTemp = e.nextElement();
   617 		            if (biTemp.toString().equalsIgnoreCase(bi.toString()))
   618 		            if (biTemp.toString().equalsIgnoreCase(bi.toString()))
   618 		            {
   619 		            {
   619 		                int value = ((Integer)binarySampleAmount.get(biTemp)).intValue();
   620 		                int value = ((Integer)binarySampleAmount.get(biTemp)).intValue();
   620 		                binarySampleAmount.remove(biTemp);
   621 		                binarySampleAmount.remove(biTemp);
   621 						binarySampleAmount.put(biTemp, new Integer(value+1));
   622 						binarySampleAmount.put(biTemp, Integer.valueOf(value+1));
   622 		            }
   623 		            }
   623 		        }
   624 		        }
   624 		    }
   625 		    }
   625 		}
   626 		}
   626 
   627 
   681 						if (test != null && this.originallySelectedBinaries[i] != null)
   682 						if (test != null && this.originallySelectedBinaries[i] != null)
   682 						{				
   683 						{				
   683 							if (this.originallySelectedBinaries[i].equalsIgnoreCase(test))
   684 							if (this.originallySelectedBinaries[i].equalsIgnoreCase(test))
   684 							{
   685 							{
   685 								//System.out.println("Match:"+this.originallySelectedThreads[i]+" index "+k);
   686 								//System.out.println("Match:"+this.originallySelectedThreads[i]+" index "+k);
   686 								selectedIndx.add(new Integer(k));
   687 								selectedIndx.add(Integer.valueOf(k));
   687 							}
   688 							}
   688 						}
   689 						}
   689 					}
   690 					}
   690 				}
   691 				}
   691 				
   692 				
   732 				String threadName = sample.thread.process.name+"::"+sample.thread.threadName+"_"+sample.thread.threadId; //$NON-NLS-1$ //$NON-NLS-2$
   733 				String threadName = sample.thread.process.name+"::"+sample.thread.threadName+"_"+sample.thread.threadId; //$NON-NLS-1$ //$NON-NLS-2$
   733 	
   734 	
   734 				if (!threadVector.contains(threadName))
   735 				if (!threadVector.contains(threadName))
   735 				{
   736 				{
   736 					threadVector.add(threadName);
   737 					threadVector.add(threadName);
   737 					threadSampleAmount.add(new Integer(1));
   738 					threadSampleAmount.add(Integer.valueOf(1));
   738 				}
   739 				}
   739 				else
   740 				else
   740 				{	
   741 				{	
   741 					//int value = ((Integer)binarySampleAmount.get(binaryName)).intValue();
   742 					//int value = ((Integer)binarySampleAmount.get(binaryName)).intValue();
   742 					int index = threadVector.indexOf(threadName);
   743 					int index = threadVector.indexOf(threadName);
   743 					int value = ((Integer)threadSampleAmount.get(index)).intValue();
   744 					int value = ((Integer)threadSampleAmount.get(index)).intValue();
   744 					
   745 					
   745 					threadSampleAmount.remove(index);
   746 					threadSampleAmount.remove(index);
   746 					threadSampleAmount.add(index,new Integer(value+1));
   747 					threadSampleAmount.add(index,Integer.valueOf(value+1));
   747 				}
   748 				}
   748 			}
   749 			}
   749 		}
   750 		}
   750 		
   751 		
   751 		int totalSamples = 0;
   752 		int totalSamples = 0;
   805 			    }
   806 			    }
   806 //			    int index = listData.indexOf(valueStore[i]);
   807 //			    int index = listData.indexOf(valueStore[i]);
   807 			    int index = (found) ? counter : -1;
   808 			    int index = (found) ? counter : -1;
   808 				if (index != -1)
   809 				if (index != -1)
   809 				{
   810 				{
   810 					indexStore.add(new Integer(index));
   811 					indexStore.add(Integer.valueOf(index));
   811 				}
   812 				}
   812 				else
   813 				else
   813 				{
   814 				{
   814 					notVisibleStore.add(valueStore[i]);
   815 					notVisibleStore.add(valueStore[i]);
   815 				}
   816 				}
   834 			    }
   835 			    }
   835 			    int index = (found) ? counter : -1;
   836 			    int index = (found) ? counter : -1;
   836 //				int index = listData.indexOf(value);
   837 //				int index = listData.indexOf(value);
   837 				if (index != -1)
   838 				if (index != -1)
   838 				{
   839 				{
   839 					indexStore.add(new Integer(index));
   840 					indexStore.add(Integer.valueOf(index));
   840 				}
   841 				}
   841 				else
   842 				else
   842 				{
   843 				{
   843 					notVisibleStore.add(value);
   844 					notVisibleStore.add(value);
   844 				}
   845 				}
   889 				BinaryNameItem binaryName = getBinaryNameForGppSample(sample);
   890 				BinaryNameItem binaryName = getBinaryNameForGppSample(sample);
   890 	
   891 	
   891 				if (!binaryVector.contains(binaryName))
   892 				if (!binaryVector.contains(binaryName))
   892 				{
   893 				{
   893 					binaryVector.add(binaryName);
   894 					binaryVector.add(binaryName);
   894 					binarySampleAmount.add(new Integer(1));
   895 					binarySampleAmount.add(Integer.valueOf(1));
   895 				}
   896 				}
   896 				else
   897 				else
   897 				{	
   898 				{	
   898 					//int value = ((Integer)binarySampleAmount.get(binaryName)).intValue();
   899 					//int value = ((Integer)binarySampleAmount.get(binaryName)).intValue();
   899 					int index = binaryVector.indexOf(binaryName);
   900 					int index = binaryVector.indexOf(binaryName);
   900 					int value = ((Integer)binarySampleAmount.get(index)).intValue();
   901 					int value = ((Integer)binarySampleAmount.get(index)).intValue();
   901 					
   902 					
   902 					binarySampleAmount.remove(index);
   903 					binarySampleAmount.remove(index);
   903 					binarySampleAmount.add(index,new Integer(value+1));
   904 					binarySampleAmount.add(index,Integer.valueOf(value+1));
   904 				}
   905 				}
   905 			}
   906 			}
   906 		}
   907 		}
   907 		
   908 		
   908 		int totalSamples = 0;
   909 		int totalSamples = 0;
   954 			for (int i=0;i<valueStore.length;i++)
   955 			for (int i=0;i<valueStore.length;i++)
   955 			{
   956 			{
   956 				int index = listData.indexOf(valueStore[i]);
   957 				int index = listData.indexOf(valueStore[i]);
   957 				if (index != -1)
   958 				if (index != -1)
   958 				{
   959 				{
   959 					indexStore.add(new Integer(index));
   960 					indexStore.add(Integer.valueOf(index));
   960 				}
   961 				}
   961 				else
   962 				else
   962 				{
   963 				{
   963 					notVisibleStore.add(valueStore[i]);
   964 					notVisibleStore.add(valueStore[i]);
   964 				}
   965 				}
   968 			{
   969 			{
   969 				Object value = e.nextElement();
   970 				Object value = e.nextElement();
   970 				int index = listData.indexOf(value);
   971 				int index = listData.indexOf(value);
   971 				if (index != -1)
   972 				if (index != -1)
   972 				{
   973 				{
   973 					indexStore.add(new Integer(index));
   974 					indexStore.add(Integer.valueOf(index));
   974 				}
   975 				}
   975 				else
   976 				else
   976 				{
   977 				{
   977 					notVisibleStore.add(value);
   978 					notVisibleStore.add(value);
   978 				}
   979 				}
  1091 				{
  1092 				{
  1092 					// add the function name to percentData
  1093 					// add the function name to percentData
  1093 					percentData.add(getFunctionNameForGppSample(s));
  1094 					percentData.add(getFunctionNameForGppSample(s));
  1094 					// this is the first sample for this function, thus add number 1
  1095 					// this is the first sample for this function, thus add number 1
  1095 					// to the percent value list
  1096 					// to the percent value list
  1096 					percentValueList.add(new Integer(1));
  1097 					percentValueList.add(Integer.valueOf(1));
  1097 					// add a vector for the function offset values
  1098 					// add a vector for the function offset values
  1098 					
  1099 					
  1099 					if (this.functionPercents.isSelected() == true)
  1100 					if (this.functionPercents.isSelected() == true)
  1100 					{
  1101 					{
  1101 						Vector functionIndexVector = new Vector();
  1102 						Vector functionIndexVector = new Vector();
  1117 							((Integer)percentValueList.elementAt(index)).intValue());
  1118 							((Integer)percentValueList.elementAt(index)).intValue());
  1118 					*/
  1119 					*/
  1119 					
  1120 					
  1120 					Integer value = (Integer)percentValueList.elementAt(index);
  1121 					Integer value = (Integer)percentValueList.elementAt(index);
  1121 					percentValueList.remove(index);
  1122 					percentValueList.remove(index);
  1122 					percentValueList.add(index,new Integer(value.intValue()+1));
  1123 					percentValueList.add(index,Integer.valueOf(value.intValue()+1));
  1123 					
  1124 					
  1124 					if (this.functionPercents.isSelected() == true)
  1125 					if (this.functionPercents.isSelected() == true)
  1125 					{					
  1126 					{					
  1126 						Vector functionIndexVector = (Vector)functionIndexList.elementAt(index);
  1127 						Vector functionIndexVector = (Vector)functionIndexList.elementAt(index);
  1127 						Long offset = getFunctionOffsetForGppSample(s);
  1128 						Long offset = getFunctionOffsetForGppSample(s);
  1228 	private BinaryNameItem getBinaryNameForGppSample(GppSample s)
  1229 	private BinaryNameItem getBinaryNameForGppSample(GppSample s)
  1229 	{
  1230 	{
  1230 		String binaryName;
  1231 		String binaryName;
  1231 		if (this.symbolPrimary || this.ittTrace == null)
  1232 		if (this.symbolPrimary || this.ittTrace == null)
  1232 		{
  1233 		{
  1233 			binaryName = s.currentFunctionSym.functionBinary.binaryName;
  1234 			binaryName = s.getCurrentFunctionSym().getFunctionBinary().getBinaryName();
  1234 			if (!binaryName.endsWith(Messages.getString("NewFunctionAnalyse.notFound"))) //$NON-NLS-1$
  1235 			if (!binaryName.endsWith(Messages.getString("NewFunctionAnalyse.notFound"))) //$NON-NLS-1$
  1235 				return new BinaryNameItem(binaryName,false);
  1236 				return new BinaryNameItem(binaryName,false);
  1236 		}
  1237 		}
  1237 
  1238 
  1238 		if (s.currentFunctionItt != null)
  1239 		if (s.getCurrentFunctionItt() != null)
  1239 		{
  1240 		{
  1240 			binaryName = s.currentFunctionItt.functionBinary.binaryName;
  1241 			binaryName = s.getCurrentFunctionItt().getFunctionBinary().getBinaryName();
  1241 			if (!binaryName.endsWith(Messages.getString("NewFunctionAnalyse.notFound"))) //$NON-NLS-1$
  1242 			if (!binaryName.endsWith(Messages.getString("NewFunctionAnalyse.notFound"))) //$NON-NLS-1$
  1242 			{
  1243 			{
  1243 				return new BinaryNameItem(binaryName,true);
  1244 				return new BinaryNameItem(binaryName,true);
  1244 			}
  1245 			}
  1245 			else
  1246 			else
  1246 			{
  1247 			{
  1247 				binaryName = s.currentFunctionSym.functionBinary.binaryName;
  1248 				binaryName = s.getCurrentFunctionSym().getFunctionBinary().getBinaryName();
  1248 				if (binaryName.endsWith(Messages.getString("NewFunctionAnalyse.notFound"))) //$NON-NLS-1$
  1249 				if (binaryName.endsWith(Messages.getString("NewFunctionAnalyse.notFound"))) //$NON-NLS-1$
  1249 					return new BinaryNameItem(Messages.getString("NewFunctionAnalyse.binaryNotFound"),true); //$NON-NLS-1$
  1250 					return new BinaryNameItem(Messages.getString("NewFunctionAnalyse.binaryNotFound"),true); //$NON-NLS-1$
  1250 				else
  1251 				else
  1251 					return new BinaryNameItem(binaryName,false);
  1252 					return new BinaryNameItem(binaryName,false);
  1252 			}			
  1253 			}			
  1253 		}
  1254 		}
  1254 		else if (!s.currentFunctionSym.functionBinary.binaryName.endsWith(Messages.getString("NewFunctionAnalyse.notFound"))) //$NON-NLS-1$
  1255 		else if (!s.getCurrentFunctionSym().getFunctionBinary().getBinaryName().endsWith(Messages.getString("NewFunctionAnalyse.notFound"))) //$NON-NLS-1$
  1255 		{
  1256 		{
  1256 			binaryName = s.currentFunctionSym.functionBinary.binaryName;
  1257 			binaryName = s.getCurrentFunctionSym().getFunctionBinary().getBinaryName();
  1257 			return new BinaryNameItem(binaryName,false);
  1258 			return new BinaryNameItem(binaryName,false);
  1258 		}
  1259 		}
  1259 		else
  1260 		else
  1260 		{
  1261 		{
  1261 			return new BinaryNameItem(Messages.getString("NewFunctionAnalyse.binaryNotFound"),false); //$NON-NLS-1$
  1262 			return new BinaryNameItem(Messages.getString("NewFunctionAnalyse.binaryNotFound"),false); //$NON-NLS-1$
  1334 	
  1335 	
  1335 	private Long getFunctionOffsetForGppSample(GppSample s)
  1336 	private Long getFunctionOffsetForGppSample(GppSample s)
  1336 	{
  1337 	{
  1337 		//String functionName;
  1338 		//String functionName;
  1338 		if ((this.symbolPrimary || this.ittTrace == null) && 
  1339 		if ((this.symbolPrimary || this.ittTrace == null) && 
  1339 				!s.currentFunctionSym.functionBinary.binaryName.endsWith(Messages.getString("NewFunctionAnalyse.notFound")) ) //$NON-NLS-1$
  1340 				!s.getCurrentFunctionSym().getFunctionBinary().getBinaryName().endsWith(Messages.getString("NewFunctionAnalyse.notFound")) ) //$NON-NLS-1$
  1340 		{
  1341 		{
  1341 			return new Long(s.programCounter-s.currentFunctionSym.startAddress.longValue());
  1342 			return new Long(s.programCounter-s.getCurrentFunctionSym().getStartAddress().longValue());
  1342 		}
  1343 		}
  1343 		if (s.currentFunctionItt != null && !s.currentFunctionItt.functionName.endsWith(Messages.getString("NewFunctionAnalyse.notFound"))) //$NON-NLS-1$
  1344 		if (s.getCurrentFunctionItt() != null && !s.getCurrentFunctionItt().getFunctionName().endsWith(Messages.getString("NewFunctionAnalyse.notFound"))) //$NON-NLS-1$
  1344 		{
  1345 		{
  1345 			//System.out.println("OFF:"+(s.programCounter-s.currentFunctionItt.startAddress.longValue())+" PC: "+Long.toHexString(s.programCounter)+" start"+Long.toHexString(s.currentFunctionItt.startAddress.longValue()));
  1346 			//System.out.println("OFF:"+(s.programCounter-s.currentFunctionItt.startAddress.longValue())+" PC: "+Long.toHexString(s.programCounter)+" start"+Long.toHexString(s.currentFunctionItt.startAddress.longValue()));
  1346 			return new Long(s.programCounter-s.currentFunctionItt.startAddress.longValue());
  1347 			return new Long(s.programCounter-s.getCurrentFunctionItt().getStartAddress().longValue());
  1347 		}
  1348 		}
  1348 		else if (s.currentFunctionSym != null)
  1349 		else if (s.getCurrentFunctionSym() != null)
  1349 		{
  1350 		{
  1350 			return new Long(s.programCounter-s.currentFunctionSym.startAddress.longValue());
  1351 			return new Long(s.programCounter-s.getCurrentFunctionSym().getStartAddress().longValue());
  1351 		}
  1352 		}
  1352 		else
  1353 		else
  1353 		{
  1354 		{
  1354 			return new Long(666666);
  1355 			return new Long(666666);
  1355 		}		
  1356 		}		
  1368 			{	
  1369 			{	
  1369 				return item;
  1370 				return item;
  1370 			}
  1371 			}
  1371 			else
  1372 			else
  1372 			{
  1373 			{
  1373 				functionName = s.currentFunctionSym.functionName;
  1374 				functionName = s.getCurrentFunctionSym().getFunctionName();
  1374 				if (!functionName.endsWith(Messages.getString("NewFunctionAnalyse.notFound"))) //$NON-NLS-1$
  1375 				if (!functionName.endsWith(Messages.getString("NewFunctionAnalyse.notFound"))) //$NON-NLS-1$
  1375 				{					
  1376 				{					
  1376 					item = new FunctionNameItem(functionName,s.currentFunctionSym,false);
  1377 					item = new FunctionNameItem(functionName,s.getCurrentFunctionSym(),false);
  1377 					this.functionNameCacheSym.put(s,item);
  1378 					this.functionNameCacheSym.put(s,item);
  1378 					return item;
  1379 					return item;
  1379 				}
  1380 				}
  1380 			}
  1381 			}
  1381 		}
  1382 		}
  1382 		
  1383 		
  1383 		if (s.currentFunctionItt != null)
  1384 		if (s.getCurrentFunctionItt() != null)
  1384 		{
  1385 		{
  1385 			FunctionNameItem item = (FunctionNameItem)this.functionNameCacheItt.get(s);
  1386 			FunctionNameItem item = (FunctionNameItem)this.functionNameCacheItt.get(s);
  1386 			if (item != null) return item;
  1387 			if (item != null) return item;
  1387 			
  1388 			
  1388 			functionName = s.currentFunctionItt.functionName;
  1389 			functionName = s.getCurrentFunctionItt().getFunctionName();
  1389 
  1390 
  1390 			if (!functionName.endsWith(Messages.getString("NewFunctionAnalyse.notFound"))) //$NON-NLS-1$
  1391 			if (!functionName.endsWith(Messages.getString("NewFunctionAnalyse.notFound"))) //$NON-NLS-1$
  1391 			{
  1392 			{
  1392 				item = new FunctionNameItem(functionName,s.currentFunctionItt,true);
  1393 				item = new FunctionNameItem(functionName,s.getCurrentFunctionItt(),true);
  1393 				this.functionNameCacheItt.put(s,item);
  1394 				this.functionNameCacheItt.put(s,item);
  1394 				return item;
  1395 				return item;
  1395 //				return new FunctionNameItem(functionName,s.currentFunctionItt,true);
  1396 //				return new FunctionNameItem(functionName,s.currentFunctionItt,true);
  1396 			}
  1397 			}
  1397 			else
  1398 			else
  1398 			{
  1399 			{
  1399 				item = (FunctionNameItem)this.functionNameCacheSym.get(s);
  1400 				item = (FunctionNameItem)this.functionNameCacheSym.get(s);
  1400 				if (item != null) return item;
  1401 				if (item != null) return item;
  1401 				
  1402 				
  1402 				functionName = s.currentFunctionSym.functionName;
  1403 				functionName = s.getCurrentFunctionSym().getFunctionName();
  1403 				item = new FunctionNameItem(functionName,s.currentFunctionSym,false);
  1404 				item = new FunctionNameItem(functionName,s.getCurrentFunctionSym(),false);
  1404 				this.functionNameCacheSym.put(s,item);
  1405 				this.functionNameCacheSym.put(s,item);
  1405 				return item;
  1406 				return item;
  1406 //				return new FunctionNameItem(functionName,s.currentFunctionSym,false);
  1407 //				return new FunctionNameItem(functionName,s.currentFunctionSym,false);
  1407 			}
  1408 			}
  1408 		}
  1409 		}
  1409 		else if (s.currentFunctionSym != null)
  1410 		else if (s.getCurrentFunctionSym() != null)
  1410 		{
  1411 		{
  1411 			FunctionNameItem item = (FunctionNameItem)this.functionNameCacheSym.get(s);
  1412 			FunctionNameItem item = (FunctionNameItem)this.functionNameCacheSym.get(s);
  1412 			if (item != null) return item;
  1413 			if (item != null) return item;
  1413 			
  1414 			
  1414 			functionName = s.currentFunctionSym.functionName;
  1415 			functionName = s.getCurrentFunctionSym().getFunctionName();
  1415 			item = new FunctionNameItem(functionName,s.currentFunctionSym,false);
  1416 			item = new FunctionNameItem(functionName,s.getCurrentFunctionSym(),false);
  1416 			this.functionNameCacheSym.put(s,item);
  1417 			this.functionNameCacheSym.put(s,item);
  1417 			return item;
  1418 			return item;
  1418 //			return new FunctionNameItem(functionName,s.currentFunctionSym,false);
  1419 //			return new FunctionNameItem(functionName,s.currentFunctionSym,false);
  1419 		}
  1420 		}
  1420 		else
  1421 		else
  1775 	{
  1776 	{
  1776 		public String name;
  1777 		public String name;
  1777 		public boolean itt;
  1778 		public boolean itt;
  1778 		public int sampleAmount;
  1779 		public int sampleAmount;
  1779 		public int totalSamples;
  1780 		public int totalSamples;
  1780 		public Function function;
  1781 		public IFunction function;
  1781 		public Vector offsetVector;
  1782 		public Vector offsetVector;
  1782 		public double currentPercent;
  1783 		public double currentPercent;
  1783 		
  1784 		
  1784 		public FunctionNameItem(String name, Function function, boolean itt)
  1785 		public FunctionNameItem(String name, IFunction function, boolean itt)
  1785 		{
  1786 		{
  1786 			this.offsetVector = new Vector();
  1787 			this.offsetVector = new Vector();
  1787 			this.sampleAmount = 0;
  1788 			this.sampleAmount = 0;
  1788 			this.totalSamples = 0;
  1789 			this.totalSamples = 0;
  1789 			this.function = function;
  1790 			this.function = function;
  1855 			super.paint(g);
  1856 			super.paint(g);
  1856 
  1857 
  1857 			if (this.functionNameItem != null && this.functionNameItem.offsetVector != null)
  1858 			if (this.functionNameItem != null && this.functionNameItem.offsetVector != null)
  1858 			{
  1859 			{
  1859 				
  1860 				
  1860 				long length = this.functionNameItem.function.length;
  1861 				long length = this.functionNameItem.function.getLength();
  1861 				g.setColor(
  1862 				g.setColor(
  1862 						// AWT
  1863 						// AWT
  1863 					    AWTColorPalette.getColor(new RGB(255, 255, 255))
  1864 					    AWTColorPalette.getColor(new RGB(255, 255, 255))
  1864 					    // SWT
  1865 					    // SWT
  1865 					    //ColorPalette.getColor(new RGB(255, 255, 255))
  1866 					    //ColorPalette.getColor(new RGB(255, 255, 255))
  2080 					setBorder(null);
  2081 					setBorder(null);
  2081 				}
  2082 				}
  2082 				
  2083 				
  2083 				if (item.function != null)
  2084 				if (item.function != null)
  2084 				{
  2085 				{
  2085 					if (item.function.functionBinary != null && item.function.functionBinary.binaryName != null)
  2086 					if (item.function.getFunctionBinary() != null && item.function.getFunctionBinary().getBinaryName() != null)
  2086 					{
  2087 					{
  2087 						this.setToolTipText(Messages.getString("NewFunctionAnalyse.function1")+item.function.functionName+Messages.getString("NewFunctionAnalyse.function2")+ //$NON-NLS-1$ //$NON-NLS-2$
  2088 						this.setToolTipText(Messages.getString("NewFunctionAnalyse.function1")+item.function.getFunctionName()+Messages.getString("NewFunctionAnalyse.function2")+ //$NON-NLS-1$ //$NON-NLS-2$
  2088 								Long.toHexString(item.function.startAddress.longValue())+
  2089 								Long.toHexString(item.function.getStartAddress().longValue())+
  2089 								Messages.getString("NewFunctionAnalyse.function3")+item.function.functionBinary.binaryName); //$NON-NLS-1$
  2090 								Messages.getString("NewFunctionAnalyse.function3")+item.function.getFunctionBinary().getBinaryName()); //$NON-NLS-1$
  2090 					}
  2091 					}
  2091 					else
  2092 					else
  2092 					{
  2093 					{
  2093 						this.setToolTipText(Messages.getString("NewFunctionAnalyse.function1")+item.function.functionName+Messages.getString("NewFunctionAnalyse.function2")+ //$NON-NLS-1$ //$NON-NLS-2$
  2094 						this.setToolTipText(Messages.getString("NewFunctionAnalyse.function1")+item.function.getFunctionName()+Messages.getString("NewFunctionAnalyse.function2")+ //$NON-NLS-1$ //$NON-NLS-2$
  2094 								Long.toHexString(item.function.startAddress.longValue())+
  2095 								Long.toHexString(item.function.getStartAddress().longValue())+
  2095 								Messages.getString("NewFunctionAnalyse.function3") + Messages.getString("NewFunctionAnalyse.binaryNotFound")); //$NON-NLS-1$ //$NON-NLS-2$
  2096 								Messages.getString("NewFunctionAnalyse.function3") + Messages.getString("NewFunctionAnalyse.binaryNotFound")); //$NON-NLS-1$ //$NON-NLS-2$
  2096 					}
  2097 					}
  2097 				}
  2098 				}
  2098 				else
  2099 				else
  2099 				{
  2100 				{