]> git.saurik.com Git - apple/system_cmds.git/blob - KDBG/TraceFile.cpp
bddf161f99f98c2c929c3cc48b004883101ca918
[apple/system_cmds.git] / KDBG / TraceFile.cpp
1 //
2 // TraceFile.cpp
3 // system_cmds
4 //
5 // Created by James McIlree on 4/1/14.
6 //
7 //
8
9 #include "KDebug.h"
10
11 TraceFile::TraceFile(const char* path, bool sort_events, uint32_t default_ap_count, uint32_t default_iop_count) :
12 _file(path),
13 _version(kTraceFileVersion::Unknown),
14 _is_64_bit(false),
15 _is_valid(false),
16 _threadmap(nullptr),
17 _threadmap_count(0),
18 _cpumap(nullptr),
19 _cpumap_count(0),
20 _events(nullptr),
21 _event_count(0)
22 {
23 try {
24 parse<Kernel64>(sort_events, default_ap_count, default_iop_count);
25 } catch (...) {
26 parse<Kernel32>(sort_events, default_ap_count, default_iop_count);
27 }
28 }