[Title] OpenGL exception fixed
authorjooyoul_lee <jy.exe.lee@samsung.com>
Fri, 3 Jan 2014 03:58:12 +0000 (12:58 +0900)
committerjooyoul_lee <jy.exe.lee@samsung.com>
Fri, 3 Jan 2014 03:58:12 +0000 (12:58 +0900)
[Desc.]
[Issue]

org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/logparser/LogInserter.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/sql/DBTableManager.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/sql/SqlManager.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/swap/logparser/SWAPLogParser.java
org.tizen.dynamicanalyzer/src/org/tizen/dynamicanalyzer/ui/opengl/ui/apiList/GLAPIListTable.java

index 38497a4..5f595dc 100644 (file)
@@ -37,6 +37,7 @@ import org.tizen.dynamicanalyzer.swap.logparser.LogPackage;
 import org.tizen.dynamicanalyzer.swap.logparser.Logs;
 import org.tizen.dynamicanalyzer.swap.model.data.LogData;
 import org.tizen.dynamicanalyzer.swap.model.data.LogDataFactory;
+import org.tizen.dynamicanalyzer.swap.model.data.ProfileData;
 
 /** log insert into database **/
 public class LogInserter implements Runnable {
index a47b912..bdd99d2 100755 (executable)
@@ -348,6 +348,10 @@ public class DBTableManager {
                                        types[i] = "VARCHAR(20000)";
                                } else if (i == GLContextDBEnum.TEXTURE_OBJ_MIN_FUNC.ordinal()) {
                                        types[i] = "VARCHAR(20000)";
+                               }else if (i == GLContextDBEnum.TEXTURE_UNIT_2D.ordinal()) {
+                                       types[i] = "VARCHAR(2000)";
+                               }else if (i == GLContextDBEnum.TEXTURE_UNIT_CUBE.ordinal()) {
+                                       types[i] = "VARCHAR(2000)";
                                } else {
                                        types[i] = TEXT;
                                }
index 06ea473..14827fc 100755 (executable)
@@ -514,6 +514,7 @@ public class SqlManager {
                                        prep.setString(j + 1, rowData.get(j));
                                }
                                prep.addBatch();
+                               
                        }
                        if (dataRowSize > 0) {
                                conn.setAutoCommit(false);
@@ -521,7 +522,6 @@ public class SqlManager {
                                conn.setAutoCommit(true);
                        }
                } catch (SQLException e) {
-                       System.out.println("[Error insert] query = " + query);
                        e.printStackTrace();
                } finally {
                        if (null != prep) {
index 897a102..feec0f1 100755 (executable)
@@ -133,7 +133,6 @@ public class SWAPLogParser implements Runnable {
        private void logSlicing(List<LogData> logLumb) {
                int size = logLumb.size();
                LogPackage logPack = new LogPackage();
-               // System.out.println(" log lumb size " + size);
                for (int i = 0; i < size; i++) {
                        if (null == logLumb.get(i)) {
                                continue;
@@ -151,20 +150,20 @@ public class SWAPLogParser implements Runnable {
                                if (id != DataChannelConstants.MSG_DATA_SAMPLE) {
                                        ProfileData pData = (ProfileData) log;
                                        long pcAddr = pData.getPcAddr();
-                                       
+
                                        String apiName = pData.getApiName();
                                        if (null == apiName || apiName.isEmpty()
                                                        || apiName.equals("_end")) { //$NON-NLS-1$
                                                apiName = AnalyzerUtil.getFuncName(pData);
-                                               if (apiName == null || apiName.equals("<unknown function>")) {
+                                               if (apiName == null
+                                                               || apiName.equals("<unknown function>")) {
                                                        // necessary? pData.setApiName(apiName);
                                                        continue;
                                                } else {
                                                        pData.setApiName(apiName);
                                                }
                                        }
-                                       
-                       //              System.out.println("api name : " + apiName + "    time : " + pData.getTime());
+
                                        if (isDropCallTraceLog()) {
                                                apiName = pData.getApiName();
                                                if (apiName.contains(OSP_MAIN)) {
@@ -173,6 +172,7 @@ public class SWAPLogParser implements Runnable {
                                                        continue;
                                                }
                                        }
+
                                        // irregular call check still necessary?
                                        if (AnalyzerManager.getCallstackManager()
                                                        .isIrregularUserCall(pData)) {
@@ -196,16 +196,17 @@ public class SWAPLogParser implements Runnable {
                                        // + "   base addr : "
                                        // + AnalyzerUtil.toHexdecimal(processInfo
                                        // .getLowestAddress()));
-
+                                       
                                        pushLog(log, logPack);
-
                                        if (pcAddr >= processInfo.getLowestAddress()
                                                        && pcAddr <= processInfo.getHighestAddress()) {
                                                /* user callstack create by entry and exit */
                                                AnalyzerManager.getCallstackManager()
-                                                               .makeUserCallstack(pData,
+                                                               .makeUserCallstack(
+                                                                               pData,
                                                                                FunctionUsageProfiler.getInstance()
-                                                                                       .getProfileDataMakerByPid(pData.getPid()));
+                                                                                               .getProfileDataMakerByPid(
+                                                                                                               pData.getPid()));
                                        } else {
                                                AnalyzerManager.getCallstackManager()
                                                                .makeCallstackWithoutBacktrace(pData);
@@ -227,20 +228,21 @@ public class SWAPLogParser implements Runnable {
                                if (log instanceof ScreenShotData) {
                                        boolean bECS = false;
                                        String remoteImgPath;
-                                       if(DACommunicator.isTargetEmulator() 
+                                       if (DACommunicator.isTargetEmulator()
                                                        && SocketClient.getInstance().isConnected()) {
-                                               DACommunicator.getSelectedDevice().emulatorSnapshot.send();
-                                               remoteImgPath = DACommunicator.getSelectedDevice()
-                                                               .emulatorSnapshot.getFilePath(); 
+                                               DACommunicator.getSelectedDevice().emulatorSnapshot
+                                                               .send();
+                                               remoteImgPath = DACommunicator.getSelectedDevice().emulatorSnapshot
+                                                               .getFilePath();
                                                bECS = true;
                                        } else {
                                                remoteImgPath = ((ScreenShotData) log)
-                                                               .getImageFilePath();                                            
+                                                               .getImageFilePath();
                                        }
 
                                        int rotate = ((ScreenShotData) log).getOrientation();
                                        // TODO : fix
-                                       if(bECS) {
+                                       if (bECS) {
                                                processImagefromECS(remoteImgPath, rotate);
                                        } else {
                                                processImage(remoteImgPath, rotate);
@@ -375,7 +377,7 @@ public class SWAPLogParser implements Runnable {
                }, AnalyzerConstants.MESSAGE_INTERNAL_IMAGE_THREAD).start();
 
        }
-       
+
        private String getImageName(String fullPath) {
                String name = null;
                name = fullPath
index 69455f7..7d74c0b 100644 (file)
@@ -60,6 +60,7 @@ import org.tizen.dynamicanalyzer.ui.widgets.ViewContainer;
 import org.tizen.dynamicanalyzer.ui.widgets.table.DAApiListTableComposite;
 import org.tizen.dynamicanalyzer.ui.widgets.table.DATableDataFormat;
 import org.tizen.dynamicanalyzer.utils.Formatter;
+import org.tizen.dynamicanalyzer.widgets.button.DACustomButton;
 
 public class GLAPIListTable extends DAApiListTableComposite {
        private static String EMPTY = "";
@@ -162,7 +163,7 @@ public class GLAPIListTable extends DAApiListTableComposite {
                table.setSelection(0);
 
                GridItem[] items = table.getSelection();
-               if (items == null) {
+               if (items == null || items.length == 0 ) {
                        return;
                }