Setting : check connected device 27/27527/1
authorheeyoung <heeyoung1008.hwang@samsung.com>
Mon, 15 Sep 2014 10:45:33 +0000 (19:45 +0900)
committerheeyoung <heeyoung1008.hwang@samsung.com>
Mon, 15 Sep 2014 10:45:33 +0000 (19:45 +0900)
Change-Id: Ic3b727d062b4476d91b5eec952bc95189053ad9d
Signed-off-by: heeyoung <heeyoung1008.hwang@samsung.com>
org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/config/feature.csv
org.tizen.dynamicanalyzer.workbench/dynamic-analyzer/config/setting.csv
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/ConfigureLabels.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/nl/ConfigureLabels.properties
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/setting/SettingDataManager.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/setting/SettingDialogManager.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/toolbar/setting/TargetData.java

index 7f70ebc..fdbad42 100644 (file)
@@ -7,7 +7,7 @@ mobile2.3|System disk|1|System|Description : System disk|Timeline|Disk IO||||512
 mobile2.3|System network|1|System|Description : System network|Timeline|Network IO||||1024|1
 mobile2.3|System device|1|System|Description : System device|Timeline|Device||||2048|1
 mobile2.3|System energy|1|System|Description : System energy|Timeline|Energy||||4096|1
-mobile2.3|Function profiling|0||Description : Function Profiling|Timeline-Summary|||||524292|1
+mobile2.3|Function profiling|0||Description : Function Profiling|Timeline-Summary|||||4|1
 mobile2.3|Function sampling|0||Description : Function sampling|Summary|||||524288|1
 mobile2.3|Function profiling sampling periodic|2|Function sampling|Description : Function profiling sampling periodic|||1|1000|10||
 mobile2.3|Memory allocation|0||Description : Memory allocation|Timeline-Summary|Heap allocation||||8|1
@@ -20,19 +20,6 @@ mobile2.3|On scene transition|2|Screenshot|Description : On scene transition||||
 mobile2.3|periodically|2|Screenshot|Description : periodically|||1|100|10||
 mobile2.3|UI event|0||Description : UI event|Timeline|UI event||||256|1
 mobile2.3|Recording|0||Description : Recording||||||512|1
-mobile2.3|Context switch|0||Description : Context switch|Kernel|||||65536|1
-mobile2.3|System call|0||Description : System call|||||||
-mobile2.3|System call file|1|System call|Description : System call file|Timeline|||||1024|1
-mobile2.3|System call ipc|1|System call|Description : System call ipc|Timeline|||||2048|1
-mobile2.3|System call process|1|System call|Description : System call process|Timeline|||||4096|1
-mobile2.3|System call signal|1|System call|Description : System call signal|Timeline|||||8192|1
-mobile2.3|System call network|1|System call|Description : System call network|Timeline|||||16384|1
-mobile2.3|System call desc|1|System call|Description : System call desc|Timeline|||||32768|1
-mobile2.3|Include inside call memory|1|Memory allocation|Description : Include inside call memory|Timeline-Summary|Heap allocation||||268435456|1
-mobile2.3|Include inside call file|1|File analysis|Description : Include inside call file|File|||||536870912|1
-mobile2.3|Include inside call thread|1|Thread analysis|Description : Include inside call thread|Thread|||||1073741824|1
-mobile2.3|Include inside call network|1|Network analysis|Description : Include inside call network|Network|||||1|1
-mobile2.3|Include inside call openGL|1|OpenGL ES analysis|Description : Include inside call openGL|OpenGL|||||2|1
 tv|System|0||Description : System|||||||
 tv|System information sampling periodic|2|System|Description : System information sampling periodic|||10|1000|1000||
 tv|System CPU|1|System|Description : System CPU|Timeline|CPU-CPU core-CPU frequency||||16|1
@@ -42,7 +29,7 @@ tv|System disk|1|System|Description : System disk|Timeline|Disk IO||||512|1
 tv|System network|1|System|Description : System network|Timeline|Network IO||||1024|1
 tv|System device|1|System|Description : System device|Timeline|Device||||2048|1
 tv|System energy|1|System|Description : System energy|Timeline|Energy||||4096|1
-tv|Function profiling|0||Description : Function Profiling|Timeline-Summary|||||524292|1
+tv|Function profiling|0||Description : Function Profiling|Timeline-Summary|||||4|1
 tv|Function sampling|0||Description : Function sampling|Summary|||||524288|1
 tv|Function profiling sampling periodic|2|Function sampling|Description : Function profiling sampling periodic|||1|1000|10||
 tv|Memory allocation|0||Description : Memory allocation|Timeline-Summary|Heap allocation||||8|1
@@ -55,16 +42,3 @@ tv|On scene transition|2|Screenshot|Description : On scene transition|||||1||
 tv|periodically|2|Screenshot|Description : periodically|||1|100|10||
 tv|UI event|0||Description : UI event|Timeline|UI event||||256|1
 tv|Recording|0||Description : Recording||||||512|1
-tv|Context switch|0||Description : Context switch|Kernel|||||65536|1
-tv|System call|0||Description : System call|||||||
-tv|System call file|1|System call|Description : System call file|Timeline|||||1024|1
-tv|System call ipc|1|System call|Description : System call ipc|Timeline|||||2048|1
-tv|System call process|1|System call|Description : System call process|Timeline|||||4096|1
-tv|System call signal|1|System call|Description : System call signal|Timeline|||||8192|1
-tv|System call network|1|System call|Description : System call network|Timeline|||||16384|1
-tv|System call desc|1|System call|Description : System call desc|Timeline|||||32768|1
-tv|Include inside call memory|1|Memory allocation|Description : Include inside call memory|Timeline-Summary|Heap allocation||||268435456|1
-tv|Include inside call file|1|File analysis|Description : Include inside call file|File|||||536870912|1
-tv|Include inside call thread|1|Thread analysis|Description : Include inside call thread|Thread|||||1073741824|1
-tv|Include inside call network|1|Network analysis|Description : Include inside call network|Network|||||1|1
-tv|Include inside call openGL|1|OpenGL ES analysis|Description : Include inside call openGL|OpenGL|||||2|1
index ee7dcea..c75baa5 100644 (file)
@@ -1,10 +1,10 @@
 Target List|mobile2.3|tv
 Selected Target|mobile2.3
-Selected Chart List|CPU frequency|CPU|CPU core
+Selected Chart List|UI event
 Show Initial|false
 Auto Stop|false
-Selected Template|mobile2.3|Bottleneck
-Selected FeatureList|mobile2.3|System|System CPU|System processes|System information sampling periodic:1000|Function profiling|Function sampling|Function profiling sampling periodic:10
+Selected Template|mobile2.3|Custom
+Selected FeatureList|mobile2.3|File analysis
 Available Chart List|mobile2.3|CPU|CPU core|CPU frequency|Heap allocation|Process Size|Memory|Screenshot|Disk IO|Network IO|Energy
 Selected Template|tv|Bottleneck
 Selected FeatureList|tv|System|System CPU|System processes|System information sampling periodic:1000|Function profiling|Function sampling|Function profiling sampling periodic:10
index 6bbbbb4..78bf790 100644 (file)
@@ -151,6 +151,13 @@ public class ConfigureLabels extends NLS {
        public static String TEMPLATE_NAME_ENERGY;
        public static String TEMPLATE_NAME_CUSTOM;
 
+       public static String INSIDE_THE_PLATFORM;
+       public static String INSIDE_THE_PLATFORM_MEMORY;
+       public static String INSIDE_THE_PLATFORM_FILE;
+       public static String INSIDE_THE_PLATFORM_THREAD;
+       public static String INSIDE_THE_PLATFORM_NETWORK;
+       public static String INSIDE_THE_PLATFORM_OPENGL;
+       
        public static String PAGE_NAME_TIME_LINE;
        public static String PAGE_NAME_SUMMARY;
        public static String PAGE_NAME_FILE;
index 36b88a4..3465279 100644 (file)
@@ -79,6 +79,14 @@ INCLUDE_INSIDE_CALL_FILE=Include inside call file
 INCLUDE_INSIDE_CALL_NETWORK=Include inside call network
 INCLUDE_INSIDE_CALL_UI=Include inside call ui
 INCLUDE_INSIDE_OPENGL=Include inside call openGL
+
+INSIDE_THE_PLATFORM=Inside the platform
+INSIDE_THE_PLATFORM_MEMORY=Inside the platform memory
+INSIDE_THE_PLATFORM_FILE=Inside the platform file
+INSIDE_THE_PLATFORM_THREAD=Inside the platform thread
+INSIDE_THE_PLATFORM_NETWORK=Inside the platform network
+INSIDE_THE_PLATFORM_OPENGL=Inside the platform openGL
+
 SNAPSHOT_PERIODIC=Snapshot periodic
 FUNCTION_PROFILING_SAMPLING_PERIODIC=Function profiling sampling periodic
 SYSTEM_INFOMATION_SAMPLING_PERIODIC=System information sampling periodic
index 7cb22f3..386188a 100644 (file)
@@ -40,6 +40,9 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
+import org.tizen.common.core.application.ProfileInfo;
+import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
+import org.tizen.dynamicanalyzer.common.GlobalInformation;
 import org.tizen.dynamicanalyzer.common.path.PathManager;
 import org.tizen.dynamicanalyzer.communicator.DACommunicator;
 import org.tizen.dynamicanalyzer.constant.CommonConstants;
@@ -47,6 +50,7 @@ import org.tizen.dynamicanalyzer.model.DeviceInfo;
 import org.tizen.dynamicanalyzer.nl.ConfigureLabels;
 import org.tizen.dynamicanalyzer.util.CommonUtil;
 import org.tizen.dynamicanalyzer.util.Logger;
+import org.tizen.sdblib.IDevice;
 
 public class SettingDataManager {
        
@@ -324,14 +328,21 @@ public class SettingDataManager {
        }
        
        public TargetData getConnectedTarget() {
-               // TODO : check connected target
+               // check connected target
                Map<String, TargetData> map = getTargetListMap();
-//             if () {
-//                     
-//             } else {
-                       return map.get(selectedTarget);
-//             }
-//             return null;
+               DeviceInfo currentDevice = GlobalInformation.getCurrentDeviceInfo();
+
+               if (currentDevice != null) {
+                       IDevice device = currentDevice.getIDevice();
+                       String profileName = ProfileInfo.getPlatformName(device).
+                                       replace(CommonConstants.DASH, CommonConstants.EMPTY);
+                       
+                       if (isTarget(profileName)) {
+                               map.get(profileName);
+                       }
+               }
+               
+               return map.get(selectedTarget);
        }
        
        public TargetData getTarget(String targetName) {
@@ -514,14 +525,13 @@ public class SettingDataManager {
                return state;
        }
        
+       
        public long getConfiguration(DeviceInfo devInfo) {
                TargetData target = SettingDataManager.getInstance().getConnectedTarget();
                long state = 0;
 
                state |= target.getSelectedFeatureSwapValue(ConfigureLabels.FEATURE_FUNCTION_PROFILING);
-//             if (target.getSelectedFeatureSwapValue(ConfigureLabels.FEATURE_FUNCTION_PROFILING) > 0) {
-                       state |= target.getSelectedFeatureSwapValue(ConfigureLabels.FEATURE_FUNCTION_SAMPLING);
-//             }
+               state |= target.getSelectedFeatureSwapValue(ConfigureLabels.FEATURE_FUNCTION_SAMPLING);
                state |= target.getSelectedFeatureSwapValue(ConfigureLabels.FEATURE_MEMORY_ALLOCATION);
                state |= target.getSelectedFeatureSwapValue(ConfigureLabels.FEATURE_FILE);
                state |= target.getSelectedFeatureSwapValue(ConfigureLabels.FEATURE_THREAD);
@@ -532,7 +542,6 @@ public class SettingDataManager {
                state |= target.getSelectedFeatureSwapValue(ConfigureLabels.FEATURE_RECORDING);
 
                if (DACommunicator.isSWAPVersion(devInfo)) {
-                       state |= target.getSelectedFeatureSwapValue(ConfigureLabels.FEATURE_SYSCALL_FILE);
                        state |= target.getSelectedFeatureSwapValue(ConfigureLabels.FEATURE_SYSCALL_IPC);
                        state |= target.getSelectedFeatureSwapValue(ConfigureLabels.FEATURE_SYSCALL_PROCESS);
                        state |= target.getSelectedFeatureSwapValue(ConfigureLabels.FEATURE_SYSCALL_SIGNAL);
@@ -545,8 +554,12 @@ public class SettingDataManager {
                        state |= target.getSelectedFeatureSwapValue(ConfigureLabels.INCLUDE_INSIDE_CALL_THREAD);
                        state |= target.getSelectedFeatureSwapValue(ConfigureLabels.INCLUDE_INSIDE_CALL_FILE);
                        state |= target.getSelectedFeatureSwapValue(ConfigureLabels.INCLUDE_INSIDE_CALL_UI);
+                       
+                       if ((target.isSelectedFeature(ConfigureLabels.FEATURE_FILE) 
+                                       || (target.isSelectedFeature(ConfigureLabels.FEATURE_SYSCALL_FILE)))) {
+                               state |= AnalyzerConstants.FEATURE_SYSCALL_FILE;
+                       }
                }
-               Logger.debug("getConfiguration() : " + state);
                return state;
        }
        
@@ -554,20 +567,22 @@ public class SettingDataManager {
                TargetData target = SettingDataManager.getInstance().getConnectedTarget();
                long state = 0;
                if (DACommunicator.isSWAPVersion(devInfo)) {
-                       // TODO: check FEATURE_SYSTEM_THREAD
                        state |= target.getSelectedFeatureSwapValue(ConfigureLabels.INCLUDE_INSIDE_CALL_NETWORK);
                        state |= target.getSelectedFeatureSwapValue(ConfigureLabels.INCLUDE_INSIDE_OPENGL);
                        state |= target.getSelectedFeatureSwapValue(ConfigureLabels.FEATURE_SYSTEM_CPU);
                        state |= target.getSelectedFeatureSwapValue(ConfigureLabels.FEATURE_SYSTEM_PROCESSES);
                        state |= target.getSelectedFeatureSwapValue(ConfigureLabels.FEATURE_SYSTEM_MEMORY);
                        state |= target.getSelectedFeatureSwapValue(ConfigureLabels.FEATURE_SYSTEM_DISK);
-//                     state |= target.getSelectedFeatureSwapValue(ConfigureLabels.FEATURE_SYSTEM_FD);
-                       state |= target.getSelectedFeatureSwapValue(ConfigureLabels.FEATURE_SYSTEM_THREAD);
+//                     state |= target.getSelectedFeatureSwapValue(ConfigureLabels.FEATURE_SYSTEM_FD);                 
+//                     state |= target.getSelectedFeatureSwapValue(ConfigureLabels.FEATURE_SYSTEM_THREAD);
                        state |= target.getSelectedFeatureSwapValue(ConfigureLabels.FEATURE_SYSTEM_NETWORK);
                        state |= target.getSelectedFeatureSwapValue(ConfigureLabels.FEATURE_SYSTEM_DEVICE);
                        state |= target.getSelectedFeatureSwapValue(ConfigureLabels.FEATURE_SYSTEM_ENERGY);
+                       
+                       if (target.isSelectedFeature(ConfigureLabels.FEATURE_THREAD)) {
+                               state |= AnalyzerConstants.SYSTEM_THREAD_LOAD;
+                       }
                }
-               Logger.debug("getPreConfiguration() : " + state);
                return state;
        }
 }
index 73d3e84..61b8e4c 100644 (file)
@@ -132,7 +132,6 @@ public class SettingDialogManager {
                List<FeatureValueData> list = new ArrayList<FeatureValueData>();
                FeatureValueData featureValue = null;
                
-               // TODO: check setFeaturesSwapValue() (Thread feature)
                for (int i = 0; i < table.getItemCount(); i++) {
                        String featureName = table.getItem(i).getText(0);
                        String optionText = table.getItem(i).getText(1);
index 22c5ad3..6d0396e 100644 (file)
@@ -280,10 +280,8 @@ public class TargetData {
                List<FeatureValueData> selectedFeatures = getSelectedFeatureList();
                FeatureValueData feature = getFeatureValueData(selectedFeatures, featureName);
                if (feature == null) {
-//                     Logger.debug("getSelectedFeatureValue() : " + featureName + " is not selected");
                        return -1;
                }
-//             Logger.debug("getSelectedFeatureValue() : " + featureName + ", " + feature.getValue());
                return feature.getValue();
        }
        
@@ -298,10 +296,8 @@ public class TargetData {
                if (isSelectedFeature(featureName) == true) {
                        Map<String, FeatureData> map = getAvailableFeatureListMap();
                        FeatureData feature = map.get(featureName);
-//                     Logger.debug("getSelectedFeatureSwapValue() : "  + featureName + ", " +  feature.getSwapValue());
                        return feature.getSwapValue();
                }
-//             Logger.debug("getSelectedFeatureSwapValue() : " + featureName + " is not selected");
                return AnalyzerConstants.FEATURE_OFF;
        }