Commit ee31f61c authored by Brendan Gregg's avatar Brendan Gregg

fix for spaces in filenames, #361

parent 2ec48d92
......@@ -97,7 +97,7 @@ start_ts = 0
# 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,
......
......@@ -63,7 +63,7 @@ int kretprobe__sys_open(struct pt_regs *ctx)
return 0;
}
bpf_trace_printk("%s %d\\n", *filenamep, ret);
bpf_trace_printk("%d %s\\n", ret, *filenamep);
args_filename.delete(&pid);
return 0;
......@@ -90,7 +90,7 @@ start_ts = 0
# 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)):
......
......@@ -63,7 +63,7 @@ int trace_return(struct pt_regs *ctx)
return 0;
}
bpf_trace_printk("%s %d\\n", *filenamep, ret);
bpf_trace_printk("%d %s\\n", ret, *filenamep);
args_filename.delete(&pid);
return 0;
......@@ -96,7 +96,7 @@ start_ts = 0
# 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)):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment