tempMap.put(0x0007, "MSG_DATA_RECORD");
tempMap.put(0x0008, "MSG_FUNCTION_ENTRY");
tempMap.put(0x0009, "MSG_FUNCTION_EXIT");
+ tempMap.put(0x000A, "MSG_SYSCALL_ENTRY");
+ tempMap.put(0x000B, "MSG_SYSCALL_EXIT");
tempMap.put(0x0010, "MSG_CONTEXT_SWITCH_ENTRY");
tempMap.put(0x0011, "MSG_CONTEXT_SWITCH_EXIT");
tempMap.put(0x0012, "MSG_PROCESS_MAP");
tempMap.put(0x0013, "MSG_PROCESS_UNMAP");
tempMap.put(0x0014, "MSG_PROCESS_COMM");
+ tempMap.put(0x0015, "MSG_WEB_FUNCTION_ENTRY");
+ tempMap.put(0x0016, "MSG_WEB_FUNCTION_EXIT");
+ tempMap.put(0x0019, "MSG_APP_STARTUP");
+ tempMap.put(0x001A, "MSG_WEB_APP_STARTUP");
// data probe message id
tempMap.put(0x0101, "MSG_PROBE_MIN");
public static final int MSG_DATA_RECORD = 0x0007;
public static final int MSG_FUNCTION_ENTRY = 0x0008;
public static final int MSG_FUNCTION_EXIT = 0x0009;
+ public static final int MSG_SYSCALL_ENTRY = 0x000A;
+ public static final int MSG_SYSCALL_EXIT = 0x000B;
public static final int MSG_FILE_FUNCTION_ENTRY = 0x000C;
public static final int MSG_FILE_FUNCTION_EXIT = 0x000D;
public static final int MSG_CONTEXT_SWITCH_ENTRY = 0x0010;
packLog(log, logPack);
}
break;
+ case ProtocolConstants.MSG_SYSCALL_ENTRY: // protocol 4.0
+ case ProtocolConstants.MSG_SYSCALL_EXIT: // protocol 4.0
+ // do nothing
+ break;
case ProtocolConstants.MSG_WEB_FUNCTION_ENTRY:
case ProtocolConstants.MSG_WEB_FUNCTION_EXIT:
ret = processWebFunctionData((WebProfileData) log);
packLog(log, logPack);
}
break;
-
case ProtocolConstants.MSG_DATA_SAMPLE:
case ProtocolConstants.MSG_DATA_SYSTEM:
case ProtocolConstants.MSG_DATA_RECORD:
case ProtocolConstants.MSG_CONTEXT_SWITCH_ENTRY:
case ProtocolConstants.MSG_CONTEXT_SWITCH_EXIT:
case ProtocolConstants.MSG_DATA_RECORD:
- case ProtocolConstants.MSG_APP_STARTUP:
- case ProtocolConstants.MSG_WEB_APP_STARTUP:
- case ProtocolConstants.MSG_WEB_FUNCTION_ENTRY:
- case ProtocolConstants.MSG_WEB_FUNCTION_EXIT:
+ case ProtocolConstants.MSG_APP_STARTUP: // protocol 4.0
+ case ProtocolConstants.MSG_WEB_APP_STARTUP: // protocol 4.0
+ case ProtocolConstants.MSG_WEB_FUNCTION_ENTRY: // protocol 4.0
+ case ProtocolConstants.MSG_WEB_FUNCTION_EXIT: // protocol 4.0
case ProtocolConstants.MSG_FUNCTION_BODY:
case ProtocolConstants.MSG_FILE_FUNCTION_ENTRY: // protocol 4.0
case ProtocolConstants.MSG_FILE_FUNCTION_EXIT: // protocol 4.0
+ case ProtocolConstants.MSG_SYSCALL_ENTRY: // protocol 4.0
+ case ProtocolConstants.MSG_SYSCALL_EXIT: // protocol 4.0
if (AnalyzerManager.isProcessInfoArrived()) {
sendBuffer.add(log);
}
// profiling sample log
output = new ProfileData();
break;
+ case ProtocolConstants.MSG_SYSCALL_ENTRY: // protocol 4.0
+ case ProtocolConstants.MSG_SYSCALL_EXIT: // protocol 4.0
+ output = new SyscallData();
+ break;
case ProtocolConstants.MSG_FILE_FUNCTION_ENTRY: // protocol 4.0
case ProtocolConstants.MSG_FILE_FUNCTION_EXIT: // protocol 4.0
output = new FileSyscallData();
case ProtocolConstants.MSG_WEB_FUNCTION_EXIT: // protocol 4.0
formatName = "WebProfiling";
break;
+ case ProtocolConstants.MSG_SYSCALL_ENTRY: // protocol 4.0
+ case ProtocolConstants.MSG_SYSCALL_EXIT: // protocol 4.0
+ // syscall enter/exit
+ formatName = "Syscall";
+ break;
default:
break;
}
--- /dev/null
+/*
+ * Dynamic Analyzer
+ *
+ * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
+ *
+ * Contact:
+ * Heeyoung Hwang <heeyoung1008.hwang@samsung.com>
+ * WooJin Jung <woojin2.jung@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.data;
+
+import org.tizen.dynamicanalyzer.model.DATime;
+import org.tizen.dynamicanalyzer.protocol.ProtocolConstants;
+
+public class SyscallData extends LogData {
+ protected int pid = 0; // protocol 4.0
+ protected int tid = 0; // protocol 4.0
+ protected int probeType = 0; // protocol 4.0
+ protected long pcAddr = 0; // protocol 4.0
+ protected long callerPcAddr = 0; // protocol 4.0
+ protected int cpuNum = 0; // protocol 4.0
+ protected String args = null; // protocol 4.0
+ protected String ret = null; // protocol 4.0
+
+ public SyscallData() {
+ }
+
+ @Override
+ public SyscallData clone() throws CloneNotSupportedException {
+ throw new CloneNotSupportedException();
+ }
+
+ @Override
+ protected boolean parse(DATime startTime) {
+ super.parse(startTime);
+
+ // start of protocol 4.0
+ switch (msgID) {
+ case ProtocolConstants.MSG_SYSCALL_ENTRY:
+ pid = getInt();
+ tid = getInt();
+ probeType = getInt();
+ pcAddr = getLong();
+ callerPcAddr = getLong();
+ cpuNum = getInt();
+ args = parseArgs();
+ break;
+ case ProtocolConstants.MSG_SYSCALL_EXIT:
+ pid = getInt();
+ tid = getInt();
+ probeType = getInt();
+ pcAddr = getLong();
+ callerPcAddr = getLong();
+ cpuNum = getInt();
+ ret = parseReturn();
+ break;
+ default:
+ break;
+ }
+ // end of protocol 4.0
+
+ return true;
+ }
+
+ public int getPID() {
+ return pid;
+ }
+
+ public void setPID(int pid) {
+ this.pid = pid;
+ }
+
+ public int getTID() {
+ return tid;
+ }
+
+ public void setTID(int tid) {
+ this.tid = tid;
+ }
+
+ public int getProbeType() {
+ return probeType;
+ }
+
+ public void setProbeType(int probeType) {
+ this.probeType = probeType;
+ }
+
+ public long getPcAddr() {
+ return pcAddr;
+ }
+
+ public void setPcAddr(long pcAddr) {
+ this.pcAddr = pcAddr;
+ }
+
+ public long getCallerPcAddr() {
+ return callerPcAddr;
+ }
+
+ public void setCallerPcAddr(long callerPcAddr) {
+ this.callerPcAddr = callerPcAddr;
+ }
+
+ public int getCpuNum() {
+ return cpuNum;
+ }
+
+ public void setCpuNum(int cpuNum) {
+ this.cpuNum = cpuNum;
+ }
+
+ public String getArgs() {
+ return args;
+ }
+
+ public void setArgs(String args) {
+ this.args = args;
+ }
+
+ public String getRet() {
+ return ret;
+ }
+
+ public void setRet(String ret) {
+ this.ret = ret;
+ }
+}
\ No newline at end of file