Home | History | Annotate | Download | only in blktrace

Lines Matching refs:bit

104 static void dump_trace(FILE *ofp, char *prefix, struct blk_io_trace *bit)
107 fprintf(ofp, " %8s: %08x\n", "magic", bit->magic);
108 fprintf(ofp, " %8s: %u\n", "sequence", bit->sequence);
109 fprintf(ofp, " %8s: %llu\n", "time", (unsigned long long) bit->time);
110 fprintf(ofp, " %8s: %llu\n", "sector", (unsigned long long) bit->sector);
111 fprintf(ofp, " %8s: %u\n", "bytes", bit->bytes);
112 fprintf(ofp, " %8s: %s\n", "action", act_to_str(bit->action));
113 fprintf(ofp, " %8s: %u\n", "bytes", bit->bytes);
114 fprintf(ofp, " %8s: %u\n", "cpu", bit->cpu);
115 fprintf(ofp, " %8s: %u\n", "error", bit->error);
116 fprintf(ofp, " %8s: %u\n", "pdu_len", bit->pdu_len);
117 fprintf(ofp, " %8s: (%u,%u)\n\n", "device", MAJOR(bit->device),
118 MINOR(bit->device));
126 bit_save = bit; \
127 bit = tmp; \
130 bit_save = bit; \
131 bit = malloc(sizeof(struct blk_io_trace)); \
139 dump_trace(ofp, str, bit); \
148 struct blk_io_trace *bit = malloc(sizeof(struct blk_io_trace));
174 while ((n = fread(bit, sizeof(struct blk_io_trace), 1, ifp)) == 1) {
181 check_data_endianness(bit->magic);
183 trace_to_cpu(bit);
185 if (!CHECK_MAGIC(bit)) {
190 if ((bit->magic & 0xff) != SUPPORTED_VERSION) {
195 if (bit->pdu_len) {
198 pdu_buf = malloc(bit->pdu_len);
199 n = fread(pdu_buf, bit->pdu_len, 1, ifp);
208 if (bit->cpu != cpu) {
217 if (bit->action & BLK_TC_ACT(BLK_TC_NOTIFY))
221 if (bit->sequence <= save_sequence) {
226 else if (bit->time <= save_time) {
231 else if (bit->device != save_device) {
238 save_sequence = bit->sequence;
239 save_time = bit->time;
240 save_device = bit->device;