Index: ps/trunk/source/ps/Profiler2.h =================================================================== --- ps/trunk/source/ps/Profiler2.h +++ ps/trunk/source/ps/Profiler2.h @@ -112,7 +112,7 @@ ITEM_ATTRIBUTE = 5, // arbitrary string associated with current region, or latest event (if the previous item was an event) }; - static const size_t MAX_ATTRIBUTE_LENGTH = 256; // includes null terminator, which isn't stored + static const size_t MAX_ATTRIBUTE_LENGTH; // includes null terminator, which isn't stored /// An arbitrary number to help resyncing with the item stream when parsing. static const u8 RESYNC_MAGIC[8]; @@ -127,10 +127,9 @@ }; private: - // TODO: what's a good size? // TODO: different threads might want different sizes - static const size_t BUFFER_SIZE = 4*1024*1024; - static const size_t HOLD_BUFFER_SIZE = 128 * 1024; + static const size_t BUFFER_SIZE; + static const size_t HOLD_BUFFER_SIZE; /** * Class instantiated in every registered thread. Index: ps/trunk/source/ps/Profiler2.cpp =================================================================== --- ps/trunk/source/ps/Profiler2.cpp +++ ps/trunk/source/ps/Profiler2.cpp @@ -36,6 +36,12 @@ CProfiler2 g_Profiler2; +const size_t CProfiler2::MAX_ATTRIBUTE_LENGTH = 256; + +// TODO: what's a good size? +const size_t CProfiler2::BUFFER_SIZE = 4 * 1024 * 1024; +const size_t CProfiler2::HOLD_BUFFER_SIZE = 128 * 1024; + // A human-recognisable pattern (for debugging) followed by random bytes (for uniqueness) const u8 CProfiler2::RESYNC_MAGIC[8] = {0x11, 0x22, 0x33, 0x44, 0xf4, 0x93, 0xbe, 0x15};