File : display the process name on the chart board 92/26992/1
authorhyeran74.kim <hyeran74.kim@samsung.com>
Wed, 3 Sep 2014 01:14:39 +0000 (10:14 +0900)
committerhyeran74.kim <hyeran74.kim@samsung.com>
Wed, 3 Sep 2014 01:14:39 +0000 (10:14 +0900)
Change-Id: I96b5cdf5210e0cddfc9f8e468f3bfefb1d534e09
Signed-off-by: hyeran74.kim <hyeran74.kim@samsung.com>
org.tizen.dynamicanalyzer.appearance/src/org/tizen/dynamicanalyzer/theme/DAThemeWhite.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/FilePageLabels.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/FilePageLabels.properties
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileChart.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/FileChartBoard.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/file/manager/FileDataMaker.java

index 0c0ee78..a0bd131 100644 (file)
@@ -328,14 +328,10 @@ public class DAThemeWhite extends DATheme {
                setColor("file_access_write",new RGB(131, 207, 232)); //$NON-NLS-1$
                setColor("file_access_concurrent_read",  new RGB(40, 160, 198)); //$NON-NLS-1$
                setColor("file_access_concurrent_write",  new RGB(40, 160, 198)); //$NON-NLS-1$
-               //setColor("file_lock_acquired", new RGB(216, 160, 76)); //$NON-NLS-1$
-               //setColor("file_lock_waiting", new RGB(238, 122, 67)); //$NON-NLS-1$
                setColor("file_lock_acquired", new RGB(229, 123, 206)); //$NON-NLS-1$
                setColor("file_lock_waiting", new RGB(194, 79, 167)); //$NON-NLS-1$
                setColor("file_other_operation",  new RGB(173, 173, 173)); //$NON-NLS-1$
                setColor("file_other_operation",  new RGB(173, 173, 173)); //$NON-NLS-1$
-               //setColor("file_opened", new RGB(141, 180, 70)); //$NON-NLS-1$
-               //setColor("file_duplicate_opened", new RGB(125, 161, 60)); //$NON-NLS-1$
                setColor("file_opened", new RGB(90, 200, 177)); //$NON-NLS-1$
                setColor("file_duplicate_opened", new RGB(71, 169, 149)); //$NON-NLS-1$
 
index ac24ba3..2f3fde8 100644 (file)
@@ -65,7 +65,8 @@ public class FilePageLabels extends NLS {
        public static String FILE_CHART_ACCESS;
        
        public static String FILE_CHART_TOOLTIP_CLOSED;
-       public static String FILE_CHART_TOOLTIP_OPEND;
+       public static String FILE_CHART_TOOLTIP_OPENED;
+       public static String FILE_CHART_TOOLTIP_DUPLICATED_OPENED;
        public static String FILE_CHART_TOOLTIP_USED;   
        
        public static String FILE_CHART_TOOLTIP_WRITE;
index 0b33e6f..f79f289 100644 (file)
@@ -33,7 +33,8 @@ FILE_CHART_ACCESS=ACCESS
 FILE_CHART_LOCK=LOCK
 
 FILE_CHART_TOOLTIP_CLOSED=CLOSED
-FILE_CHART_TOOLTIP_OPEND=OPENED
+FILE_CHART_TOOLTIP_OPENED=OPENED
+FILE_CHART_TOOLTIP_DUPLICATED_OPENED=DUPLICATED OPENED
 FILE_CHART_TOOLTIP_USED=USED
 
 FILE_CHART_TOOLTIP_WRITE=WRITE
index 35f15cd..b896e79 100644 (file)
@@ -32,6 +32,7 @@ import java.util.List;
 import org.eclipse.swt.graphics.Color;
 import org.tizen.dynamicanalyzer.logparser.LogCenterConstants;
 import org.tizen.dynamicanalyzer.nl.FilePageLabels;
+import org.tizen.dynamicanalyzer.project.FunctionNameManager;
 import org.tizen.dynamicanalyzer.resources.ColorResources;
 import org.tizen.dynamicanalyzer.ui.file.model.FileAccess;
 import org.tizen.dynamicanalyzer.ui.file.model.FileEvent;
@@ -116,7 +117,7 @@ public class FileChart {
                                continue;
                        }
                        double time = event.getTime() / TimelineConstants.MEGA_DOUBLE;
-                       String apiName = event.getApiName();
+                       String apiName = FunctionNameManager.getFunctionName(event.getApiId());
                        Color color = ColorResources.FILE_API_FAILED;
                        
                        DAChartSeriesItem seriesItem  = new DAChartSeriesItem(time,
@@ -299,7 +300,7 @@ public class FileChart {
                                                        time, DAChartSeriesItem.SERIES_AREA_START,
                                                        ColorResources.FILE_DUPLICATE_OPENED,
                                                        ColorResources.FILE_DUPLICATE_OPENED,
-                                                       FilePageLabels.FILE_CHART_TOOLTIP_OPEND));
+                                                       FilePageLabels.FILE_CHART_TOOLTIP_DUPLICATED_OPENED));
                                }else{
                                        // the file has been opened by only one process or thread
                                        openNum++;
@@ -307,7 +308,7 @@ public class FileChart {
                                                        time, DAChartSeriesItem.SERIES_AREA_START,
                                                        ColorResources.FILE_OPENED,
                                                        ColorResources.FILE_OPENED,
-                                                       FilePageLabels.FILE_CHART_TOOLTIP_OPEND));
+                                                       FilePageLabels.FILE_CHART_TOOLTIP_OPENED));
                                }
                                break;
                        case LogCenterConstants.FD_API_TYPE_CLOSE:
@@ -318,7 +319,7 @@ public class FileChart {
                                                        time, DAChartSeriesItem.SERIES_AREA_END,
                                                        ColorResources.FILE_OPENED,
                                                        ColorResources.FILE_OPENED,
-                                                       FilePageLabels.FILE_CHART_TOOLTIP_CLOSED));
+                                                       FilePageLabels.FILE_CHART_TOOLTIP_OPENED));
                                        openNum = 0;
                                        closeNum = 0;
                                } else { 
@@ -327,7 +328,7 @@ public class FileChart {
                                                        time, DAChartSeriesItem.SERIES_AREA_END,
                                                        ColorResources.FILE_DUPLICATE_OPENED,
                                                        ColorResources.FILE_OPENED,
-                                                       FilePageLabels.FILE_CHART_TOOLTIP_CLOSED));
+                                                       FilePageLabels.FILE_CHART_TOOLTIP_DUPLICATED_OPENED));
                                }
                                break;
                        }
index bc069a6..c7e86c5 100644 (file)
@@ -33,10 +33,14 @@ import java.util.List;
 import java.util.Map;
 
 import org.eclipse.swt.widgets.Composite;
+import org.tizen.dynamicanalyzer.common.AnalyzerManager;
 import org.tizen.dynamicanalyzer.common.DALimit;
+import org.tizen.dynamicanalyzer.common.GlobalInformation;
 import org.tizen.dynamicanalyzer.constant.CommonConstants;
 import org.tizen.dynamicanalyzer.nl.FilePageLabels;
 import org.tizen.dynamicanalyzer.nl.TimelineChartLabels;
+import org.tizen.dynamicanalyzer.project.ProcessInformation;
+import org.tizen.dynamicanalyzer.project.Project;
 import org.tizen.dynamicanalyzer.resources.ColorResources;
 import org.tizen.dynamicanalyzer.resources.FontResources;
 import org.tizen.dynamicanalyzer.resources.ImageResources;
@@ -55,6 +59,7 @@ import org.tizen.dynamicanalyzer.ui.file.model.FileEvent;
 import org.tizen.dynamicanalyzer.ui.file.model.FileSelectedData;
 import org.tizen.dynamicanalyzer.ui.file.model.FileStatus;
 import org.tizen.dynamicanalyzer.util.Logger;
+import org.tizen.dynamicanalyzer.utils.AnalyzerUtil;
 import org.tizen.dynamicanalyzer.utils.Formatter;
 import org.tizen.dynamicanalyzer.widgets.chart.DAChart;
 import org.tizen.dynamicanalyzer.widgets.chart.DAChartPlot;
@@ -188,10 +193,16 @@ public class FileChartBoard extends DAChartBoard {
                if (parent != null) { // child chart row
                        DAChartBoardItem parentItem = parent.getItem();
                        StringBuffer title = new StringBuffer();
-                       if(fileChart.isTarget()) {
+                       /*if(fileChart.isTarget()) {
                                title.append("Target"+ CommonConstants.NEW_LINE);
                        } else {
                                title.append("Non-Target"+ CommonConstants.NEW_LINE);
+                       }*/
+                       String processName = AnalyzerUtil.getProcessName(fileChart.getPid());
+                       if(processName != null) {
+                               title.append(processName + CommonConstants.NEW_LINE);
+                       }else{
+                               title.append("Unknown" + CommonConstants.NEW_LINE);
                        }
                        title.append(fileChart.getPid() + "(PID)"
                                        + CommonConstants.NEW_LINE + fileChart.getTid() + "(TID)");
index 13f2da4..40c159f 100644 (file)
@@ -197,7 +197,7 @@ public class FileDataMaker {
                                        filePath = splitPath[0];
                                        fd = Long.parseLong(splitPath[1]);
                                        FileEvent openEvent = null;
-                                       
+
                                        // filtering out non-target files that user in not interested
                                        if(accessedFilePathList.contains(filePath)) {
                                                // target file
@@ -266,7 +266,7 @@ public class FileDataMaker {
                                        }
                                        int entrySeq = profileData.getEntrySeq();
                                        if(entryMap.containsKey(entrySeq)) {
-                                               Logger.debug(">> syscall end :seq:" + seq + ", pid:" + pid
+                                               Logger.debug(">> syscall entrySeq:" + + entrySeq + "endseq:" + seq + ", pid:" + pid
                                                                + ", tid:" + tid + ", type:" + eventType);
                                                event = entryMap.get(entrySeq);
                                                switch(eventType) {