/* Tracefile.h This header file defines elements that comprise the syntax of a created trace file. A "trace file" is actually comprised of two files: .br - holds actual trace info .map - holds Index-Branch::data correspondences (sorted by index, used in decompression) .prof - holds Index-Branch::profdata correspondences (sorted by index, used in decompression) */ #ifndef TRACEFILE_H #define TRACEFILE_H #define COMPRESS_MAGIC_STRING "2b|!2b.?" // To be or not to be (a compressed tracefile), that is the question #define RICHCOMPRESS_MAGIC_STRING "2bRICH.?" // To be rich, that is the question // branch data enriched (see RichBranch class) #define MAP_EXTENSION ".map" // file extension for Map files #define PROF_EXTENSION ".prof" // file extension for profiling files #define TEXTMAP_EXTENSION ".txtmap" // file extension for readable Map files #define HISTMAP_EXTENSION ".histmap" // file extension for histogram files #define BRANCH_EXTENSION ".br" // file extension for Branch files #define FILEPATHLENGTH 255 // bytes are cheap, filepaths are long // Header on .br and .map files: struct fCompressHeader { char magic[8]; // MAGIC_STRING char mapName[FILEPATHLENGTH]; // name of associated .map file char brName[FILEPATHLENGTH]; // name of associated .br file unsigned int nrBytes; // bytes per Branch::data or Branch:profdata unsigned int mapsize; // nr of different Branch::data records (.map and .prof only) unsigned int brsize; // nr of Branch::data records (.map only) }; #endif // TRACEFILE_H