--- /dev/null
+/*
+ * Dynamic Analyzer
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * 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.common;
+
+public class DALimit {
+
+ /*
+ * limit of each information size
+ * if the size is over, read/write/send/receive in file or cut it down.
+ */
+ // common
+ public static final int FUNCTION_NAME_LENGTH = 1024;
+ public static final int FILEPATH_LENGTH = 1024;
+ public static final int FUNCTION_ARGUMENTS_FORMAT_LENGTH = 100;
+ public static final int FUNCTION_ARGUMENTS_VALUE_LENGTH = 1024;
+ // OpenGL Analysis
+ public static final int SHADER_SOURCE_LENGTH = 4096;
+ public static final int SHADER_VARIABLE_LENGTH = 1024;
+ // Network Analysis
+ public static final int HTML_SCRIPT_LENGTH = 4096;
+
+
+ /*
+ * maximum limit of the tool can manager
+ * if one of the value is over, stop the trace.
+ */
+ // common
+ public static final int MAX_TRACE_TIME_INSECOND = 24*60*60; // 1 day
+ public static final long MAX_SEQUENCE_NUMBER = Long.MAX_VALUE; //2^63-1, 4G*2G-1
+ public static final int MAX_PROCESS_COUNT = 2^16; // 65535
+ public static final int MAX_BINARY_COUNT = 2^16; // 65535
+ public static final int MAX_FUNCTION_COUNT = 2^20; // 1,048,576
+ public static final int MAX_FUNCTION_ARGUMENTS_COUNT = FUNCTION_ARGUMENTS_FORMAT_LENGTH; // Because "MAX_FUNCTION_ARGUMENTS_COUNT < FUNCTION_ARGUMENTS_FORMAT_LENGTH" is always true
+
+ // Leak
+ public static final int MAX_LEAK_CHECK_BUFFER_SIZE = 2^20; // 1,048,576
+
+ // File Analysis
+ public static final int MAX_FILE_COUNT = 2^10; // 1024
+ public static final int MAX_FILE_STATUS_COUNT = 2^10*100; // 102400
+ public static final int MAX_FILE_ACCESSOR_COUNT = 2^10*100; // 102400
+
+}
+/*
+ * Dynamic Analyzer
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * 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.database;
import org.tizen.dynamicanalyzer.constant.CommonConstants;
public class DBConstants {
+
+ /*
+ * These are mainly made for the reference of reserved SQL words, types and columns.
+ * You don't have to use these definitions.
+ */
// options constant
public static final String EMPTY = CommonConstants.EMPTY;
- public static final String PRIMARY_KEY = "PRIMARY KEY NOT NULL";//$NON-NLS-1$
- public static final String NOT_NULL = "not null";//$NON-NLS-1$
-
- // TODO : need to discuss about each limits
- // length of common string column
- public static final int FUNCNAME_LEN = 256;
- public static final int FILENAME_LEN = 256;
- public static final int FILEPATH_LEN = 1024;
+ public static final String PRIMARY_KEY = "PRIMARY KEY";//$NON-NLS-1$
+ public static final String NOT_NULL = "NOT NULL";//$NON-NLS-1$
+ public static final String ARRAY = "ARRAY";//$NON-NLS-1$
+ public static final String UNLIMITTED_ARRAY = "ARRAY[]";//$NON-NLS-1$
+
+ // types constant
+ public static final String DBTYPE_INT1 = "TYNYINT";//$NON-NLS-1$
+ public static final String DBTYPE_INT2 = "SMALLINT";//$NON-NLS-1$
+ public static final String DBTYPE_INT4 = "INTEGER";//$NON-NLS-1$
+ public static final String DBTYPE_INT8 = "BIGINT";//$NON-NLS-1$
+ public static final String DBTYPE_LONG = "BIGINT";//$NON-NLS-1$
+ public static final String DBTYPE_FLOAT = "FLOAT";//$NON-NLS-1$
+ public static final String DBTYPE_DOUBLE = "DOUBLE";//$NON-NLS-1$
+ public static final String DBTYPE_BOOLEAN = "BOOLEAN";//$NON-NLS-1$
+ public static final String DBTYPE_CHAR = "CHAR";//$NON-NLS-1$
+ public static final String DBTYPE_VARCHAR = "VARCHAR";//$NON-NLS-1$
+
+ // common column name
+ public static final String DBCOLUMN_RID = "RID";//$NON-NLS-1$
+ public static final String DBCOLUMN_SEQUENCE_NUMBER = "SEQUENCE_NUMBER";//$NON-NLS-1$
+ public static final String DBCOLUMN_START_TIME = "START_TIME";//$NON-NLS-1$
+ public static final String DBCOLUMN_END_TIME = "END_TIME";//$NON-NLS-1$
+ public static final String DBCOLUMN_PROCESS_ID = "PROCESS_ID";//$NON-NLS-1$
+ public static final String DBCOLUMN_THREAD_ID = "THREAD_ID";//$NON-NLS-1$
+ public static final String DBCOLUMN_ARGUMENT = "ARGUMENT";//$NON-NLS-1$
+ public static final String DBCOLUMN_RETURN_VALUE = "RETURN_VALUE";//$NON-NLS-1$
+ public static final String DBCOLUMN_ERROR_NUMBER = "ERROR_NUMBER";//$NON-NLS-1$
+ public static final String DBCOLUMN_CALLER_PC_ADDRESS = "CALLER_PC_ADDRESS";//$NON-NLS-1$
+ public static final String DBCOLUMN_CALLER_LIBRARY_NAME = "CALLER_LIBRARY_NAME";//$NON-NLS-1$
+
+ /* deprecated
+ * WARNING: don't use below definition anymore
+ * These will be removed at 2014-06-30
+ */
// length of string type column
public static final int TEXT_LEN = 256;
public static final int BIG_TEXT_LEN = 1024;
public static final int BIGBIG_TEXT_LEN = 16384;
- // types type constant
- public static final String BOOLEAN = "BOOLEAN";//$NON-NLS-1$
- public static final String VARCHAR = "VARCHAR";//$NON-NLS-1$
public static final String TEXT = "VARCHAR(" + TEXT_LEN + ")";//$NON-NLS-1$
public static final String BIG_TEXT = "VARCHAR(" + BIG_TEXT_LEN + ")";//$NON-NLS-1$
public static final String BIGBIG_TEXT = "VARCHAR(" + BIGBIG_TEXT_LEN + ")";//$NON-NLS-1$
+ public static final String TEXT_LIB_NAME = "VARCHAR(1024)";//$NON-NLS-1$
+
+ // types type constant
+ public static final String BOOLEAN = "BOOLEAN";//$NON-NLS-1$
+ public static final String VARCHAR = "VARCHAR";//$NON-NLS-1$
public static final String INTEGER = "INTEGER";//$NON-NLS-1$
public static final String LONG = "BIGINT";//$NON-NLS-1$
public static final String FLOAT = "DOUBLE";
- public static final String TEXT_LIB_NAME = "VARCHAR(1024)";//$NON-NLS-1$
// common column name
public static final String COMMON_COLUMN_RID = "RID";//$NON-NLS-1$