Home | History | Annotate | Download | only in blktrace

Lines Matching defs:bit

45 	struct blk_io_trace bit;
108 struct blk_io_trace *bit = &t->bit;
114 fprintf(debug.fp, "magic %16d\n", bit->magic);
115 fprintf(debug.fp, "sequence %16d\n", bit->sequence);
116 fprintf(debug.fp, "time %16ld\n", (unsigned long)bit->time);
117 fprintf(debug.fp, "sector %16ld\n", (unsigned long)bit->sector);
118 fprintf(debug.fp, "bytes %16d\n", bit->bytes);
119 fprintf(debug.fp, "action %16x\n", bit->action);
120 fprintf(debug.fp, "pid %16d\n", bit->pid);
121 fprintf(debug.fp, "device %16d\n", bit->device);
122 fprintf(debug.fp, "cpu %16d\n", bit->cpu);
123 fprintf(debug.fp, "error %16d\n", bit->error);
124 fprintf(debug.fp, "pdu_len %16d\n", bit->pdu_len);
131 struct blk_io_trace *bit1 = &t1->bit;
132 struct blk_io_trace *bit2 = &t2->bit;
368 int i = t->bit.sector % TRACE_HASH_SIZE;
374 static struct trace *blkiomon_fetch_trace(struct blk_io_trace *bit)
376 int i = bit->sector % TRACE_HASH_SIZE;
380 if (t->bit.device == bit->device &&
381 t->bit.sector == bit->sector &&
382 action(t->bit.action) == action(bit->action)) {
399 t_stored = blkiomon_fetch_trace(&t->bit);
406 if (t_stored->bit.time < t->bit.time) {
415 if (t_old->bit.action & BLK_TC_ACT(BLK_TC_ISSUE) &&
416 t_young->bit.action & BLK_TC_ACT(BLK_TC_COMPLETE)) {
419 blkiomon_account(&t_old->bit, &t_young->bit);
431 static int blkiomon_dump_drvdata(struct blk_io_trace *bit, void *pdu_buf)
436 if (fwrite(bit, sizeof(*bit), 1, drvdata.fp) != 1)
438 if (fwrite(pdu_buf, bit->pdu_len, 1, drvdata.fp) != 1)
454 struct blk_io_trace *bit;
460 bit = &t->bit;
463 if (fread(bit, sizeof(*bit), 1, ifp) != 1) {
475 if (data_is_native == -1 && check_data_endianness(bit->magic)) {
481 trace_to_cpu(bit);
482 if (verify_trace(bit)) {
488 if (bit->pdu_len) {
489 pdu_buf = realloc(pdu_buf, bit->pdu_len);
490 if (fread(pdu_buf, bit->pdu_len, 1, ifp) != 1) {
500 if (bit->action & BLK_TC_ACT(BLK_TC_DRV_DATA)) {
502 if (blkiomon_dump_drvdata(bit, pdu_buf)) {
509 if (!(bit->action & BLK_TC_ACT(BLK_TC_ISSUE | BLK_TC_COMPLETE)))
518 bit = &t->bit;
519 /* t and bit will be recycled for next incoming trace */