public final static int FLOAT_SIZE = Float.SIZE / Byte.SIZE;
public final static int DOUBLE_SIZE = Double.SIZE / Byte.SIZE;
- /* Tab Page */
- public static final int PAGE_TIME_LINE = 0;
- public static final int PAGE_THREAD = 1;
- public static final int PAGE_NETWORK = 2;
- public static final int PAGE_FILE = 3;
- public static final int PAGE_GRAPHICS = 4;
- public static final int PAGE_UI = 5;
- public static final int PAGE_KERNEL = 6;
- public static final int PAGE_SUMMARY = 7;
- public static final int PAGE_RANGE = 8;
-
}
public static final int PROJECT_PROF_START_TIME_INDEX = 8;
public static final int PROJECT_SAVE_PATH_INDEX = 9;
+ /* Tab Page */
+ public static final int PAGE_TIME_LINE = 0;
+ public static final int PAGE_THREAD = 1;
+ public static final int PAGE_NETWORK = 2;
+ public static final int PAGE_FILE = 3;
+ public static final int PAGE_GRAPHICS = 4;
+ public static final int PAGE_UI = 5;
+ public static final int PAGE_KERNEL = 6;
+ public static final int PAGE_SUMMARY = 7;
+ public static final int PAGE_RANGE = 8;
/* save return values */
public static final int ERROR_EXTENSION_FAIL = -1;
Logger.debug("auto start : " + appid);
DeviceInfo device = DACommunicator.getDeviceByName(deviceName);
- GlobalInformation.setCurrentDeviceInfo(device);
+ Global.setCurrentDeviceInfo(device);
PackageInfo pkgInfo = DACommunicator.getPkgInfoByMainAppID(appid);
if (null == pkgInfo) {
// This class is for global information that can be accessed from anywhere in dynamic analyzer code.
// So this class contains only static methods and variables.
-public class GlobalInformation {
+public class Global {
private static DeviceInfo currentDevice = null;
private static PackageInfo currentApplication = null;
private static Project currentProject = null;
import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
import org.tizen.dynamicanalyzer.common.AnalyzerManager;
import org.tizen.dynamicanalyzer.common.AnalyzerShellCommands;
-import org.tizen.dynamicanalyzer.common.GlobalInformation;
+import org.tizen.dynamicanalyzer.common.Global;
import org.tizen.dynamicanalyzer.common.HostResult;
import org.tizen.dynamicanalyzer.constant.CommonConstants;
import org.tizen.dynamicanalyzer.model.DeviceInfo;
isArm = 1;
}
- DeviceInfo device = GlobalInformation.getCurrentDeviceInfo();
+ DeviceInfo device = Global.getCurrentDeviceInfo();
if (device == null) {
return HostResult.ERR_DEVICE_IS_NULL;
}
isEmul = 1;
}
- PackageInfo pkg = GlobalInformation.getCurrentApplication();
+ PackageInfo pkg = Global.getCurrentApplication();
if (null == pkg) {
return HostResult.ERR_SELECTED_APP_IS_NULL;
}
.execCommand(AnalyzerShellCommands.DACOMMAND_RUN_MANAGER);
// step 3. get remote port from /tmp/port.da in device or emul
- remotePort = CommunicatorUtils.getRemotePort(GlobalInformation
+ remotePort = CommunicatorUtils.getRemotePort(Global
.getCurrentDeviceInfo().getIDevice());
if (remotePort < 0) {
return HostResult.ERR_REMOTE_PORT_GET_FAILED;
import org.tizen.common.sdb.command.SdbCommand;
import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
import org.tizen.dynamicanalyzer.common.AnalyzerShellCommands;
-import org.tizen.dynamicanalyzer.common.GlobalInformation;
+import org.tizen.dynamicanalyzer.common.Global;
import org.tizen.dynamicanalyzer.common.HostResult;
import org.tizen.dynamicanalyzer.common.path.PathConstants;
import org.tizen.dynamicanalyzer.common.path.PathManager;
return HostResult.ERR_FILE_IS_NOT_EXISTS;
}
- result = uploadFile(GlobalInformation.getCurrentDeviceInfo()
+ result = uploadFile(Global.getCurrentDeviceInfo()
.getIDevice(), source, PathConstants.DA_REMOTE_PATH
+ AnalyzerConstants.READELF_BIN);
if (!result.isSuccess()) {
public static void execShellCommand(String command,
IShellOutputReceiver receiver) {
- DeviceInfo currentDevice = GlobalInformation.getCurrentDeviceInfo();
+ DeviceInfo currentDevice = Global.getCurrentDeviceInfo();
if (null != currentDevice && isOnline(currentDevice.getIDevice())) {
try {
currentDevice.getIDevice().executeShellCommand(command,
public static SyncResult pull(String remote, String local,
ISyncProgressMonitor monitor) {
SyncResult result = null;
- DeviceInfo currentDevice = GlobalInformation.getCurrentDeviceInfo();
+ DeviceInfo currentDevice = Global.getCurrentDeviceInfo();
if (null != currentDevice && isOnline(currentDevice.getIDevice())) {
FileOutputStream fileOut = null;
try {
}
public static HostResult foward(int local, int remote) {
- DeviceInfo currentDevice = GlobalInformation.getCurrentDeviceInfo();
+ DeviceInfo currentDevice = Global.getCurrentDeviceInfo();
return foward(currentDevice.getIDevice(), local, remote);
}
public static void unfoward(int local, int remote) {
- DeviceInfo currentDevice = GlobalInformation.getCurrentDeviceInfo();
+ DeviceInfo currentDevice = Global.getCurrentDeviceInfo();
unfoward(currentDevice.getIDevice(), local, remote);
}
}
public static void removeCommand(String path) {
- DeviceInfo currentDevice = GlobalInformation.getCurrentDeviceInfo();
+ DeviceInfo currentDevice = Global.getCurrentDeviceInfo();
if (null != currentDevice && isOnline(currentDevice.getIDevice())) {
try {
currentDevice.getIDevice().executeShellCommand(
public static void execHostCommand(String command,
IShellOutputReceiver receiver) {
- DeviceInfo currentDevice = GlobalInformation.getCurrentDeviceInfo();
+ DeviceInfo currentDevice = Global.getCurrentDeviceInfo();
if (null != currentDevice && isOnline(currentDevice.getIDevice())) {
try {
currentDevice.getIDevice()
}
public static Process execCommand(String command) {
- DeviceInfo currentDevice = GlobalInformation.getCurrentDeviceInfo();
+ DeviceInfo currentDevice = Global.getCurrentDeviceInfo();
if (null != currentDevice) {
return execCommand(currentDevice.getIDevice(), command);
}
import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
import org.tizen.dynamicanalyzer.common.AnalyzerManager;
import org.tizen.dynamicanalyzer.common.AnalyzerShellCommands;
-import org.tizen.dynamicanalyzer.common.GlobalInformation;
+import org.tizen.dynamicanalyzer.common.Global;
import org.tizen.dynamicanalyzer.common.HostResult;
import org.tizen.dynamicanalyzer.common.path.PathConstants;
import org.tizen.dynamicanalyzer.common.path.PathManager;
}
public static HostResult startTrace() {
- return GlobalInformation.getCurrentDeviceInfo().getCommunicator().startTrace();
+ return Global.getCurrentDeviceInfo().getCommunicator().startTrace();
}
public static HostResult sendRuntimeMessage(int type, String message) {
- return GlobalInformation.getCurrentDeviceInfo().sendRuntimeMessage(type, message);
+ return Global.getCurrentDeviceInfo().sendRuntimeMessage(type, message);
}
public static HostResult stopTrace() {
- return GlobalInformation.getCurrentDeviceInfo().getCommunicator().stopTrace();
+ return Global.getCurrentDeviceInfo().getCommunicator().stopTrace();
}
public static void exit() {
- GlobalInformation.getCurrentDeviceInfo().getCommunicator().exit();
+ Global.getCurrentDeviceInfo().getCommunicator().exit();
}
public static void reload() {
}
public static PackageInfo getSelectedPackage() {
- return GlobalInformation.getCurrentDeviceInfo().getPackageInfoHash()
- .get(GlobalInformation.getCurrentApplication().getPackageId());
+ return Global.getCurrentDeviceInfo().getPackageInfoHash()
+ .get(Global.getCurrentApplication().getPackageId());
}
public static void setNewBridge() {
}
public static Map<String, PackageInfo> getAppListFromTarget() {
- DeviceInfo curDev = GlobalInformation.getCurrentDeviceInfo();
+ DeviceInfo curDev = Global.getCurrentDeviceInfo();
if (curDev == null) {
return null;
}
}
public static Map<Integer, String> getProcessListFromTarget() {
- if (null == GlobalInformation.getCurrentDeviceInfo()) {
+ if (null == Global.getCurrentDeviceInfo()) {
return null;
}
}
public static String getProcessNameFromTarget(int pid) {
- if (null == GlobalInformation.getCurrentDeviceInfo()) {
+ if (null == Global.getCurrentDeviceInfo()) {
return null;
}
String processName = null;
}
public static PackageInfo getPkgInfoByMainAppID(String appid) {
- DeviceInfo curDev = GlobalInformation.getCurrentDeviceInfo();
+ DeviceInfo curDev = Global.getCurrentDeviceInfo();
if (null != curDev) {
Map<String, PackageInfo> pkgHash = curDev.getPackageInfoHash();
}
public static PackageInfo getPkgInfoByLabel(String appLabel) {
- DeviceInfo curDev = GlobalInformation.getCurrentDeviceInfo();
+ DeviceInfo curDev = Global.getCurrentDeviceInfo();
if (null != curDev) {
Map<String, PackageInfo> pkgHash = curDev.getPackageInfoHash();
}
public static PackageInfo getPkgInfoByPkgId(String pkgid) {
- if (null != GlobalInformation.getCurrentDeviceInfo()) {
- return GlobalInformation.getCurrentDeviceInfo().getPackageInfoHash().get(pkgid);
+ if (null != Global.getCurrentDeviceInfo()) {
+ return Global.getCurrentDeviceInfo().getPackageInfoHash().get(pkgid);
} else {
return null;
}
}
public static boolean isTargetEmulator() {
- DeviceInfo device = GlobalInformation.getCurrentDeviceInfo();
+ DeviceInfo device = Global.getCurrentDeviceInfo();
if (device != null) {
if (device.getIDevice().getSerialNumber().contains(CommonConstants.EMULATOR)) {
return true;
Logger.debug("device disconnected : " + device.getSerialNumber());
DeviceInfo deviceInfo = getDeviceByName(device.getSerialNumber());
- DeviceInfo selectedDevice = GlobalInformation.getCurrentDeviceInfo();
+ DeviceInfo selectedDevice = Global.getCurrentDeviceInfo();
if (null != devices && !devices.isEmpty()) {
devices.remove(deviceInfo);
if (!AnalyzerManager.isRunning()) {
updateToolbarDevice();
}
}
- if (null != GlobalInformation.getCurrentDeviceInfo()
- && null != GlobalInformation.getCurrentApplication()) {
+ if (null != Global.getCurrentDeviceInfo()
+ && null != Global.getCurrentApplication()) {
Display.getDefault().syncExec(new Runnable() {
@Override
public void run() {
updateToolbarDevice();
}
}
- if (null != GlobalInformation.getCurrentDeviceInfo()
- && null != GlobalInformation.getCurrentApplication()) {
+ if (null != Global.getCurrentDeviceInfo()
+ && null != Global.getCurrentApplication()) {
Display.getDefault().syncExec(new Runnable() {
@Override
public void run() {
public static void updateToolbarDevice() {
final List<String> deviceSerials = new ArrayList<String>();
final String selectedDevice;
- DeviceInfo selDev = GlobalInformation.getCurrentDeviceInfo();
+ DeviceInfo selDev = Global.getCurrentDeviceInfo();
if (selDev != null) {
selectedDevice = selDev.getIDevice().getSerialNumber();
} else {
}
}
if (!devices.isEmpty()) {
- GlobalInformation.setCurrentDeviceInfo(devices.get(selIndex));
+ Global.setCurrentDeviceInfo(devices.get(selIndex));
} else {
clearDeviceAppInfo();
}
}
private static void clearDeviceAppInfo() {
- GlobalInformation.setCurrentDeviceInfo(null);
- GlobalInformation.setCurrentApplication(null);
+ Global.setCurrentDeviceInfo(null);
+ Global.setCurrentApplication(null);
cmdResultMultiLines.clear();
}
public static DeviceInfo setSelectedDeviceBySerial(String serial) {
DeviceInfo dev = null;
if (null == serial || serial.isEmpty()) {
- GlobalInformation.setCurrentDeviceInfo(null);
+ Global.setCurrentDeviceInfo(null);
} else {
int size = getDevices().size();
for (int i = 0; i < size; i++) {
if (null != idev) {
if (serial.equals(idev.getSerialNumber())) {
dev = devices.get(i);
- GlobalInformation.setCurrentDeviceInfo(dev);
+ Global.setCurrentDeviceInfo(dev);
break;
}
}
// }
public static boolean isWaitToReceive() {
- return GlobalInformation.getCurrentDeviceInfo().getCommunicator().isBlocked();
+ return Global.getCurrentDeviceInfo().getCommunicator().isBlocked();
}
public static BufferedReader getSockBufferedReader() {
- return GlobalInformation.getCurrentDeviceInfo().getCommunicator().getDataBufferedReader();
+ return Global.getCurrentDeviceInfo().getCommunicator().getDataBufferedReader();
}
public static void closeAll() {
- GlobalInformation.getCurrentDeviceInfo().getCommunicator().clear();
+ Global.getCurrentDeviceInfo().getCommunicator().clear();
}
public static void closeSock() {
- GlobalInformation.getCurrentDeviceInfo().getCommunicator().closeSock();
+ Global.getCurrentDeviceInfo().getCommunicator().closeSock();
}
public static HostResult handleControlMessage(String msg) {
- return GlobalInformation.getCurrentDeviceInfo().getCommunicator().handleControlMessage(msg);
+ return Global.getCurrentDeviceInfo().getCommunicator().handleControlMessage(msg);
}
public static Map<Integer, String> sendProcessAddInfoMessage(List<Integer> pids) {
- DeviceInfo dev = GlobalInformation.getCurrentDeviceInfo();
+ DeviceInfo dev = Global.getCurrentDeviceInfo();
if (dev != null) {
if (isSWAPVersion()) {
return ((Communicator30) dev.getCommunicator()).sendProcessAddInfoMessage(pids);
public static HostResult sendBinaryInfoMessageForLib(List<BinarySettingData> input) {
if (isSWAPVersion()) {
- return ((Communicator30) GlobalInformation.getCurrentDeviceInfo().getCommunicator())
+ return ((Communicator30) Global.getCurrentDeviceInfo().getCommunicator())
.sendBinaryInfoMessageForLib(input);
}
return null;
public static HostResult sendSWAPMessage(int messageId, List<BinarySettingData> input) {
if (isSWAPVersion()) {
- return ((Communicator30) GlobalInformation.getCurrentDeviceInfo().getCommunicator())
+ return ((Communicator30) Global.getCurrentDeviceInfo().getCommunicator())
.sendSWAPMessage(messageId, input);
}
return null;
public static HostResult sendScreenShotMessage() {
if (isSWAPVersion()) {
- return ((Communicator30) GlobalInformation.getCurrentDeviceInfo().getCommunicator())
+ return ((Communicator30) Global.getCurrentDeviceInfo().getCommunicator())
.sendScreenShotRequest();
}
return null;
}
public static Socket getDataSocket() {
- return GlobalInformation.getCurrentDeviceInfo().getCommunicator().getDataSocket();
+ return Global.getCurrentDeviceInfo().getCommunicator().getDataSocket();
}
public static String getTargetVersion(DeviceInfo device) {
}
public static boolean isSWAPVersion() {
- if (GlobalInformation.getCurrentDeviceInfo().getTargetVersion().contains("3.0")) {
+ if (Global.getCurrentDeviceInfo().getTargetVersion().contains("3.0")) {
return true;
} else {
return false;
import org.eclipse.swt.widgets.Shell;
import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
import org.tizen.dynamicanalyzer.common.AnalyzerManager;
-import org.tizen.dynamicanalyzer.common.GlobalInformation;
+import org.tizen.dynamicanalyzer.common.Global;
import org.tizen.dynamicanalyzer.common.path.PathManager;
import org.tizen.dynamicanalyzer.constant.CommonConstants;
import org.tizen.dynamicanalyzer.model.DeviceInfo;
Logger.debug("auto start : " + binaryOfTarget);
DeviceInfo device = DACommunicator.getDeviceByName(deviceName);
- GlobalInformation.setCurrentDeviceInfo(device);
+ Global.setCurrentDeviceInfo(device);
DACommunicator.getAppListFromTarget();
PackageInfo pkgInfo = null;
import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
import org.tizen.dynamicanalyzer.common.AnalyzerManager;
-import org.tizen.dynamicanalyzer.common.GlobalInformation;
+import org.tizen.dynamicanalyzer.common.Global;
import org.tizen.dynamicanalyzer.common.path.PathConstants;
import org.tizen.dynamicanalyzer.common.path.PathManager;
import org.tizen.dynamicanalyzer.communicator.DACommunicator;
// this initForTrace() function called only when trace is started.
public void initForTrace() {
- if (null == GlobalInformation.getCurrentApplication()) {
+ if (null == Global.getCurrentApplication()) {
String comboText = ToolbarArea.getInstance().getAppCombo().getText();
PackageInfo pkgInfo = DACommunicator.getPkgInfoByLabel(comboText);
- GlobalInformation.setCurrentApplication(pkgInfo);
- GlobalInformation.getCurrentDeviceInfo().getCommunicator().onAppSelected(pkgInfo);
+ Global.setCurrentApplication(pkgInfo);
+ Global.getCurrentDeviceInfo().getCommunicator().onAppSelected(pkgInfo);
}
- setProtocolVersion(GlobalInformation.getCurrentDeviceInfo().getTargetVersion());
+ setProtocolVersion(Global.getCurrentDeviceInfo().getTargetVersion());
- setDeviceStatusInfo(GlobalInformation.getCurrentDeviceInfo().getDeviceStatusInfo());
- setApplicationInfo(GlobalInformation.getCurrentApplication().getMainApp());
- RunTimeConfiguration currentConfig = GlobalInformation.getCurrentConfiguration();
+ setDeviceStatusInfo(Global.getCurrentDeviceInfo().getDeviceStatusInfo());
+ setApplicationInfo(Global.getCurrentApplication().getMainApp());
+ RunTimeConfiguration currentConfig = Global.getCurrentConfiguration();
if (currentConfig != null) {
addConfigHistory(currentConfig);
}
- setAppName(GlobalInformation.getCurrentApplication().getMainApp()
+ setAppName(Global.getCurrentApplication().getMainApp()
.getInfo(AppInfo.PROPERTY.LABEL.index));
- setPackageID(GlobalInformation.getCurrentApplication().getPackageId());
- DeviceInfo deviceName = GlobalInformation.getCurrentDeviceInfo();
+ setPackageID(Global.getCurrentApplication().getPackageId());
+ DeviceInfo deviceName = Global.getCurrentDeviceInfo();
if (null != deviceName && null != deviceName.getIDevice().getSerialNumber()
&& !deviceName.getIDevice().getSerialNumber().isEmpty()) {
- setDevice(GlobalInformation.getCurrentDeviceInfo().getIDevice().getSerialNumber());
+ setDevice(Global.getCurrentDeviceInfo().getIDevice().getSerialNumber());
} else {
setDevice(CommonConstants.SPACE);
}
DBTableRegistry.createDBTables();
SqlManager.getInstance().createTables();
- SqlManager.getInstance().createProbeTable();
}
public void dispose() {
import org.tizen.dynamicanalyzer.project.Project;
import org.tizen.dynamicanalyzer.swap.model.data.LogData;
import org.tizen.dynamicanalyzer.swap.model.data.LogDataFactory;
-import org.tizen.dynamicanalyzer.swap.model.format.LogFormat;
import org.tizen.dynamicanalyzer.util.CommonUtil;
import org.tizen.dynamicanalyzer.util.Logger;
instance = null;
}
- public synchronized void createProbeTable() {
- Statement stat = null;
- try {
- Connection conn = getConnection();
- if (null == conn) {
- return;
- }
-
- List<LogFormat> logFormats = LogFormat.getLogFormats();
- int size = logFormats.size();
- semaphoreAcquire();
- stat = conn.createStatement();
- for (int i = 0; i < size; i++) {
- if (AnalyzerManager.isExit()) {
- break;
- }
- LogFormat lf = logFormats.get(i);
- String tableName = lf.getName();
- String dropTableQuery = createDropTableQuery(tableName);
- if (isQueryPrint) {
- Logger.debug("query : " + dropTableQuery);
- }
- stat.executeUpdate(dropTableQuery);
-
- String createTableQuery = createTableQuery(lf);
- if (isQueryPrint) {
- Logger.debug("query : " + createTableQuery);
- }
- stat.executeUpdate(createTableQuery);
- executeCreateIndexTable(stat, tableName, "time");//$NON-NLS-1$//$NON-NLS-2$
- }
- } catch (SQLException e) {
- e.printStackTrace();
- } finally {
- CommonUtil.tryClose(stat);
- semaphoreRelease();
- }
- }
-
- private String createTableQuery(LogFormat logFormat) {
- StringBuffer query = new StringBuffer();
- query.append("create table "); //$NON-NLS-1$
- String name = logFormat.getName();
- query.append(name);
- query.append(CommonConstants.SPACE + CommonConstants.OPEN_BRACKET);
-
- List<String> dbColumns = logFormat.getDBColumnNames();
- List<Integer> dbTypes = logFormat.getDBColumntypes();
- int size = dbColumns.size();
-
- for (int i = 0; i < size; i++) {
- query.append(dbColumns.get(i)).append(CommonConstants.SPACE);
- String type = DBTableManager.TEXT;
- if (dbTypes.get(i) == LogFormat.I) {
- type = DBTableManager.INTEGER;
- } else if (dbTypes.get(i) == LogFormat.L) {
- type = DBTableManager.LONG;
- } else if (dbTypes.get(i) == LogFormat.S) {
- type = DBTableManager.BIG_TEXT;
- } else if (dbTypes.get(i) == LogFormat.LV) {
- type = DBTableManager.BIGBIG_TEXT;
- }
- query.append(type);
- if (i + 1 == size) {
- query.append(CommonConstants.CLOSE_BRACKET).append(
- CommonConstants.SEMICOLON);
- } else {
- query.append(CommonConstants.COMMA);
- }
- }
-
- // System.out.println("dddd : " + query.toString());
- return query.toString();
- }
-
- private void executeCreateIndexTable(Statement stat, String tableName,
- String indeColumn) {
- String createIndexTable = "create index " + tableName + "_index on "//$NON-NLS-1$//$NON-NLS-2$
- + tableName + CommonConstants.OPEN_BRACKET + indeColumn
- + CommonConstants.CLOSE_BRACKET;
- try {
- executeUpdateCreateTable(stat, createIndexTable);
- } catch (SQLException e) {
- e.printStackTrace();
- Logger.debug("table name : " + tableName);
- }
- }
-
public String createDropTableQuery(String target) {
StringBuffer query = new StringBuffer();
query.append("drop table if exists "); //$NON-NLS-1$ TODO
}
public int getRangeMinSeq(int logId, long time) {
- String tableName = LogDataFactory.getLogFormatById(logId).getName();
+ String tableName = LogDataFactory.getLogFormatName(logId);
String queryOption = " where time >= " + time; //$NON-NLS-1$
List<List<String>> dbInfo = selectQuery(null,
new String[] { "min(seqnumber)" }, tableName, queryOption); //$NON-NLS-1$ //$NON-NLS-2$
}
public int getRangeMaxSeq(int logId, long time) {
- String tableName = LogDataFactory.getLogFormatById(logId).getName();
+ String tableName = LogDataFactory.getLogFormatName(logId);
String queryOption = " where time <= " + time; //$NON-NLS-1$
List<List<String>> dbInfo = selectQuery(null,
new String[] { "max(seqnumber)" }, tableName, queryOption); //$NON-NLS-1$ //$NON-NLS-2$
return Integer.parseInt(dbInfo.get(0).get(0));
}
- public List<LogData> selectArea(int logId, long from, long to) {
-
- String tableName = LogDataFactory.getLogFormatById(logId).getName();
- StringBuffer queryOption = new StringBuffer();
- queryOption.append(" where SeqNumber >= "); //$NON-NLS-1$
- queryOption.append(from);
- queryOption.append(" and SeqNumber <= "); //$NON-NLS-1$
- queryOption.append(to);
-
- String[] columnNames = LogDataFactory
- .getLogFormatById(logId)
- .getDBColumnNames()
- .toArray(
- new String[LogDataFactory.getLogFormatById(logId)
- .getDBColumnNames().size()]);
-
- List<LogData> dbInfo = newSelectQuery(null, columnNames, tableName,
- queryOption.toString()); //$NON-NLS-1$ //$NON-NLS-2$
-
- return dbInfo;
- }
-
- public List<LogData> selectArea2(int logId, long start, long end, long base,
- long count) {
-
- String tableName = LogDataFactory.getLogFormatById(logId).getName();
- StringBuffer preOption = new StringBuffer();
- preOption
- .append(" limit ").append(base).append(CommonConstants.SPACE).append(count); //$NON-NLS-1$
-
- StringBuffer postOption = new StringBuffer();
- postOption.append(" where time >= ").append(start).append(" and time <= ")
- .append(end);
- postOption.append(" order by time asc "); //$NON-NLS-1$
-
- String[] columnNames = LogDataFactory
- .getLogFormatById(logId)
- .getDBColumnNames()
- .toArray(
- new String[LogDataFactory.getLogFormatById(logId)
- .getDBColumnNames().size()]);
-
- List<LogData> dbInfo = newSelectQuery2(null, columnNames, tableName,
- preOption.toString(), postOption.toString()); //$NON-NLS-1$ //$NON-NLS-2$
-
- return dbInfo;
- }
-
// public synchronized List<LogData> selectTableData(int logId, int from,
// int to, String option) {
// String tableName = LogDataFactory.getLogFormatById(logId).getName();
import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
import org.tizen.dynamicanalyzer.common.AnalyzerManager;
-import org.tizen.dynamicanalyzer.common.GlobalInformation;
+import org.tizen.dynamicanalyzer.common.Global;
import org.tizen.dynamicanalyzer.common.SymbolManager;
import org.tizen.dynamicanalyzer.constant.CommonConstants;
import org.tizen.dynamicanalyzer.nl.InformationViewLabels;
public String getUserFunctionPosition() {
if (userFunctionBin == null || userFunctionBin.isEmpty()) {
if (AnalyzerManager.isOsp()) {
- userFunctionBin = new String(GlobalInformation.getCurrentApplication().getMainApp()
+ userFunctionBin = new String(Global.getCurrentApplication().getMainApp()
.getInfo(AppInfo.PROPERTY.EXEC.index)
+ ".exe"); //$NON-NLS-1$
} else {
- userFunctionBin = new String(GlobalInformation.getCurrentApplication().getMainApp()
+ userFunctionBin = new String(Global.getCurrentApplication().getMainApp()
.getInfo(AppInfo.PROPERTY.EXEC.index));
}
}
import org.tizen.dynamicanalyzer.common.AnalyzerShellCommands;
import org.tizen.dynamicanalyzer.common.ElfSymbolExtractor;
import org.tizen.dynamicanalyzer.common.ErrorCode;
-import org.tizen.dynamicanalyzer.common.GlobalInformation;
+import org.tizen.dynamicanalyzer.common.Global;
import org.tizen.dynamicanalyzer.common.HostResult;
import org.tizen.dynamicanalyzer.common.path.PathManager;
import org.tizen.dynamicanalyzer.communicator.BaseCommunicator;
Thread dataThread = new Thread(null, new DataChannelThread(),
AnalyzerConstants.COMMUNICATOR_RECEIVE_THREAD);
// start message send
- HostResult result = handleControlMessage(GlobalInformation.getCurrentDeviceInfo(), ret);
+ HostResult result = handleControlMessage(Global.getCurrentDeviceInfo(), ret);
Logger.performance("TEST", "Start Trace", "Make and Send start message");
// FIX
byte[] msgBinInfo = ByteUtil.toBytes(AnalyzerConstants.MSG_BINARY_INFO);
byte[] preMsg = null;
- DeviceInfo curDevice = GlobalInformation.getCurrentDeviceInfo();
+ DeviceInfo curDevice = Global.getCurrentDeviceInfo();
if (AnalyzerConstants.RUNNING_PROCESS.equals(selectedPkg.getPackageId())) {
Map<Integer, String> selProcess = selectedPkg.getMainApp().getRunningProcesses();
private HostResult pullTheFile(String from, String to) {
try {
- GlobalInformation.getCurrentDeviceInfo().getIDevice().becomeSuperUser(true);
+ Global.getCurrentDeviceInfo().getIDevice().becomeSuperUser(true);
} catch (TimeoutException e) {
e.printStackTrace();
} catch (SdbCommandRejectedException e) {
rt.setApplyTime(0); // set time of configuration to zero
}
- GlobalInformation.setCurrentConfiguration(rt);
+ Global.setCurrentConfiguration(rt);
return result;
}
}
byte[] stop = ByteUtil.toBytes(AnalyzerConstants.MSG_STOP_SWAP);
int length = 0;
byte[] stopMsg = ByteUtil.getByte(stop, length);
- HostResult result = handleControlMessage(GlobalInformation.getCurrentDeviceInfo(),
+ HostResult result = handleControlMessage(Global.getCurrentDeviceInfo(),
stopMsg);
if (result.isSuccess()) {
@Override
public Socket getDataSocket() {
- return GlobalInformation.getCurrentDeviceInfo().getDataSock();
+ return Global.getCurrentDeviceInfo().getDataSock();
}
private void processTargetInfo(byte[] payload, int index, DeviceStatusInfo tInfo) {
@Override
public void closeSock() {
- GlobalInformation.getCurrentDeviceInfo().releaseDataSock();
+ Global.getCurrentDeviceInfo().releaseDataSock();
}
private int getReturnId(byte[] data) {
public HostResult sendScreenShotRequest() {
byte[] msg = ByteUtil.getByte(AnalyzerConstants.MSG_GET_SCREENSHOT, 0);
HostResult result = HostResult.SUCCESS;
- Socket controlSock = GlobalInformation.getCurrentDeviceInfo().getControlSock();
+ Socket controlSock = Global.getCurrentDeviceInfo().getControlSock();
try {
if (null != controlSock && !controlSock.isClosed()) {
byte[] libInst = new byte[0];
for (int a = 0; a < count; a++) {
String binaryPath = settings.get(a).getBinaryPath();
- BinaryInfo binInfo = GlobalInformation.getCurrentDeviceInfo().getDeviceStatusInfo()
+ BinaryInfo binInfo = Global.getCurrentDeviceInfo().getDeviceStatusInfo()
.getBinaryInfo(binaryPath);
if (null == binInfo) {
continue;
msg = ByteUtil.getByte(msg, length, libInst);
// ByteUtils.printByteArrayForStart(msg);
- HostResult result = handleControlMessage(GlobalInformation.getCurrentDeviceInfo(), msg);
+ HostResult result = handleControlMessage(Global.getCurrentDeviceInfo(), msg);
int ackMsg = AnalyzerConstants.MSG_SWAP_INST_ADD_ACK;
if (messageId == AnalyzerConstants.MSG_SWAP_INST_REMOVE) {
int length = sendbin.length;
byte[] msg = ByteUtil.getByte(AnalyzerConstants.MSG_GET_PROCESS_ADD_INFO, length,
sendbin);
- HostResult result = handleControlMessage(GlobalInformation.getCurrentDeviceInfo(), msg);
+ HostResult result = handleControlMessage(Global.getCurrentDeviceInfo(), msg);
if (result.isSuccess()
&& isCorrectAck(AnalyzerConstants.MSG_GET_PROCESS_ADD_INFO_ACK, result)) {
int length = sendBin.length;
byte[] msg = ByteUtil.getByte(AnalyzerConstants.MSG_BINARY_INFO, length, sendBin);
- HostResult result = handleControlMessage(GlobalInformation.getCurrentDeviceInfo(), msg);
+ HostResult result = handleControlMessage(Global.getCurrentDeviceInfo(), msg);
if (!result.isSuccess() || !isCorrectAck(MSG_BINARY_INFO_ACK, result)) {
return HostResult.ERR_BIN_INFO_GET_FAIL;
HostResult result;
int index = 0;
- DeviceInfo curDevice = GlobalInformation.getCurrentDeviceInfo();
+ DeviceInfo curDevice = Global.getCurrentDeviceInfo();
int count = ByteUtil.toInt(payload, index);
index += INT_SIZE;
import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
import org.tizen.dynamicanalyzer.common.AnalyzerManager;
-import org.tizen.dynamicanalyzer.common.GlobalInformation;
+import org.tizen.dynamicanalyzer.common.Global;
import org.tizen.dynamicanalyzer.common.SymbolManager;
import org.tizen.dynamicanalyzer.communicator.CommunicatorUtils;
import org.tizen.dynamicanalyzer.communicator.DACommunicator;
String remoteImgPath;
if (DACommunicator.isTargetEmulator()
&& SocketClient.getInstance().isConnected()) {
- GlobalInformation.getCurrentDeviceInfo().emulatorScreenshot
+ Global.getCurrentDeviceInfo().emulatorScreenshot
.send();
- remoteImgPath = GlobalInformation.getCurrentDeviceInfo().emulatorScreenshot
+ remoteImgPath = Global.getCurrentDeviceInfo().emulatorScreenshot
.getFilePath();
bECS = true;
} else {
import java.util.List;
import org.tizen.dynamicanalyzer.logparser.LogCenterConstants;
-import org.tizen.dynamicanalyzer.swap.model.format.ContextSwitchLogFormat;
-import org.tizen.dynamicanalyzer.swap.model.format.ControlLogFormat;
-import org.tizen.dynamicanalyzer.swap.model.format.CustomChartLogFormat;
-import org.tizen.dynamicanalyzer.swap.model.format.FileLogFormat;
-import org.tizen.dynamicanalyzer.swap.model.format.GLES20LogFormat;
-import org.tizen.dynamicanalyzer.swap.model.format.LifeCycleLogFormat;
-import org.tizen.dynamicanalyzer.swap.model.format.LogFormat;
-import org.tizen.dynamicanalyzer.swap.model.format.MemoryLogFormat;
-import org.tizen.dynamicanalyzer.swap.model.format.NetworkLogFormat;
-import org.tizen.dynamicanalyzer.swap.model.format.ProfilingLogFormat;
-import org.tizen.dynamicanalyzer.swap.model.format.SceneLogFormat;
-import org.tizen.dynamicanalyzer.swap.model.format.ScreenShotLogFormat;
-import org.tizen.dynamicanalyzer.swap.model.format.SyncLogFormat;
-import org.tizen.dynamicanalyzer.swap.model.format.SystemLogFormat;
-import org.tizen.dynamicanalyzer.swap.model.format.ThreadLogFormat;
-import org.tizen.dynamicanalyzer.swap.model.format.UIEventLogFormat;
-import org.tizen.dynamicanalyzer.swap.model.format.UserFunctionLogFormat;
import org.tizen.dynamicanalyzer.util.ByteUtil;
public class LogDataFactory {
return output;
}
- public static LogFormat getLogFormatById(int id) {
- LogFormat format = null;
+ public static String getLogFormatName(int id) {
+ String formatName = null;
switch (id) {
case MSG_PROBE_MEMORY:
- format = MemoryLogFormat.getInstance();
+ formatName = "Memory";
break;
case MSG_PROBE_UICONTROL:
- format = ControlLogFormat.getInstance();
+ formatName = "Control";
break;
case MSG_PROBE_UIEVENT:
- format = UIEventLogFormat.getInstance();
+ formatName = "UIEvent";
break;
case MSG_PROBE_FILE:
- format = FileLogFormat.getInstance();
+ formatName = "File";
break;
case MSG_PROBE_NETWORK:
- format = NetworkLogFormat.getInstance();
+ formatName = "Network";
break;
case MSG_PROBE_GLES20:
- format = GLES20LogFormat.getInstance();
+ formatName = "GLES20";
break;
case MSG_PROBE_LIFECYCLE:
- format = LifeCycleLogFormat.getInstance();
+ formatName = "LifeCycle";
break;
case MSG_PROBE_SCREENSHOT:
- format = ScreenShotLogFormat.getInstance();
+ formatName = "ScreenShot";
break;
case MSG_PROBE_SCENE:
- format = SceneLogFormat.getInstance();
+ formatName = "Scene";
break;
case MSG_PROBE_THREAD:
- format = ThreadLogFormat.getInstance();
+ formatName = "Thread";
break;
case MSG_PROBE_CUSTOM:
- format = CustomChartLogFormat.getInstance();
+ formatName = "CustomChart";
break;
case MSG_PROBE_SYNC:
- format = SyncLogFormat.getInstance();
+ formatName = "Sync";
break;
case LogCenterConstants.LOG_USER_FUNCTION:
// user function entry/exit
- format = UserFunctionLogFormat.getInstance();
+ formatName = "UserFunction";
break;
case MSG_DATA_SAMPLE:
case MSG_FUNCTION_ENTRY:
case MSG_FUNCTION_EXIT:
// profiling sample log
// function enter/exit
- format = ProfilingLogFormat.getInstance();
+ formatName = "Profiling";
break;
case MSG_CONTEXT_SWITCH_ENTRY:
case MSG_CONTEXT_SWITCH_EXIT:
- format = ContextSwitchLogFormat.getInstance();
+ formatName = "ContextSwitch";
break;
case MSG_DATA_SYSTEM:
// system log
- format = SystemLogFormat.getInstance();
+ formatName = "System";
break;
case MSG_DATA_RECORD:
// format = ReplayLogFormat.getInstance();
default:
break;
}
- return format;
+ return formatName;
}
public static int getLogColumnCountbyId(int id) {
+++ /dev/null
-/*
- * Dynamic Analyzer
- *
- * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Jooyoul Lee <jy.exe.lee@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Contributors:
- * - S-Core Co., Ltd
- *
- */
-package org.tizen.dynamicanalyzer.swap.model.format;
-
-import static org.tizen.dynamicanalyzer.swap.model.format.LogFormat.I;
-import static org.tizen.dynamicanalyzer.swap.model.format.LogFormat.L;
-import static org.tizen.dynamicanalyzer.swap.model.format.LogFormat.T;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-public class CommonColumns {
-
- private static String[] dcn = { "APPID", "PID", "TID", "args", "Return",
- "Errno", "InternalCall", "CallerPCAddr", "Reserved1", "Reserved2", "LibName" };
- private static Integer[] dct = { I, I, I, T, T, L, I, L, I, I , T};
- private static String[] tcn = { "App ID", "PID", "TID", "Args", "Return",
- "Errno", "Internal Call", "Caller PCAddr", "Reserved1", "Reserved2", "LibName" };
- private static Integer[] logTypes = { I, I, I, T, T, L, I, L, I, I, T };
-
- private static List<String> dbColumnNames = null;
- private static List<Integer> dbColumnTypes = null;
- private static List<String> tableColumnNames = null;
- private static List<Integer> types = null;
-
- public static List<String> getDBColumnNames() {
- if (null == dbColumnNames) {
- dbColumnNames = new ArrayList<String>();
- dbColumnNames.addAll(HeaderColumns.getDBColumnNames());
- dbColumnNames.addAll(Arrays.asList(dcn));
- }
- ArrayList<String> ret = new ArrayList<String>();
- ret.addAll(dbColumnNames);
-
- return ret;
- }
-
- public static List<Integer> getDBColumntypes() {
- if (null == dbColumnTypes) {
- dbColumnTypes = new ArrayList<Integer>();
- dbColumnTypes.addAll(HeaderColumns.getDBColumntypes());
- dbColumnTypes.addAll(Arrays.asList(dct));
- }
-
- ArrayList<Integer> ret = new ArrayList<Integer>();
- ret.addAll(dbColumnTypes);
- return ret;
- }
-
- public static List<String> getTableColumnNames() {
- if (null == tableColumnNames) {
- tableColumnNames = new ArrayList<String>();
- tableColumnNames.addAll(HeaderColumns.getTableColumnNames());
- tableColumnNames.addAll(Arrays.asList(tcn));
- }
- ArrayList<String> ret = new ArrayList<String>();
- ret.addAll(tableColumnNames);
- return ret;
- }
-
- public static List<Integer> getLogColumnTypes() {
- if (null == types) {
- types = new ArrayList<Integer>();
- types.addAll(HeaderColumns.getLogColumnTypes());
- types.addAll(Arrays.asList(logTypes));
- }
-
- ArrayList<Integer> ret = new ArrayList<Integer>();
- ret.addAll(types);
- return ret;
- }
-}
+++ /dev/null
-/*
- * Dynamic Analyzer
- *
- * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Jooyoul Lee <jy.exe.lee@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Contributors:
- * - S-Core Co., Ltd
- *
- */
-package org.tizen.dynamicanalyzer.swap.model.format;
-
-import java.util.Arrays;
-
-public class ContextSwitchLogFormat extends LogFormat {
- public static final String NAME = "ContextSwitch";
-
- private static ContextSwitchLogFormat instance = null;
-
- public static ContextSwitchLogFormat getInstance() {
- if (null == instance) {
- instance = new ContextSwitchLogFormat();
- }
- return instance;
- }
-
- private ContextSwitchLogFormat() {
- setName(NAME);
-
- String[] dcn = { "PCAddr", "Pid", "Tid", "CpuNum" };
- dbColumnNames = HeaderColumns.getDBColumnNames();
- dbColumnNames.addAll(Arrays.asList(dcn));
-
- Integer[] dct = { L, I, I, I };
- dbColumnTypes = HeaderColumns.getDBColumntypes();
- dbColumnTypes.addAll(Arrays.asList(dct));
-
- String[] tcn = { "PCAddr", "Pid", "Tid", "CpuNum" };
- tableColumnNames = HeaderColumns.getTableColumnNames();
- tableColumnNames.addAll(Arrays.asList(tcn));
-
- Integer[] types = { L, I, I, I };
- logColumnTypes = HeaderColumns.getLogColumnTypes();
- logColumnTypes.addAll(Arrays.asList(types));
- }
-}
+++ /dev/null
-/*
- * Dynamic Analyzer
- *
- * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- * Heeyoung Hwang <heeyoung1008.hwang@samsung.com>
- * Jooyoul Lee <jy.exe.lee@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Contributors:
- * - S-Core Co., Ltd
- *
- */
-package org.tizen.dynamicanalyzer.swap.model.format;
-
-import java.util.Arrays;
-
-public class ControlLogFormat extends LogFormat {
- public static final String NAME = "Control";
-
- private static ControlLogFormat instance = null;
-
- public static ControlLogFormat getInstance() {
- if (null == instance) {
- instance = new ControlLogFormat();
- }
- return instance;
- }
-
- private ControlLogFormat() {
- setName(NAME);
- String[] dcn = { "ParentName", "ParentClass", "ParentPointer",
- "ChildName", "ChildClass", "ChildPointer" };
- dbColumnNames = CommonColumns.getDBColumnNames();
- dbColumnNames.addAll(Arrays.asList(dcn));
-
- Integer[] dct = { T, T, L, T, T, L };
- dbColumnTypes = CommonColumns.getDBColumntypes();
- dbColumnTypes.addAll(Arrays.asList(dct));
-
- String[] tcn = { "Parent Name", "Parent Class", "Parent Pointer",
- "Child Name", "Child Class", "Child Pointer" };
- tableColumnNames = CommonColumns.getTableColumnNames();
- tableColumnNames.addAll(Arrays.asList(tcn));
-
- Integer[] types = { S, S, L, S, S, L };
- logColumnTypes = CommonColumns.getLogColumnTypes();
- logColumnTypes.addAll(Arrays.asList(types));
- }
-
-}
+++ /dev/null
-/*
- * Dynamic Analyzer
- *
- * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Jooyoul Lee <jy.exe.lee@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Contributors:
- * - S-Core Co., Ltd
- *
- */
-
-package org.tizen.dynamicanalyzer.swap.model.format;
-
-import java.util.Arrays;
-
-public class CustomChartLogFormat extends LogFormat {
- public static final int ID = 0x3009;
- public static final String NAME = "CustomChart";
-
- private static CustomChartLogFormat instance = null;
-
- public static CustomChartLogFormat getInstance() {
- if (null == instance) {
- instance = new CustomChartLogFormat();
- }
- return instance;
- }
-
- private CustomChartLogFormat() {
- setName(NAME);
-
- String[] dcn = { "Handle", "Type", "Name", "Color", "Value" };
- dbColumnNames = CommonColumns.getDBColumnNames();
- dbColumnNames.addAll(Arrays.asList(dcn));
-
- Integer[] dct = { I, I, T, I, T };
- dbColumnTypes = CommonColumns.getDBColumntypes();
- dbColumnTypes.addAll(Arrays.asList(dct));
-
- String[] tcn = { "Handle", "Type", "Name", "Color", "Value" };
- tableColumnNames = CommonColumns.getTableColumnNames();
- tableColumnNames.addAll(Arrays.asList(tcn));
-
- Integer[] types = { I, I, S, I, D };
- logColumnTypes = CommonColumns.getLogColumnTypes();
- logColumnTypes.addAll(Arrays.asList(types));
- }
-}
+++ /dev/null
-/*
- * Dynamic Analyzer
- *
- * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Jooyoul Lee <jy.exe.lee@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Contributors:
- * - S-Core Co., Ltd
- *
- */
-package org.tizen.dynamicanalyzer.swap.model.format;
-
-import java.util.Arrays;
-
-public class FileLogFormat extends LogFormat {
- public static final String NAME = "File";
-
- private static FileLogFormat instance = null;
-
- public static FileLogFormat getInstance() {
- if (null == instance) {
- instance = new FileLogFormat();
- }
- return instance;
- }
-
- private FileLogFormat() {
- setName(NAME);
-
- String[] dcn = { "Size", "FDValue", "FDApiType", "FileSize",
- "FilePath" };
- dbColumnNames = CommonColumns.getDBColumnNames();
- dbColumnNames.addAll(Arrays.asList(dcn));
-
- Integer[] dct = { L, L, I, L, T };
- dbColumnTypes = CommonColumns.getDBColumntypes();
- dbColumnTypes.addAll(Arrays.asList(dct));
-
- String[] tcn = { "Size", "FD Value", "FD Api Type",
- "File Size", "FilePath" };
- tableColumnNames = CommonColumns.getTableColumnNames();
- tableColumnNames.addAll(Arrays.asList(tcn));
-
- Integer[] types = { L, L, I, L, S };
- logColumnTypes = CommonColumns.getLogColumnTypes();
- logColumnTypes.addAll(Arrays.asList(types));
- }
-}
+++ /dev/null
-package org.tizen.dynamicanalyzer.swap.model.format;
-
-import java.util.Arrays;
-
-public class GLES20LogFormat extends LogFormat {
- public static final String NAME = "GLES20";
-
- private static volatile GLES20LogFormat instance = null;
-
- public static GLES20LogFormat getInstance() {
- if(instance == null) {
- synchronized (GLES20LogFormat.class) {
- if(instance == null) {
- instance = new GLES20LogFormat();
- }
-
- }
- }
-
- return instance;
- }
-
- private GLES20LogFormat() {
- setName(NAME);
-
- String[] dcn = {"GLApiType", "GLElapsedTime", "GLContextValue"};
- dbColumnNames = CommonColumns.getDBColumnNames();
- dbColumnNames.addAll(Arrays.asList(dcn));
-
- Integer[] dct = {I, L, S};
- dbColumnTypes = CommonColumns.getDBColumntypes();
- dbColumnTypes.addAll(Arrays.asList(dct));
-
- String[] tcn = {"Api Type", "Elapsed Time", "Context Value"};
- tableColumnNames = CommonColumns.getTableColumnNames();
- tableColumnNames.addAll(Arrays.asList(tcn));
-
- Integer[] types = { I, L, S };
- logColumnTypes = CommonColumns.getLogColumnTypes();
- logColumnTypes.addAll(Arrays.asList(types));
- }
-}
+++ /dev/null
-/*
- * Dynamic Analyzer
- *
- * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Jooyoul Lee <jy.exe.lee@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Contributors:
- * - S-Core Co., Ltd
- *
- */
-package org.tizen.dynamicanalyzer.swap.model.format;
-
-import static org.tizen.dynamicanalyzer.swap.model.format.LogFormat.I;
-import static org.tizen.dynamicanalyzer.swap.model.format.LogFormat.L;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-public class HeaderColumns {
- private static String[] dcn = { "RID", "MessageId", "SeqNumber", "Time" };
- private static Integer[] dct = { I, I, I, L };
- private static String[] tcn = { "Row Id", "Message ID", "Sequence", "Time" };
- private static Integer[] logTypes = { I, I, I, L };
-
- private static List<String> dbColumnNames = null;
- private static List<Integer> dbColumnTypes = null;
- private static List<String> tableColumnNames = null;
- private static List<Integer> types = null;
-
- public static List<String> getDBColumnNames() {
- if (null == dbColumnNames) {
- dbColumnNames = new ArrayList<String>();
- dbColumnNames = Arrays.asList(dcn);
- }
-
- ArrayList<String> ret = new ArrayList<String>();
- ret.addAll(dbColumnNames);
-
- return ret;
- }
-
- public static List<Integer> getDBColumntypes() {
- if (null == dbColumnTypes) {
- dbColumnTypes = Arrays.asList(dct);
- }
-
- ArrayList<Integer> ret = new ArrayList<Integer>();
- ret.addAll(dbColumnTypes);
- return ret;
- }
-
- public static List<String> getTableColumnNames() {
- if (null == tableColumnNames) {
- tableColumnNames = new ArrayList<String>();
- tableColumnNames = Arrays.asList(tcn);
- }
- ArrayList<String> ret = new ArrayList<String>();
- ret.addAll(tableColumnNames);
- return ret;
- }
-
- public static List<Integer> getLogColumnTypes() {
- if (null == types) {
- types = Arrays.asList(logTypes);
- }
-
- ArrayList<Integer> ret = new ArrayList<Integer>();
- ret.addAll(types);
- return ret;
- }
-}
+++ /dev/null
-/*
- * Dynamic Analyzer
- *
- * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Jooyoul Lee <jy.exe.lee@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Contributors:
- * - S-Core Co., Ltd
- *
- */
-package org.tizen.dynamicanalyzer.swap.model.format;
-
-
-public class LifeCycleLogFormat extends LogFormat {
- public static final String NAME = "LifeCycle";
-
- private static LifeCycleLogFormat instance = null;
-
- public static LifeCycleLogFormat getInstance() {
- if (null == instance) {
- instance = new LifeCycleLogFormat();
- }
- return instance;
- }
-
- private LifeCycleLogFormat() {
- setName(NAME);
- }
-}
+++ /dev/null
-/*
- * Dynamic Analyzer
- *
- * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Jooyoul Lee <jy.exe.lee@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Contributors:
- * - S-Core Co., Ltd
- *
- */
-package org.tizen.dynamicanalyzer.swap.model.format;
-
-import java.util.ArrayList;
-import java.util.List;
-
-public class LogFormat {
- public static final int I = 1; // Integer
- public static final int S = 2; // String
- public static final int L = 3; // Long
- public static final int D = 4; // Double
- public static final int T = 5; // TEXT
- public static final int F = 6; // Float
- public static final int SI = 7; // Short int
- public static final int LV = 13; // Long varchar
-
- // for system logs
- public static final int CL = 8; // CPU load
- public static final int CF = 9; // CPU frequency
- public static final int TL = 10; // Thread load
- public static final int PL = 11; // Process load
- public static final int A = 12; // Entry args
-
- protected List<String> dbColumnNames = null;
- protected List<Integer> dbColumnTypes = null;
- protected List<String> tableColumnNames = null;
- protected List<Integer> logColumnTypes = null;
-
- public static List<LogFormat> logFormats = null;
-
- protected int id = -1;
- protected String name = null;
-
- public int getId() {
- return id;
- }
-
- public String getName() {
- return name;
- }
-
- protected void setName(String name) {
- this.name = name;
- }
-
- public List<String> getDBColumnNames() {
- if (null == dbColumnNames) {
- return CommonColumns.getDBColumnNames();
- }
- return dbColumnNames;
- }
-
- public List<Integer> getDBColumntypes() {
- if (null == dbColumnTypes) {
- return CommonColumns.getDBColumntypes();
- }
- return dbColumnTypes;
- }
-
- public List<String> getTableColumnNames() {
- if (null == tableColumnNames) {
- return CommonColumns.getTableColumnNames();
- }
- return tableColumnNames;
- }
-
- public List<Integer> getLogColumnTypes() {
- if (null == logColumnTypes) {
- return CommonColumns.getLogColumnTypes();
- }
- return logColumnTypes;
- }
-
- public int getDBTotalColumnCount() {
- return getDBColumnNames().size();
- }
-
- public static List<LogFormat> getLogFormats() {
- if (null == logFormats) {
- logFormats = new ArrayList<LogFormat>();
-
- logFormats.add(ContextSwitchLogFormat.getInstance());
- logFormats.add(ControlLogFormat.getInstance());
- logFormats.add(CustomChartLogFormat.getInstance());
- logFormats.add(FileLogFormat.getInstance());
- // logFormats.add(NetworkLogFormat.getInstance());
- logFormats.add(LifeCycleLogFormat.getInstance());
- logFormats.add(MemoryLogFormat.getInstance());
- // logFormats.add(ReplayLogFormat.getInstance());
- logFormats.add(SceneLogFormat.getInstance());
- logFormats.add(ScreenShotLogFormat.getInstance());
- logFormats.add(SyncLogFormat.getInstance());
- logFormats.add(SystemLogFormat.getInstance());
- logFormats.add(ThreadLogFormat.getInstance());
- logFormats.add(UIEventLogFormat.getInstance());
- // logFormats.add(GLES20LogFormat.getInstance());
-
- }
- return logFormats;
- }
-
- public static LogFormat getLogFormatById(int id) {
- int size = getLogFormats().size();
-
- for (int i = 0; i < size; i++) {
- if (logFormats.get(i).getId() == id) {
- return logFormats.get(i);
- }
- }
- return null;
- }
-
-}
+++ /dev/null
-/*
- * Dynamic Analyzer
- *
- * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Jooyoul Lee <jy.exe.lee@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Contributors:
- * - S-Core Co., Ltd
- *
- */
-package org.tizen.dynamicanalyzer.swap.model.format;
-
-import java.util.Arrays;
-
-public class MemoryLogFormat extends LogFormat {
- public static final String NAME = "Memory";
-
- private static MemoryLogFormat instance = null;
-
- public static MemoryLogFormat getInstance() {
- if (null == instance) {
- instance = new MemoryLogFormat();
- }
- return instance;
- }
-
- private MemoryLogFormat() {
- setName(NAME);
-
- String[] dcn = { "Size", "MemoryAPIType", "Address" };
- dbColumnNames = CommonColumns.getDBColumnNames();
- for (String str : dcn) {
- dbColumnNames.add(str);
- }
- // dbColumnNames.addAll(Arrays.asList(dcn));
-
- Integer[] dct = { L, I, L };
- dbColumnTypes = CommonColumns.getDBColumntypes();
- dbColumnTypes.addAll(Arrays.asList(dct));
-
- String[] tcn = { "Size", "Memory API Type", "Address" };
- tableColumnNames = CommonColumns.getTableColumnNames();
- for (String str : tcn) {
- tableColumnNames.add(str);
- }
- // tableColumnNames.addAll(Arrays.asList(tcn));
-
- Integer[] types = { L, I, L };
- logColumnTypes = CommonColumns.getLogColumnTypes();
- logColumnTypes.addAll(Arrays.asList(types));
- }
-}
+++ /dev/null
-/*
- * Dynamic Analyzer
- *
- * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Jooyoul Lee <jy.exe.lee@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Contributors:
- * - S-Core Co., Ltd
- *
- */
-
-package org.tizen.dynamicanalyzer.swap.model.format;
-
-import java.util.Arrays;
-
-public class NetworkLogFormat extends LogFormat {
- public static final String NAME = "Network";
-
- private static NetworkLogFormat instance = null;
-
- public static NetworkLogFormat getInstance() {
- if (null == instance) {
- instance = new NetworkLogFormat();
- }
- return instance;
- }
-
- private NetworkLogFormat() {
- setName(NAME);
-
- String[] dcn = { "ObjetAddress", "FDValue", "FDApiType",
- "DestinationIPAddress", "DestinationPortAddress",
- "MessageSize", "Message" };
- dbColumnNames = CommonColumns.getDBColumnNames();
- dbColumnNames.addAll(Arrays.asList(dcn));
-
- Integer[] dct = { L, L, I, I, I, I, S };
- dbColumnTypes = CommonColumns.getDBColumntypes();
- dbColumnTypes.addAll(Arrays.asList(dct));
-
- String[] tcn = { "ObjetAddress", "FDValue", "FDApiType",
- "DestinationIPAddress", "DestinationPortAddress",
- "MessageSize", "Message" };
- tableColumnNames = CommonColumns.getTableColumnNames();
- tableColumnNames.addAll(Arrays.asList(tcn));
-
- Integer[] types = { L, L, I, I, I, I, S };
- logColumnTypes = CommonColumns.getLogColumnTypes();
- logColumnTypes.addAll(Arrays.asList(types));
- }
-}
+++ /dev/null
-/*
- * Dynamic Analyzer
- *
- * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Jooyoul Lee <jy.exe.lee@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Contributors:
- * - S-Core Co., Ltd
- *
- */
-package org.tizen.dynamicanalyzer.swap.model.format;
-
-import java.util.Arrays;
-
-public class ProfilingLogFormat extends LogFormat {
- public static final String NAME = "Profiling";
-
- private static ProfilingLogFormat instance = null;
-
- public static ProfilingLogFormat getInstance() {
- if (null == instance) {
- instance = new ProfilingLogFormat();
- }
- return instance;
- }
-
- private ProfilingLogFormat() {
- setName(NAME);
-
- String[] dcn = { "PCAddr", "CallerPcAddr", "ProbeType", "ProbeSubType",
- "Pid", "Tid", "CpuNum", "Args", "Ret", "ApiName", "LibName", "CallStack" };
- dbColumnNames = HeaderColumns.getDBColumnNames();
- dbColumnNames.addAll(Arrays.asList(dcn));
-
- Integer[] dct = { L, L, I, I, I, I, I, T, T, T, T, T };
- dbColumnTypes = HeaderColumns.getDBColumntypes();
- dbColumnTypes.addAll(Arrays.asList(dct));
-
- String[] tcn = { "PCAddr", "CallerPcAddr", "ProbeType", "ProbeSubType",
- "Pid", "Tid", "CpuNum", "Args", "Ret", "ApiName", "LibName", "CallStack" };
- tableColumnNames = HeaderColumns.getTableColumnNames();
- tableColumnNames.addAll(Arrays.asList(tcn));
-
- Integer[] types = { L, L, I, I, I, I, I, S, S, S, S, S };
- logColumnTypes = HeaderColumns.getLogColumnTypes();
- logColumnTypes.addAll(Arrays.asList(types));
- }
-}
+++ /dev/null
-/*
- * Dynamic Analyzer
- *
- * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Jooyoul Lee <jy.exe.lee@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Contributors:
- * - S-Core Co., Ltd
- *
- */
-package org.tizen.dynamicanalyzer.swap.model.format;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-
-public class ReplayLogFormat extends LogFormat {
- public static final String NAME = "Replay";
-
- private static ReplayLogFormat instance = null;
-
- public static ReplayLogFormat getInstance() {
- if (null == instance) {
- instance = new ReplayLogFormat();
- }
- return instance;
- }
-
- private ReplayLogFormat() {
- setName(NAME);
- String[] dcn = { "Rid", "MessageId", "SeqNumber", "Time", "Sec", "Nano", "EventId",
- "EventType", "EventCode", "EventValue" };
- dbColumnNames = new ArrayList<String>();
- dbColumnNames.addAll(Arrays.asList(dcn));
-
- Integer[] dct = { I, I, L, L, I, I, I, I, I, I };
- dbColumnTypes = new ArrayList<Integer>();
- dbColumnTypes.addAll(Arrays.asList(dct));
-
- String[] tcn = { "Rid", "MessageId", "SeqNumber", "Time", "Sec", "Nano", "EventId",
- "EventType", "EventCode", "EventValue" };
- tableColumnNames = new ArrayList<String>();
- tableColumnNames.addAll(Arrays.asList(tcn));
-
- Integer[] types = { I, I, L, L, I, I, I, I, I, I };
- logColumnTypes = new ArrayList<Integer>();
- logColumnTypes.addAll(Arrays.asList(types));
- }
-}
+++ /dev/null
-/*
- * Dynamic Analyzer
- *
- * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- * Heeyoung Hwang <heeyoung1008.hwang@samsung.com>
- * Jooyoul Lee <jy.exe.lee@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Contributors:
- * - S-Core Co., Ltd
- *
- */
-package org.tizen.dynamicanalyzer.swap.model.format;
-
-import java.util.Arrays;
-
-public class SceneLogFormat extends LogFormat {
- public static final String NAME = "Scene";
-
- private static SceneLogFormat instance = null;
-
- public static SceneLogFormat getInstance() {
- if (null == instance) {
- instance = new SceneLogFormat();
- }
- return instance;
- }
-
- private SceneLogFormat() {
- setName(NAME);
-
- String[] dcn = { "SceneName", "FormName", "FormPointer", "PanelName",
- "PanelPointer", "TransitionTime", "UserTransitionTime" };
- dbColumnNames = CommonColumns.getDBColumnNames();
- dbColumnNames.addAll(Arrays.asList(dcn));
-
- Integer[] dct = { T, T, L, T, L, I, I };
- dbColumnTypes = CommonColumns.getDBColumntypes();
- dbColumnTypes.addAll(Arrays.asList(dct));
-
- String[] tcn = { "Scene Name", "Form Name", "Form Pointer",
- "Panel Name", "Panel Pointer", "Transition Time",
- "User Transition Time" };
- tableColumnNames = CommonColumns.getTableColumnNames();
- tableColumnNames.addAll(Arrays.asList(tcn));
-
- Integer[] types = { S, S, L, S, L, I, I };
- logColumnTypes = CommonColumns.getLogColumnTypes();
- logColumnTypes.addAll(Arrays.asList(types));
- }
-}
+++ /dev/null
-/*
- * Dynamic Analyzer
- *
- * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Jooyoul Lee <jy.exe.lee@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Contributors:
- * - S-Core Co., Ltd
- *
- */
-package org.tizen.dynamicanalyzer.swap.model.format;
-
-import java.util.Arrays;
-
-public class ScreenShotLogFormat extends LogFormat {
- public static final String NAME = "ScreenShot";
-
- private static ScreenShotLogFormat instance = null;
-
- public static ScreenShotLogFormat getInstance() {
- if (null == instance) {
- instance = new ScreenShotLogFormat();
- }
- return instance;
- }
-
- private ScreenShotLogFormat() {
- setName(NAME);
-
- String[] dcn = { "ImageFilePath", "Orientation" };
- dbColumnNames = CommonColumns.getDBColumnNames();
- dbColumnNames.addAll(Arrays.asList(dcn));
-
- Integer[] dct = { T, I };
- dbColumnTypes = CommonColumns.getDBColumntypes();
- dbColumnTypes.addAll(Arrays.asList(dct));
-
- String[] tcn = { "Image File Path", "Orientation" };
- tableColumnNames = CommonColumns.getTableColumnNames();
- tableColumnNames.addAll(Arrays.asList(tcn));
-
- Integer[] types = { S, I };
- logColumnTypes = CommonColumns.getLogColumnTypes();
- logColumnTypes.addAll(Arrays.asList(types));
- }
-}
+++ /dev/null
-/*
- * Dynamic Analyzer
- *
- * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Jooyoul Lee <jy.exe.lee@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Contributors:
- * - S-Core Co., Ltd
- *
- */
-package org.tizen.dynamicanalyzer.swap.model.format;
-
-import java.util.Arrays;
-
-public class SyncLogFormat extends LogFormat {
- public static final String NAME = "Sync";
-
- private static SyncLogFormat instance = null;
-
- public static SyncLogFormat getInstance() {
- if (null == instance) {
- instance = new SyncLogFormat();
- }
- return instance;
- }
-
- private SyncLogFormat() {
- setName(NAME);
-
- String[] dcn = { "SyncValue", "SyncType", "ApiType" };
- dbColumnNames = CommonColumns.getDBColumnNames();
- dbColumnNames.addAll(Arrays.asList(dcn));
-
- Integer[] dct = { L, I, I };
- dbColumnTypes = CommonColumns.getDBColumntypes();
- dbColumnTypes.addAll(Arrays.asList(dct));
-
- String[] tcn = { "Sync Value", "Sync Type", "Api Type" };
- tableColumnNames = CommonColumns.getTableColumnNames();
- tableColumnNames.addAll(Arrays.asList(tcn));
-
- Integer[] types = { L, I, I };
- logColumnTypes = CommonColumns.getLogColumnTypes();
- logColumnTypes.addAll(Arrays.asList(types));
- }
-}
+++ /dev/null
-/*
- * Dynamic Analyzer
- *
- * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Jooyoul Lee <jy.exe.lee@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Contributors:
- * - S-Core Co., Ltd
- *
- */
-package org.tizen.dynamicanalyzer.swap.model.format;
-
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-
-public class SystemLogFormat extends LogFormat {
- public static final String NAME = "System";
-
- private static SystemLogFormat instance = null;
-
- public static SystemLogFormat getInstance() {
- if (null == instance) {
- instance = new SystemLogFormat();
- }
- return instance;
- }
-
- private SystemLogFormat() {
- setName(NAME);
- String[] dcn = { "AppCpuUsage", "CpuFrequency", "CpuLoad","ThreadCount", "ThreadLoad",
- "ProcessCount", "ProcessLoad","VirtualMemory", "ResidentMemory", "SharedMemory",
- "PssMemory","TotalAllocSize", "SystemMemoryTotal", "SystemMemoryUsed","TotalUsedDrive",
- "DiskReads", "DiskSectorsRead", "DiskWrites","DiskSectorsWritten", "NetworkSendSize",
- "NetworkReceiveSize","WiFi", "BlueTooth", "GPS", "Brightness",
- "Camera", "Sound","Audio", "Vibration", "Voltage",
- "Rssi", "Video", "CallValue","Dnet", "Energy",
- "EnergyPerDevice", "AppEnergyPerDevice"};
- dbColumnNames = new ArrayList<String>();
- dbColumnNames.addAll(HeaderColumns.getDBColumnNames());
- dbColumnNames.addAll(Arrays.asList(dcn));
-
- Integer[] dct = { T, T, T,I, T,
- I, LV,
- I, I, I, I,I, L, L,
- I, I,I, I, I,
- I, I,
- I, I, I, I, I,
- I, I, I, I, I,
- I, I, I,
- I, T, T};
- dbColumnTypes = new ArrayList<Integer>();
- dbColumnTypes.addAll(HeaderColumns.getDBColumntypes());
- dbColumnTypes.addAll(Arrays.asList(dct));
-
- String[] tcn = { "App Cpu Usage", "Cpu Frequency", "Cpu Load",
- "Thread Count", "Thread Load", "Process Count", "Process Load",
- "Virtual Memory", "Resident Memory", "Shared Memory", "Pss Memory",
- "Total Alloc Size", "System Memory Total", "System Memory Used",
- "Total Used Drive", "Disk Reads", "Disk Sectors Read", "Disk Writes",
- "Disk Sectors Written", "Network Send Size,", "Network Receive Size",
- "WiFi", "BlueTooth", "GPS", "Brightness", "Camera", "Sound",
- "Audio", "Vibration", "Voltage", "Rssi", "Video", "Call",
- "Dnet", "Energy", "Energy Usage Per Devices", "Application Energy Usage" };
- tableColumnNames = new ArrayList<String>();
- tableColumnNames.addAll(HeaderColumns.getTableColumnNames());
- tableColumnNames.addAll(Arrays.asList(tcn));
-
- Integer[] types = {F, S, S,I, S,
- I, S,
- I, I, I, I,I, L, L,
- I, I,I, I, I,
- I, I,
- I, I, I, I, I,
- I, I, I, I, I,
- I, I, I,
- I, S, S};
- logColumnTypes = new ArrayList<Integer>();
- logColumnTypes.addAll(HeaderColumns.getLogColumnTypes());
- logColumnTypes.addAll(Arrays.asList(types));
- }
-
- public List<String> getDBColumnNames() {
- return dbColumnNames;
- }
-
- public List<Integer> getDBColumntypes() {
- return dbColumnTypes;
- }
-
- public List<String> getTableColumnNames() {
- return tableColumnNames;
- }
-
- public List<Integer> getLogColumnTypes() {
- return logColumnTypes;
- }
-
- public int getDBTotalColumnCount() {
- return getDBColumnNames().size();
- }
-}
+++ /dev/null
-/*
- * Dynamic Analyzer
- *
- * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Jooyoul Lee <jy.exe.lee@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Contributors:
- * - S-Core Co., Ltd
- *
- */
-package org.tizen.dynamicanalyzer.swap.model.format;
-
-import java.util.Arrays;
-
-public class ThreadLogFormat extends LogFormat {
- public static final String NAME = "Thread";
-
- private static ThreadLogFormat instance = null;
-
- public static ThreadLogFormat getInstance() {
- if (null == instance) {
- instance = new ThreadLogFormat();
- }
- return instance;
- }
-
- private ThreadLogFormat() {
- setName(NAME);
-
- String[] dcn = { "PThreadID", "OspThreadID", "ThreadType", "ApiType" };
- dbColumnNames = CommonColumns.getDBColumnNames();
- dbColumnNames.addAll(Arrays.asList(dcn));
-
- Integer[] dct = { L, L, I, I };
- dbColumnTypes = CommonColumns.getDBColumntypes();
- dbColumnTypes.addAll(Arrays.asList(dct));
-
- String[] tcn = { "PThread ID", "Osp Thread ID", "Thread Type",
- "Api Type" };
- tableColumnNames = CommonColumns.getTableColumnNames();
- tableColumnNames.addAll(Arrays.asList(tcn));
-
- Integer[] types = { L, L, I, I };
- logColumnTypes = CommonColumns.getLogColumnTypes();
- logColumnTypes.addAll(Arrays.asList(types));
- }
-}
+++ /dev/null
-/*
- * Dynamic Analyzer
- *
- * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Jooyoul Lee <jy.exe.lee@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Contributors:
- * - S-Core Co., Ltd
- *
- */
-package org.tizen.dynamicanalyzer.swap.model.format;
-
-import java.util.Arrays;
-
-public class UIEventLogFormat extends LogFormat {
- public static final String NAME = "UIEvent";
-
- private static UIEventLogFormat instance = null;
-
- public static UIEventLogFormat getInstance() {
- if (null == instance) {
- instance = new UIEventLogFormat();
- }
- return instance;
- }
-
- private UIEventLogFormat() {
- setName(NAME);
-
- String[] dcn = { "EventType", "DetailType", "X", "Y", "Info1", "Info2" };
- dbColumnNames = CommonColumns.getDBColumnNames();
- dbColumnNames.addAll(Arrays.asList(dcn));
-
- Integer[] dct = { I, I, I, I, T, T };
- dbColumnTypes = CommonColumns.getDBColumntypes();
- dbColumnTypes.addAll(Arrays.asList(dct));
-
- String[] tcn = { "Event Type", "Detail Type", "X", "Y", "Info1",
- "Info2" };
- tableColumnNames = CommonColumns.getTableColumnNames();
- tableColumnNames.addAll(Arrays.asList(tcn));
-
- Integer[] types = { I, I, I, I, S, S };
- logColumnTypes = CommonColumns.getLogColumnTypes();
- logColumnTypes.addAll(Arrays.asList(types));
- }
-
- public int getId() {
- return id;
- }
-
- public void setId(int id) {
- this.id = id;
- }
-
- public String getName() {
- return name;
- }
-
- public void setName(String name) {
- this.name = name;
- }
-}
+++ /dev/null
-/*
- * Dynamic Analyzer
- *
- * Copyright (c) 2013 Samsung Electronics Co., Ltd. All rights reserved.
- *
- * Contact:
- * Jaewon Lim <jaewon81.lim@samsung.com>
- * Jooyoul Lee <jy.exe.lee@samsung.com>
- * Juyoung Kim <j0.kim@samsung.com>
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- *
- * Contributors:
- * - S-Core Co., Ltd
- *
- */
-package org.tizen.dynamicanalyzer.swap.model.format;
-
-import java.util.Arrays;
-
-public class UserFunctionLogFormat extends LogFormat {
- public static final String NAME = "UserFunction";
-
- private static UserFunctionLogFormat instance = null;
-
- public static UserFunctionLogFormat getInstance() {
- if (null == instance) {
- instance = new UserFunctionLogFormat();
- }
- return instance;
- }
-
- private UserFunctionLogFormat() {
- setName(NAME);
-
- String[] dcn = { "LowPC", "HighPC", "Type", "ElapsedTime", "PCAddr" };
- dbColumnNames = CommonColumns.getDBColumnNames();
- dbColumnNames.addAll(Arrays.asList(dcn));
-
- Integer[] dct = { L, L, I, L, L };
- dbColumnTypes = CommonColumns.getDBColumntypes();
- dbColumnTypes.addAll(Arrays.asList(dct));
-
- String[] tcn = { "LogPC", "HighPC", "Type", "ElapsedTime", "PCAddr" };
- tableColumnNames = CommonColumns.getTableColumnNames();
- tableColumnNames.addAll(Arrays.asList(tcn));
-
- Integer[] types = { L, L, I, L, L };
- logColumnTypes = CommonColumns.getLogColumnTypes();
- logColumnTypes.addAll(Arrays.asList(types));
- }
-}
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
-import org.tizen.dynamicanalyzer.common.GlobalInformation;
+import org.tizen.dynamicanalyzer.common.Global;
import org.tizen.dynamicanalyzer.model.DeviceInfo;
import org.tizen.dynamicanalyzer.resources.ColorResources;
import org.tizen.dynamicanalyzer.resources.FontResources;
}
public void makeTree() {
- DeviceInfo selectedDevice = GlobalInformation.getCurrentDeviceInfo();
+ DeviceInfo selectedDevice = Global.getCurrentDeviceInfo();
if (null == selectedDevice) {
return;
}
- IDevice device = GlobalInformation.getCurrentDeviceInfo().getIDevice();
+ IDevice device = Global.getCurrentDeviceInfo().getIDevice();
FileEntry root = device.getRoot();
GridItem item = new GridItem(table, SWT.NONE);
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
import org.tizen.dynamicanalyzer.appearance.DesignConstants;
-import org.tizen.dynamicanalyzer.common.GlobalInformation;
+import org.tizen.dynamicanalyzer.common.Global;
import org.tizen.dynamicanalyzer.communicator.DACommunicator;
import org.tizen.dynamicanalyzer.nl.WidgetLabels;
import org.tizen.dynamicanalyzer.resources.ColorResources;
data.height = 476;
data.width = 434;
explorer.setLayoutData(data);
- explorer.setDevice(GlobalInformation.getCurrentDeviceInfo().getIDevice());
- explorer.setRoot(GlobalInformation.getCurrentDeviceInfo().getIDevice()
+ explorer.setDevice(Global.getCurrentDeviceInfo().getIDevice());
+ explorer.setRoot(Global.getCurrentDeviceInfo().getIDevice()
.getRoot().getFullPath());
// explorer.updateData();
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.part.ViewPart;
import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
-import org.tizen.dynamicanalyzer.constant.CommonConstants;
import org.tizen.dynamicanalyzer.nl.ConfigureLabels;
import org.tizen.dynamicanalyzer.ui.file.FilePage;
import org.tizen.dynamicanalyzer.ui.kernel.KernelPage;
public void createTabViewPage() {
ConfigureManager configureManager = ConfigureManager.getInstance();
List<Integer> tabViewList = new ArrayList<Integer>();
- tabViewList.add(CommonConstants.PAGE_TIME_LINE); // default : timeline tab
+ tabViewList.add(AnalyzerConstants.PAGE_TIME_LINE); // default : timeline
+ // tab
// thread tab
- if (AnalyzerConstants.FEATURE_OFF !=
- configureManager.getValueLong(ConfigureLabels.FEATURE_THREAD)) {
- tabViewList.add(CommonConstants.PAGE_THREAD);
+ if (AnalyzerConstants.FEATURE_OFF != configureManager
+ .getValueLong(ConfigureLabels.FEATURE_THREAD)) {
+ tabViewList.add(AnalyzerConstants.PAGE_THREAD);
} // else nothing
// network tab
- if (AnalyzerConstants.FEATURE_OFF !=
- configureManager.getValueLong(ConfigureLabels.FEATURE_NETWORK)) {
- tabViewList.add(CommonConstants.PAGE_NETWORK);
+ if (AnalyzerConstants.FEATURE_OFF != configureManager
+ .getValueLong(ConfigureLabels.FEATURE_NETWORK)) {
+ tabViewList.add(AnalyzerConstants.PAGE_NETWORK);
} // else nothing
// openGL tab
- if (AnalyzerConstants.FEATURE_OFF !=
- configureManager.getValueLong(ConfigureLabels.FEATURE_OPENGL)) {
- tabViewList.add(CommonConstants.PAGE_GRAPHICS);
+ if (AnalyzerConstants.FEATURE_OFF != configureManager
+ .getValueLong(ConfigureLabels.FEATURE_OPENGL)) {
+ tabViewList.add(AnalyzerConstants.PAGE_GRAPHICS);
} // else nothing
// kernel tab
- if (AnalyzerConstants.FEATURE_OFF !=
- configureManager.getValueLong(ConfigureLabels.FEATURE_CONTEXT_SWITCH)) {
- tabViewList.add(CommonConstants.PAGE_KERNEL);
+ if (AnalyzerConstants.FEATURE_OFF != configureManager
+ .getValueLong(ConfigureLabels.FEATURE_CONTEXT_SWITCH)) {
+ tabViewList.add(AnalyzerConstants.PAGE_KERNEL);
} // else nothing
-
+
// file tab
if (AnalyzerConstants.FEATURE_OFF != configureManager
.getValueLong(ConfigureLabels.FEATURE_FILE)) {
- tabViewList.add(CommonConstants.PAGE_FILE);
+ tabViewList.add(AnalyzerConstants.PAGE_FILE);
} // else nothing
- tabViewList.add(CommonConstants.PAGE_SUMMARY); // default : summary tab
- addTabViewPage(tabViewList);
+ tabViewList.add(AnalyzerConstants.PAGE_SUMMARY); // default : summary
+ // tab
+ addTabViewPage(tabViewList);
}
-
+
/**
* add tab pages dynamically
- * @param tabViewList : selected tab pages for adding
+ *
+ * @param tabViewList
+ * : selected tab pages for adding
*/
public void addTabViewPage(List<Integer> tabViewList) {
DABaseComposite newPage = null;
- if(tabViewList != null && tabViewList.size() > 0) {
+ if (tabViewList != null && tabViewList.size() > 0) {
tabView.removeAll(); // remove existing pages
- for(int id : tabViewList) {
- switch(id){
- case CommonConstants.PAGE_FILE:
- newPage = new FilePage(
- tabView.getContentComposite(), SWT.NONE);
+ for (int id : tabViewList) {
+ switch (id) {
+ case AnalyzerConstants.PAGE_FILE:
+ newPage = new FilePage(tabView.getContentComposite(), SWT.NONE);
tabView.addView(newPage, false);
break;
- case CommonConstants.PAGE_GRAPHICS:
- newPage = new GLPage(
- tabView.getContentComposite(), SWT.NONE);
+ case AnalyzerConstants.PAGE_GRAPHICS:
+ newPage = new GLPage(tabView.getContentComposite(), SWT.NONE);
tabView.addView(newPage, false);
break;
- case CommonConstants.PAGE_KERNEL:
- newPage = new KernelPage(
- tabView.getContentComposite(), SWT.NONE);
+ case AnalyzerConstants.PAGE_KERNEL:
+ newPage = new KernelPage(tabView.getContentComposite(), SWT.NONE);
tabView.addView(newPage, false);
break;
- case CommonConstants.PAGE_NETWORK:
- newPage = new NetworkPage(
- tabView.getContentComposite(), SWT.NONE);
+ case AnalyzerConstants.PAGE_NETWORK:
+ newPage = new NetworkPage(tabView.getContentComposite(), SWT.NONE);
tabView.addView(newPage, false);
break;
- case CommonConstants.PAGE_SUMMARY:
- newPage = new SummaryPage(
- tabView.getContentComposite(), SWT.NONE);
+ case AnalyzerConstants.PAGE_SUMMARY:
+ newPage = new SummaryPage(tabView.getContentComposite(), SWT.NONE);
tabView.addView(newPage, false);
break;
- case CommonConstants.PAGE_THREAD:
- newPage = new ThreadPage(
- tabView.getContentComposite(), SWT.NONE);
+ case AnalyzerConstants.PAGE_THREAD:
+ newPage = new ThreadPage(tabView.getContentComposite(), SWT.NONE);
tabView.addView(newPage, false);
break;
- case CommonConstants.PAGE_TIME_LINE:
- newPage = new TimelinePage(
- tabView.getContentComposite(), SWT.NONE);
+ case AnalyzerConstants.PAGE_TIME_LINE:
+ newPage = new TimelinePage(tabView.getContentComposite(), SWT.NONE);
tabView.addView(newPage, false);
break;
- case CommonConstants.PAGE_UI:
- newPage = new UIPage(
- tabView.getContentComposite(), SWT.NONE);
+ case AnalyzerConstants.PAGE_UI:
+ newPage = new UIPage(tabView.getContentComposite(), SWT.NONE);
tabView.addView(newPage, false);
break;
default:
Logger.error("View Page List is Null");
}
}
-
+
/**
* add a tab page dynamically
- * @param tabViewType, tabViewId
+ *
+ * @param tabViewType
+ * , tabViewId
*/
public void addTabViewPage(int tabViewType, String tabViewId) {
DABaseComposite newPage = null;
- if(!tabView.isExistingPage(tabViewId)) { //if the page does not exist, add the page
+ if (!tabView.isExistingPage(tabViewId)) { // if the page does not exist,
+ // add the page
switch (tabViewType) {
- case CommonConstants.PAGE_FILE:
- newPage = new FilePage(
- tabView.getContentComposite(), SWT.NONE);
+ case AnalyzerConstants.PAGE_FILE:
+ newPage = new FilePage(tabView.getContentComposite(), SWT.NONE);
tabView.addView(newPage, false);
break;
- case CommonConstants.PAGE_GRAPHICS:
- newPage = new GLPage(
- tabView.getContentComposite(), SWT.NONE);
+ case AnalyzerConstants.PAGE_GRAPHICS:
+ newPage = new GLPage(tabView.getContentComposite(), SWT.NONE);
tabView.addView(newPage, false);
break;
- case CommonConstants.PAGE_KERNEL:
- newPage = new KernelPage(
- tabView.getContentComposite(), SWT.NONE);
+ case AnalyzerConstants.PAGE_KERNEL:
+ newPage = new KernelPage(tabView.getContentComposite(), SWT.NONE);
tabView.addView(newPage, false);
break;
- case CommonConstants.PAGE_NETWORK:
- newPage = new NetworkPage(
- tabView.getContentComposite(), SWT.NONE);
+ case AnalyzerConstants.PAGE_NETWORK:
+ newPage = new NetworkPage(tabView.getContentComposite(), SWT.NONE);
tabView.addView(newPage, false);
break;
- case CommonConstants.PAGE_SUMMARY:
- newPage = new SummaryPage(
- tabView.getContentComposite(), SWT.NONE);
+ case AnalyzerConstants.PAGE_SUMMARY:
+ newPage = new SummaryPage(tabView.getContentComposite(), SWT.NONE);
tabView.addView(newPage, false);
break;
- case CommonConstants.PAGE_THREAD:
- newPage = new ThreadPage(
- tabView.getContentComposite(), SWT.NONE);
+ case AnalyzerConstants.PAGE_THREAD:
+ newPage = new ThreadPage(tabView.getContentComposite(), SWT.NONE);
tabView.addView(newPage, false);
break;
- case CommonConstants.PAGE_TIME_LINE:
- newPage = new TimelinePage(
- tabView.getContentComposite(), SWT.NONE);
+ case AnalyzerConstants.PAGE_TIME_LINE:
+ newPage = new TimelinePage(tabView.getContentComposite(), SWT.NONE);
tabView.addView(newPage, false);
break;
- case CommonConstants.PAGE_UI:
- newPage = new UIPage(tabView.getContentComposite(),
- SWT.NONE);
+ case AnalyzerConstants.PAGE_UI:
+ newPage = new UIPage(tabView.getContentComposite(), SWT.NONE);
tabView.addView(newPage, false);
break;
default:
Logger.info("Add failed : " + tabViewId + " already exists");
}
}
-
+
/**
* remove a tab page dynamically
+ *
* @param tabViewId
*/
public void removeTabViewPage(String tabViewId) {
- if (tabView.isExistingPage(tabViewId)) { // If the page exist, remove the page
+ if (tabView.isExistingPage(tabViewId)) { // If the page exist, remove
+ // the page
tabView.removeView(tabViewId, false);
} else {
Logger.debug("Remove failed : " + tabViewId + " does not exist");
}
}
-
+
public DAPageComposite getTopComposite() {
Display.getDefault().syncExec(new Runnable() {
@Override
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Display;
-import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
import org.tizen.dynamicanalyzer.common.AnalyzerManager;
import org.tizen.dynamicanalyzer.communicator.DACommunicator;
import org.tizen.dynamicanalyzer.database.SqlConnectionManager;
-import org.tizen.dynamicanalyzer.sql.SqlManager;
import org.tizen.dynamicanalyzer.swap.callstack.BaseCallstackManager;
import org.tizen.dynamicanalyzer.swap.callstack.SWAPCallStackManager;
import org.tizen.dynamicanalyzer.swap.channel.data.DataChannelConstants;
-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;
import org.tizen.dynamicanalyzer.ui.info.callstack.CallStackManager;
private long analysisEndTime = 0;
private boolean isBeingAnalyzed = false;
-
+
private enum Function {
SEQ(1), // ResultSet column index starts from 1
PID(2),
TIME(6),
CALLERPCADDR(7),
PCADDR(8);
-
+
public final int index;
-
+
Function(int index) {
this.index = index;
}
}
-
+
private enum Sample {
- TIME(1),
- PID(2),
- TID(3),
- PCADDR(4);
-
+ TIME(1), PID(2), TID(3), PCADDR(4);
+
public final int index;
-
+
Sample(int index) {
this.index = index;
}
public void startRangeThread() {
clearRange();
if (null == rangeThread || !rangeThread.isAlive()) {
- rangeThread = new Thread(null, getInstance(),
- "Range data manager thread"); //$NON-NLS-1$
+ rangeThread = new Thread(null, getInstance(), "Range data manager thread"); //$NON-NLS-1$
rangeThread.start();
analysisStartTime = markerStartTime;
public void startRangeAnalysis() {
if (!isBeingAnalyzed) {
DATabComposite mainTab = AnalyzerUtil.getMainTab();
- DABaseComposite rangePage = new RangePage(
- mainTab.getContentComposite(), SWT.NONE);
+ DABaseComposite rangePage = new RangePage(mainTab.getContentComposite(), SWT.NONE);
DATabButton rangeTab = mainTab.addView(null, rangePage, true, true);
rangeTab.addCloseButtonListener(new DACustomButtonClickEventListener() {
@Override
}
public boolean isAnalyzable() {
- if (markerStartTime >= 0
- && markerEndTime >= 0
+ if (markerStartTime >= 0 && markerEndTime >= 0
&& (markerStartTime != analysisStartTime || markerEndTime != analysisEndTime)) {
return true;
} else {
@Override
public void run() {
List<Integer> logIds = LogDataFactory.getLogList();
- List<LogData> input = null;
// LogPackage logPackage = new LogPackage();
int size = logIds.size();
- int from = 0;
boolean profileSkip = false;
- boolean contextSkip = false;
- //TODO: divide this method into sub-methods
+ // TODO: divide this method into sub-methods
for (int i = 0; i < size; i++) {
// case 1 : profile data
// log id = profiling data
ResultSet rsSample = null;
PriorityQueue<ProfileData> pQueue = new PriorityQueue<ProfileData>(3,
new Comparator<ProfileData>() {
- public int compare(ProfileData pData1, ProfileData pData2) {
- long time1 = pData1.getTime();
- long time2 = pData2.getTime();
- if (time1 < time2) {
- return -1;
- } else if (time1 > time2) {
- return 1;
- } else {
- return 0;
- }
- }
- });
-
+ public int compare(ProfileData pData1, ProfileData pData2) {
+ long time1 = pData1.getTime();
+ long time2 = pData2.getTime();
+ if (time1 < time2) {
+ return -1;
+ } else if (time1 > time2) {
+ return 1;
+ } else {
+ return 0;
+ }
+ }
+ });
+
try {
String query = String.format(FunctionEntryDBTable.SELECT_QUERY,
markerStartTime, markerEndTime);
rsEntry = SqlConnectionManager.executeQueryRS(query);
-
- query = String.format(FunctionExitDBTable.SELECT_QUERY,
- markerStartTime, markerEndTime);
+
+ query = String.format(FunctionExitDBTable.SELECT_QUERY, markerStartTime,
+ markerEndTime);
rsExit = SqlConnectionManager.executeQueryRS(query);
-
- query = String.format(FunctionSampleDBTable.SELECT_QUERY,
- markerStartTime, markerEndTime);
+
+ query = String.format(FunctionSampleDBTable.SELECT_QUERY, markerStartTime,
+ markerEndTime);
rsSample = SqlConnectionManager.executeQueryRS(query);
-
+
if (rsEntry == null || rsExit == null || rsSample == null) {
Logger.error("failed to query function profiling data in range");
continue;
}
if (rsEntry.next()) {
- ProfileData pEntry =
- makeFunctionProfileData(DataChannelConstants.MSG_FUNCTION_ENTRY, rsEntry);
+ ProfileData pEntry = makeFunctionProfileData(
+ DataChannelConstants.MSG_FUNCTION_ENTRY, rsEntry);
pQueue.offer(pEntry);
}
if (rsExit.next()) {
- ProfileData pExit =
- makeFunctionProfileData(DataChannelConstants.MSG_FUNCTION_EXIT, rsExit);
- pQueue.offer(pExit);
- }
+ ProfileData pExit = makeFunctionProfileData(
+ DataChannelConstants.MSG_FUNCTION_EXIT, rsExit);
+ pQueue.offer(pExit);
+ }
if (rsSample.next()) {
ProfileData pSample = makeSampleProfileData(rsSample);
pQueue.offer(pSample);
}
- // handle entry/exit/sample data one by one in chronological order
+ // handle entry/exit/sample data one by one in
+ // chronological order
while (true) {
ProfileData top = pQueue.poll();
if (top == null) {
break;
}
- ProfileDataMaker profileDataMaker = getProfileDataMakerByPid(top.getPid());
-
- switch(top.getId()) {
+ ProfileDataMaker profileDataMaker = getProfileDataMakerByPid(top
+ .getPid());
+
+ switch (top.getId()) {
case DataChannelConstants.MSG_FUNCTION_ENTRY:
if (rsEntry.next()) {
- ProfileData pEntry =
- makeFunctionProfileData(DataChannelConstants.MSG_FUNCTION_ENTRY, rsEntry);
+ ProfileData pEntry = makeFunctionProfileData(
+ DataChannelConstants.MSG_FUNCTION_ENTRY, rsEntry);
pQueue.offer(pEntry);
}
- swapCallstackManager.makeUserCallstackforRange(top, profileDataMaker);
+ swapCallstackManager.makeUserCallstackforRange(top,
+ profileDataMaker);
break;
case DataChannelConstants.MSG_FUNCTION_EXIT:
if (rsExit.next()) {
- ProfileData pExit =
- makeFunctionProfileData(DataChannelConstants.MSG_FUNCTION_EXIT, rsExit);
- pQueue.offer(pExit);
+ ProfileData pExit = makeFunctionProfileData(
+ DataChannelConstants.MSG_FUNCTION_EXIT, rsExit);
+ pQueue.offer(pExit);
}
- swapCallstackManager.makeUserCallstackforRange(top, profileDataMaker);
+ swapCallstackManager.makeUserCallstackforRange(top,
+ profileDataMaker);
break;
case DataChannelConstants.MSG_DATA_SAMPLE:
if (rsSample.next()) {
Logger.error("Wrong data from selecting function profiling data inside range");
break;
}
- }
+ }
} catch (SQLException e) {
e.printStackTrace();
} finally {
continue;
}
}
- // case 2 : context data
- if (!contextSkip) {
- if (logId == DataChannelConstants.MSG_CONTEXT_SWITCH_ENTRY) {
- from = 0;
- while (true) {
- LogPackage logPackage = new LogPackage();
- Logs logs = new Logs(
- DataChannelConstants.LOG_CONTEXT_SWITCH);
- input = SqlManager.getInstance().selectArea2(logId,
- markerStartTime, markerEndTime, from, AnalyzerConstants.DATABASE_READ_SIZE);
- if (input == null || input.isEmpty()) {
- break;
- }
- logs.setLogs(input);
- logPackage.setLogs(
- DataChannelConstants.LOG_CONTEXT_SWITCH, logs);
- makeRangeData(logPackage);
- from += AnalyzerConstants.DATABASE_READ_SIZE;
- }
- contextSkip = true;
- continue;
- }
- }
- // case 3 : system data
-
- if (logId == DataChannelConstants.MSG_DATA_SYSTEM) {
- from = 0;
- while (true) {
- LogPackage logPackage = new LogPackage();
- Logs logs = new Logs(logId);
- input = SqlManager.getInstance().selectArea2(logId,
- markerStartTime, markerEndTime, from, AnalyzerConstants.DATABASE_READ_SIZE);
- if (input == null || input.isEmpty()) {
- break;
- }
- logs.setLogs(input);
- logPackage.setLogs(logId, logs);
- makeRangeData(logPackage);
- from += AnalyzerConstants.DATABASE_READ_SIZE;
- }
- continue;
- }
- // case 4 : probe data
- if (logId != DataChannelConstants.MSG_DATA_SYSTEM
- && logId != DataChannelConstants.MSG_FUNCTION_ENTRY
- && logId != DataChannelConstants.MSG_FUNCTION_EXIT
- && logId != DataChannelConstants.MSG_CONTEXT_SWITCH_ENTRY
- && logId != DataChannelConstants.MSG_CONTEXT_SWITCH_EXIT
- && logId != DataChannelConstants.MSG_DATA_SAMPLE) {
-
- from = 0;
- while (true) {
- LogPackage logPackage = new LogPackage();
- Logs logs = new Logs(logId);
- input = SqlManager.getInstance().selectArea2(logId,
- markerStartTime, markerEndTime, from, AnalyzerConstants.DATABASE_READ_SIZE);
- if (input == null || input.isEmpty()) {
- break;
- }
- logs.setLogs(input);
- logPackage.setLogs(logId, logs);
- makeRangeData(logPackage);
- from += AnalyzerConstants.DATABASE_READ_SIZE;
- }
- continue;
- }
}
-
+
// make leak data
SummaryDataManager.getInstance().getLeakDataMaker()
.makeLeakDataForRange(Long.valueOf(markerStartTime), Long.valueOf(markerEndTime));
}
});
}
-
+
private ProfileData makeFunctionProfileData(int id, ResultSet rs) {
ProfileData profileData = null;
try {
long time = rs.getLong(Function.TIME.index);
long callerPcAddr = rs.getLong(Function.CALLERPCADDR.index);
long pcAddr = rs.getLong(Function.PCADDR.index);
-
- profileData = new ProfileData(id, seq, pid, tid, functionId,
- binaryId, time, callerPcAddr, pcAddr);
+
+ profileData = new ProfileData(id, seq, pid, tid, functionId, binaryId, time,
+ callerPcAddr, pcAddr);
} catch (SQLException e) {
- e.printStackTrace();
+ e.printStackTrace();
}
return profileData;
}
-
+
private ProfileData makeSampleProfileData(ResultSet rs) {
ProfileData profileData = null;
try {
int pid = rs.getInt(Sample.PID.index);
int tid = rs.getInt(Sample.TID.index);
long pcAddr = rs.getLong(Sample.PCADDR.index);
-
- profileData = new ProfileData(time, pid, tid, pcAddr);
+
+ profileData = new ProfileData(time, pid, tid, pcAddr);
} catch (SQLException e) {
- e.printStackTrace();
+ e.printStackTrace();
}
return profileData;
}
-
- private void makeRangeData(LogPackage logPack) {
- Logs logs = logPack.getLogs(DataChannelConstants.LOG_USER_FUNCTION);
- if (null != logs) {
- List<LogData> profileData = logs.getRawLogs();
- int size = profileData.size();
- for (int i = 0; i < size; i++) {
- ProfileData input = (ProfileData) profileData.get(i);
- ProfileDataMaker profileDataMaker = getProfileDataMakerByPid(input
- .getPid());
- profileDataMaker.makeFunctionUsageProfileData(input);
- }
- }
- }
}
}
public String getType() {
- return LogDataFactory.getLogFormatById(id).getName();
+ return LogDataFactory.getLogFormatName(id);
}
}
data.add(pid);
// 3 : message id
int id = (Integer) leakData.get(MemoryAllocationDataDBTable.COLUMN.MESSAGE_ID.index);
- String type = LogDataFactory.getLogFormatById(id).getName();
+ String type = LogDataFactory.getLogFormatName(id);
text.add(type);
data.add(type);
// 4 : allocated time
data.add(seq);
// 3 : message id
int id = (Integer) idata.get(MemoryAllocationDataDBTable.COLUMN.MESSAGE_ID.index);
- String type = LogDataFactory.getLogFormatById(id).getName();
+ String type = LogDataFactory.getLogFormatName(id);
text.add(type);
data.add(type);
// 4 : allocated time
}
public String getCategory() {
- return LogDataFactory.getLogFormatById(category).getName();
+ return LogDataFactory.getLogFormatName(category);
}
public int getWarningCase() {
data.add(Integer.toString(rid));
// 1 : message id
int msgID = (Integer)idata.get(WarningDataDBTable.COLUMN_INDEX_MESSAGE_ID);
- String category = LogDataFactory.getLogFormatById(msgID).getName();
+ String category = LogDataFactory.getLogFormatName(msgID);
text.add(category);
data.add(category);
// 2 : pid
import java.util.Map;
import org.tizen.dynamicanalyzer.common.AnalyzerManager;
-import org.tizen.dynamicanalyzer.common.GlobalInformation;
+import org.tizen.dynamicanalyzer.common.Global;
import org.tizen.dynamicanalyzer.communicator.DACommunicator;
import org.tizen.dynamicanalyzer.constant.CommonConstants;
import org.tizen.dynamicanalyzer.database.DBTable;
String[] splitedImagePathLog = null;
if (DACommunicator.isTargetEmulator()
&& SocketClient.getInstance().isConnected()) {
- imagePathLog = GlobalInformation.getCurrentDeviceInfo().emulatorScreenshot
+ imagePathLog = Global.getCurrentDeviceInfo().emulatorScreenshot
.getFilePath();
splitedImagePathLog = AnalyzerUtil.splitFilePath(imagePathLog, File.separator);
} else {
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;
import org.tizen.dynamicanalyzer.appearance.DesignConstants;
-import org.tizen.dynamicanalyzer.common.GlobalInformation;
+import org.tizen.dynamicanalyzer.common.Global;
import org.tizen.dynamicanalyzer.nl.WidgetLabels;
import org.tizen.dynamicanalyzer.resources.ColorResources;
import org.tizen.dynamicanalyzer.widgets.button.DACustomButton;
data.height = 476;
data.width = 434;
explorer.setLayoutData(data);
- explorer.setDeviceInfo(GlobalInformation.getCurrentDeviceInfo());
+ explorer.setDeviceInfo(Global.getCurrentDeviceInfo());
Composite buttonComp = new Composite(shell, SWT.NONE);
buttonComp.setLayout(new FormLayout());
import org.tizen.dynamicanalyzer.appearance.DesignConstants;
import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
import org.tizen.dynamicanalyzer.common.AnalyzerManager;
-import org.tizen.dynamicanalyzer.common.GlobalInformation;
+import org.tizen.dynamicanalyzer.common.Global;
import org.tizen.dynamicanalyzer.communicator.DACommunicator;
import org.tizen.dynamicanalyzer.constant.CommonConstants;
import org.tizen.dynamicanalyzer.handlers.CommandActionHandler;
}
String sDeviceName = null;
- DeviceInfo curDev = GlobalInformation.getCurrentDeviceInfo();
+ DeviceInfo curDev = Global.getCurrentDeviceInfo();
if (curDev != null) {
sDeviceName = curDev.getIDevice().getSerialNumber();
}
@Override
public void selectionEvent(DACustomCombo combo) {
String oldDeviceName = null;
- DeviceInfo oldDevInfo = GlobalInformation.getCurrentDeviceInfo();
+ DeviceInfo oldDevInfo = Global.getCurrentDeviceInfo();
if (oldDevInfo != null)
oldDeviceName = oldDevInfo.getIDevice().getSerialNumber();
String serial = combo.getText();
if (serial != null && !serial.equals(oldDeviceName)) {
- GlobalInformation.setCurrentDeviceInfo(DACommunicator
+ Global.setCurrentDeviceInfo(DACommunicator
.setSelectedDeviceBySerial(serial));
if (null != serial && !serial.isEmpty()) {
initAppCombo();
// TODO : implement to select common executable
}
- GlobalInformation.setCurrentApplication(selectedPkg);
- GlobalInformation.getCurrentDeviceInfo().getCommunicator()
+ Global.setCurrentApplication(selectedPkg);
+ Global.getCurrentDeviceInfo().getCommunicator()
.onAppSelected(selectedPkg);
- GlobalInformation.getCurrentDeviceInfo().setSelectedPackageID(
+ Global.getCurrentDeviceInfo().setSelectedPackageID(
selectedPkg.getPackageId());
} else {
enablestart = false;
}
- if (enablestart && null != GlobalInformation.getCurrentDeviceInfo()) {
+ if (enablestart && null != Global.getCurrentDeviceInfo()) {
// AnalyzerUtil
// .setRecordState(RecordStateSourceProvider.RECORD_READY);
AnalyzerManager.setRunningState(false);
deviceCombo.setEnabled(false);
}
- if (!deviceCombo.isEnabled() || null == GlobalInformation.getCurrentDeviceInfo()) {
+ if (!deviceCombo.isEnabled() || null == Global.getCurrentDeviceInfo()) {
appCombo.setEnabled(false);
}
- if (!appCombo.isEnabled() || null == GlobalInformation.getCurrentApplication()) {
+ if (!appCombo.isEnabled() || null == Global.getCurrentApplication()) {
setStartButtonEnablement(false);
}
List<String> pkgs = appCombo.getItems();
if (pkgs != null && pkgs.size() > 0) {
PackageInfo pkgInfo = null;
- String packageID = GlobalInformation.getCurrentDeviceInfo().getSelectedPackageID();
+ String packageID = Global.getCurrentDeviceInfo().getSelectedPackageID();
if (null != packageID && DACommunicator.getPkgInfoByPkgId(packageID) != null) {
pkgInfo = DACommunicator.getPkgInfoByPkgId(packageID);
appCombo.select(0);
}
- GlobalInformation.setCurrentApplication(pkgInfo);
- GlobalInformation.getCurrentDeviceInfo().getCommunicator().onAppSelected(pkgInfo);
- GlobalInformation.getCurrentDeviceInfo().setSelectedPackageID(pkgInfo.getPackageId());
+ Global.setCurrentApplication(pkgInfo);
+ Global.getCurrentDeviceInfo().getCommunicator().onAppSelected(pkgInfo);
+ Global.getCurrentDeviceInfo().setSelectedPackageID(pkgInfo.getPackageId());
// startButton.setButtonEnabled(true);
setStartButtonState(true);
} else {
appCombo.select(0);
- GlobalInformation.setCurrentApplication(null);
+ Global.setCurrentApplication(null);
}
}
} else {
int size = items.size();
int selIndex = 0;
- String selDevice = GlobalInformation.getCurrentDeviceInfo().getIDevice()
+ String selDevice = Global.getCurrentDeviceInfo().getIDevice()
.getSerialNumber();
for (int i = 0; i < size; i++) {
deviceCombo.add(items.get(i));
}
deviceCombo.select(selIndex);
- GlobalInformation.setCurrentDeviceInfo(DACommunicator.getDeviceByName(items
+ Global.setCurrentDeviceInfo(DACommunicator.getDeviceByName(items
.get(selIndex)));
deviceCombo.setToolTipText(items.get(selIndex));
public void setAppComboText(final String text) {
PackageInfo pkgInfo = DACommunicator.getPkgInfoByLabel(text);
if (null != pkgInfo) {
- GlobalInformation.setCurrentApplication(pkgInfo);
- GlobalInformation.getCurrentDeviceInfo().getCommunicator().onAppSelected(pkgInfo);
- GlobalInformation.getCurrentDeviceInfo().setSelectedPackageID(pkgInfo.getPackageId());
+ Global.setCurrentApplication(pkgInfo);
+ Global.getCurrentDeviceInfo().getCommunicator().onAppSelected(pkgInfo);
+ Global.getCurrentDeviceInfo().setSelectedPackageID(pkgInfo.getPackageId());
Display.getDefault().syncExec(new Runnable() {
@Override
public void run() {
public void setAppComboTextByAppId(String id) {
PackageInfo pkgInfo = DACommunicator.getPkgInfoByMainAppID(id);
if (null != pkgInfo) {
- GlobalInformation.setCurrentApplication(pkgInfo);
- GlobalInformation.getCurrentDeviceInfo().getCommunicator().onAppSelected(pkgInfo);
- GlobalInformation.getCurrentDeviceInfo().setSelectedPackageID(pkgInfo.getPackageId());
+ Global.setCurrentApplication(pkgInfo);
+ Global.getCurrentDeviceInfo().getCommunicator().onAppSelected(pkgInfo);
+ Global.getCurrentDeviceInfo().setSelectedPackageID(pkgInfo.getPackageId());
appCombo.setText(pkgInfo.getMainApp().getInfo(AppInfo.PROPERTY.LABEL.index));
}
}
}
String text = deviceCombo.getText();
- String device = GlobalInformation.getCurrentDeviceInfo().getIDevice()
+ String device = Global.getCurrentDeviceInfo().getIDevice()
.getSerialNumber();
if (!device.equals(text)) {
// startButton.setButtonEnabled(false);
public void run() {
String text = deviceCombo.getText();
String device = null;
- DeviceInfo curDev = GlobalInformation.getCurrentDeviceInfo();
+ DeviceInfo curDev = Global.getCurrentDeviceInfo();
if (curDev != null)
device = curDev.getIDevice().getSerialNumber();
if (device == null || !device.equals(text)) {
private void setStartButtonState(boolean enabled) {
if (enabled) {
- DeviceInfo device = GlobalInformation.getCurrentDeviceInfo();
+ DeviceInfo device = Global.getCurrentDeviceInfo();
if (null != device && device.isConfigSuccess()) {
startButton.setButtonEnabled(true);
}
import org.eclipse.nebula.widgets.grid.Grid;
import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
-import org.tizen.dynamicanalyzer.common.GlobalInformation;
+import org.tizen.dynamicanalyzer.common.Global;
import org.tizen.dynamicanalyzer.common.HostResult;
import org.tizen.dynamicanalyzer.communicator.DACommunicator;
import org.tizen.dynamicanalyzer.constant.CommonConstants;
public void applySwapValue(DATableComposite featuresTable) {
setFeaturesValueFromTableItemsList(featuresTable.getTable());
applySettingValueToConfigureManager();
- if (null != GlobalInformation.getCurrentDeviceInfo()) {
+ if (null != Global.getCurrentDeviceInfo()) {
HostResult result = DACommunicator.sendRuntimeMessage(
DACommunicator.MSG_TYPE_CONFIG, null);
if (!result.equals(HostResult.SUCCESS)) {
applyFailedSwapValue(featuresTable);
- } else if (!GlobalInformation.getCurrentDeviceInfo()
+ } else if (!Global.getCurrentDeviceInfo()
.isConfigSuccess()) {
- GlobalInformation.getCurrentDeviceInfo().setConfigSuccess(true);
+ Global.getCurrentDeviceInfo().setConfigSuccess(true);
ToolbarArea.getInstance().setStartButtonEnablement(true);
} else {
updateFeaturesValueFromConfigureManager();
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.tizen.dynamicanalyzer.common.AnalyzerConstants;
-import org.tizen.dynamicanalyzer.common.GlobalInformation;
+import org.tizen.dynamicanalyzer.common.Global;
import org.tizen.dynamicanalyzer.common.ScreenshotConstants;
import org.tizen.dynamicanalyzer.common.path.PathManager;
import org.tizen.dynamicanalyzer.constant.CommonConstants;
}
private void getDeviceResolution() {
- String selDeviceName = GlobalInformation.getCurrentDeviceInfo()
+ String selDeviceName = Global.getCurrentDeviceInfo()
.getIDevice().getDeviceName();
String resolutionInfoXmlPath = PathManager.TIZEN_SDK_DATA_PATH
+ File.separator + "emulator-vms" + File.separator + "vms"//$NON-NLS-1$