X-Git-Url: https://git.saurik.com/apple/system_cmds.git/blobdiff_plain/1a7e3f61d38d679bba59130891c2031b5a0092b6..bd6521f0fc816ab056bc71376f9706a69b3b52c1:/KDBG/TraceFile.cpp diff --git a/KDBG/TraceFile.cpp b/KDBG/TraceFile.cpp new file mode 100644 index 0000000..bddf161 --- /dev/null +++ b/KDBG/TraceFile.cpp @@ -0,0 +1,28 @@ +// +// TraceFile.cpp +// system_cmds +// +// Created by James McIlree on 4/1/14. +// +// + +#include "KDebug.h" + +TraceFile::TraceFile(const char* path, bool sort_events, uint32_t default_ap_count, uint32_t default_iop_count) : + _file(path), + _version(kTraceFileVersion::Unknown), + _is_64_bit(false), + _is_valid(false), + _threadmap(nullptr), + _threadmap_count(0), + _cpumap(nullptr), + _cpumap_count(0), + _events(nullptr), + _event_count(0) +{ + try { + parse(sort_events, default_ap_count, default_iop_count); + } catch (...) { + parse(sort_events, default_ap_count, default_iop_count); + } +}