Compress/decompress memory automatically in trace files

This commit is contained in:
Dr. Chat
2015-11-20 16:58:40 -06:00
parent f3832a06c1
commit 0f2f4ab9b6
7 changed files with 78 additions and 8 deletions

View File

@@ -40,8 +40,14 @@ class TraceWriter {
void WriteEvent(EventType event_type);
private:
size_t WriteCompressed(void* buf, size_t length);
uint8_t* membase_;
FILE* file_;
bool compress_output_ = true;
size_t compression_threshold_ = 0x1000; // min. number of bytes to compress.
std::vector<uint8_t> tmp_buff_;
};
} // namespace gpu