Skip to content

Commit

Permalink
fix for spaces in filenames, iovisor#361
Browse files Browse the repository at this point in the history
  • Loading branch information
brendangregg committed Feb 11, 2016
1 parent 2ec48d9 commit ee31f61
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion tools/filelife.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
# format output
while 1:
(task, pid, cpu, flags, ts, msg) = b.trace_fields()
(delta, filename) = msg.split(" ")
(delta, filename) = msg.split(" ", 1)

# print columns
print("%-8s %-6d %-16s %-7.2f %s" % (strftime("%H:%M:%S"), pid, task,
Expand Down
4 changes: 2 additions & 2 deletions tools/opensnoop.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
return 0;
}
bpf_trace_printk("%s %d\\n", *filenamep, ret);
bpf_trace_printk("%d %s\\n", ret, *filenamep);
args_filename.delete(&pid);
return 0;
Expand All @@ -90,7 +90,7 @@
# format output
while 1:
(task, pid, cpu, flags, ts, msg) = b.trace_fields()
(filename, ret_s) = msg.split(" ")
(ret_s, filename) = msg.split(" ", 1)

ret = int(ret_s)
if (args.failed and (ret >= 0)):
Expand Down
4 changes: 2 additions & 2 deletions tools/statsnoop.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
return 0;
}
bpf_trace_printk("%s %d\\n", *filenamep, ret);
bpf_trace_printk("%d %s\\n", ret, *filenamep);
args_filename.delete(&pid);
return 0;
Expand Down Expand Up @@ -96,7 +96,7 @@
# format output
while 1:
(task, pid, cpu, flags, ts, msg) = b.trace_fields()
(filename, ret_s) = msg.split(" ")
(ret_s, filename) = msg.split(" ", 1)

ret = int(ret_s)
if (args.failed and (ret >= 0)):
Expand Down

0 comments on commit ee31f61

Please sign in to comment.