Lines Matching refs:e
65 def extract_file(e, arg): argument
69 handle = "t%sf%s" % (e.thread, fd)
177 events = sorted(events, key=lambda e: e.time)
182 for e in events:
187 if e.call == "openat":
188 fd, f, handle = extract_file(e, e.ret)
195 if 'O_CREAT' in e.args[2]:
196 assert len(e.args) > 3, 'File creation lacks a mode?'
197 create_mode = ', ' + e.args[3]
199 % (handle, f.ident, e.args[2], create_mode)
201 elif e.call == "close":
202 fd, f, handle = extract_file(e, e.args[0])
207 elif e.call == "lseek":
208 fd, f, handle = extract_file(e, e.args[0])
210 … print >>bench, 'TEMP_FAILURE_RETRY(lseek(%s, %s, %s));' % (handle, e.args[1], e.args[2])
212 elif e.call == "_llseek":
213 fd, f, handle = extract_file(e, e.args[0])
215 … print >>bench, 'TEMP_FAILURE_RETRY(lseek(%s, %s, %s));' % (handle, e.args[1], e.args[3])
217 elif e.call == "read":
218 fd, f, handle = extract_file(e, e.args[0])
221 count = min(int(e.args[2]), bufsize)
226 elif e.call == "write":
227 fd, f, handle = extract_file(e, e.args[0])
230 count = min(int(e.args[2]), bufsize)
235 elif e.call == "pread64":
236 fd, f, handle = extract_file(e, e.args[0])
238 f.size = max(f.size, int(e.args[2]) + int(e.args[3]))
239 count = min(int(e.args[2]), bufsize)
240 … print >>bench, 'TEMP_FAILURE_RETRY(pread(%s, buf, %d, %s));' % (handle, count, e.args[3])
243 elif e.call == "pwrite64":
244 fd, f, handle = extract_file(e, e.args[0])
246 f.size = max(f.size, int(e.args[2]) + int(e.args[3]))
247 count = min(int(e.args[2]), bufsize)
248 … print >>bench, 'TEMP_FAILURE_RETRY(pwrite(%s, buf, %d, %s));' % (handle, count, e.args[3])
251 elif e.call == "fsync":
252 fd, f, handle = extract_file(e, e.args[0])
257 elif e.call == "fdatasync":
258 fd, f, handle = extract_file(e, e.args[0])
263 elif e.call == "mmap2":
264 fd, f, handle = extract_file(e, e.args[4])
266 count = min(int(e.args[1]), bufsize)
267 offset = int(e.args[5], 0)
349 for e in events:
350 types[e.call] += 1