private void ProcessSyscall(SyscallEvent newEntry) { if (!syscallEvents.TryGetValue(newEntry.Name, out List <SyscallEvent> syscallList)) { syscallList = new List <SyscallEvent>(); syscallEvents[newEntry.Name] = syscallList; } syscallList.Add(newEntry); }
public Syscall(SyscallEvent entryLogLine, SyscallEvent exitLogLine, ThreadBasicInfo threadInfo) { if ("unknown".Equals(entryLogLine.Name)) { this.name = String.Empty; } else { this.name = entryLogLine.Name; } this.startTime = entryLogLine.Timestamp; StringBuilder argumentsText = new StringBuilder("{"); foreach (var entry in entryLogLine.Fields) { argumentsText.Append(entry.Key.TrimStart('_')); argumentsText.Append(": "); argumentsText.Append(entry.Value.GetValueAsString()); argumentsText.Append(", "); } if (entryLogLine.Fields.Count > 0) { argumentsText.Remove(argumentsText.Length - 2, 2); } argumentsText.Append("}"); this.arguments = argumentsText.ToString(); if (entryLogLine.Tid >= 0) { this.tid = entryLogLine.Tid.ToString(); } else { this.tid = String.Empty; } this.pid = threadInfo.Pid; this.command = threadInfo.Command; if (exitLogLine != null) { this.endTime = exitLogLine.Timestamp; this.returnValue = exitLogLine.Fields["_ret"].GetValueAsString(); } else { this.endTime = entryLogLine.Timestamp; this.returnValue = String.Empty; } }