Lines Matching refs:fstream
83 void DmTrace::write2LE(FILE* fstream, unsigned short val)
85 putc(val & 0xff, fstream);
86 putc(val >> 8, fstream);
89 void DmTrace::write4LE(FILE* fstream, unsigned int val)
91 putc(val & 0xff, fstream);
92 putc((val >> 8) & 0xff, fstream);
93 putc((val >> 16) & 0xff, fstream);
94 putc((val >> 24) & 0xff, fstream);
97 void DmTrace::write8LE(FILE* fstream, unsigned long long val)
99 putc(val & 0xff, fstream);
100 putc((val >> 8) & 0xff, fstream);
101 putc((val >> 16) & 0xff, fstream);
102 putc((val >> 24) & 0xff, fstream);
103 putc((val >> 32) & 0xff, fstream);
104 putc((val >> 40) & 0xff, fstream);
105 putc((val >> 48) & 0xff, fstream);
106 putc((val >> 56) & 0xff, fstream);
109 void DmTrace::writeHeader(FILE *fstream, uint64_t startTime)
111 write4LE(fstream, header.magic);
112 write2LE(fstream, header.version);
113 write2LE(fstream, header.offset);
114 write8LE(fstream, startTime);
117 void DmTrace::writeDataRecord(FILE *fstream, int threadId,
121 write2LE(fstream, threadId);
122 write4LE(fstream, methodVal);
123 write4LE(fstream, elapsedTime);
229 void DmTrace::writeKeyFile(FILE *fstream)
231 fwrite(keyHeader, strlen(keyHeader), 1, fstream);
232 writeThreads(fstream);
233 writeFunctions(fstream);
234 fwrite(keyEnd, strlen(keyEnd), 1, fstream);
237 void DmTrace::writeThreads(FILE *fstream)
241 fwrite(keyThreadHeader, strlen(keyThreadHeader), 1, fstream);
243 fprintf(fstream, "%d\t%s\n", (*iter)->id, (*iter)->name);
247 void DmTrace::writeFunctions(FILE *fstream)
251 fwrite(keyFunctionHeader, strlen(keyFunctionHeader), 1, fstream);
253 fprintf(fstream, "0x%x\t%s\n", (*iter)->id, (*iter)->name);