Lines Matching defs:trace_store
120 extern TraceAddr trace_store;
129 TraceAddr trace_store;
424 trace_store.fstream = NULL;
444 trace_store.filename = fname;
451 trace_store.fstream = fstream;
452 trace_store.next = &trace_store.buffer[0];
453 trace_store.compressed_ptr = trace_store.compressed;
454 trace_store.high_water_ptr = &trace_store.compressed[kCompressedSize] - kMaxAddrCompressed;
455 trace_store.prev_addr = 0;
456 trace_store.prev_time = 0;
762 if (trace_store.fstream) {
764 char *comp_ptr = trace_store.compressed_ptr;
765 AddrRec *next = trace_store.next;
766 uint32_t prev_addr = trace_store.prev_addr;
767 uint64_t prev_time = trace_store.prev_time;
768 for (ptr = trace_store.buffer; ptr != next; ++ptr) {
769 if (comp_ptr >= trace_store.high_water_ptr) {
770 uint32_t size = comp_ptr - trace_store.compressed;
771 fwrite(trace_store.compressed, sizeof(char), size,
772 trace_store.fstream);
773 comp_ptr = trace_store.compressed;
785 uint32_t size = comp_ptr - trace_store.compressed;
787 fwrite(trace_store.compressed, sizeof(char), size,
788 trace_store.fstream);
794 fwrite(&zeros, 2, 1, trace_store.fstream);
795 fclose(trace_store.fstream);