Lines Matching refs:mio
58 setup_mmap_io_state(struct mmap_io_ent_s *mio, in setup_mmap_io_state() argument
63 memset(mio, 0, sizeof(struct mmap_io_ent_s)); in setup_mmap_io_state()
64 mio->resid = total_len; in setup_mmap_io_state()
68 assert(mio->num_entries < MMAP_ENTS + 1); in setup_mmap_io_state()
69 mio->table[mio->num_entries].offset = offset; in setup_mmap_io_state()
70 mio->table[mio->num_entries].len = in setup_mmap_io_state()
72 total_len -= mio->table[mio->num_entries].len; in setup_mmap_io_state()
73 offset += mio->table[mio->num_entries].len; in setup_mmap_io_state()
74 mio->num_entries++; in setup_mmap_io_state()
79 mmap_getnext_off_len(struct mmap_io_ent_s *mio, in mmap_getnext_off_len() argument
87 if (mio->resid == 0) in mmap_getnext_off_len()
91 if (mio->table[i].len > 0) in mmap_getnext_off_len()
97 iolength = MIN(mio->table[i].len, iolength); in mmap_getnext_off_len()
98 *offset = mio->table[i].offset; in mmap_getnext_off_len()
99 mio->table[i].offset += iolength; in mmap_getnext_off_len()
100 mio->table[i].len -= iolength; in mmap_getnext_off_len()
101 mio->resid -= iolength; in mmap_getnext_off_len()
173 struct mmap_io_ent_s mio; in ioshark_handle_mmap() local
193 setup_mmap_io_state(&mio, len, offset); in ioshark_handle_mmap()
194 assert(mio.num_entries > 0); in ioshark_handle_mmap()
195 while ((len = mmap_getnext_off_len(&mio, &offset))) { in ioshark_handle_mmap()