Commit 9bdf5bf0 authored by Brendan Gregg's avatar Brendan Gregg

update more tools to use args

parent c318a884
......@@ -23,19 +23,16 @@ BEGIN
tracepoint:syscalls:sys_enter_kill
{
$pid = *(ctx + 16);
$sig = *(ctx + 24);
@tpid[tid] = $pid;
@tsig[tid] = $sig;
@tpid[tid] = args->pid;
@tsig[tid] = args->sig;
}
tracepoint:syscalls:sys_exit_kill
/@tpid[tid]/
{
$ret = *(ctx + 16);
time("%H:%M:%S ");
printf("%-6d %-16s %-4d %-6d %d\n", pid, comm, @tsig[tid], @tpid[tid],
$ret);
args->ret);
delete(@tpid[tid]);
delete(@tsig[tid]);
}
......@@ -26,26 +26,22 @@ BEGIN
tracepoint:syscalls:sys_enter_statfs
{
$path = *(ctx + 16);
@filename[tid] = $path;
@filename[tid] = args->pathname;
}
tracepoint:syscalls:sys_enter_statx
{
$file = *(ctx + 24);
@filename[tid] = $file;
@filename[tid] = args->filename;
}
tracepoint:syscalls:sys_enter_newstat
{
$file = *(ctx + 16);
@filename[tid] = $file;
@filename[tid] = args->filename;
}
tracepoint:syscalls:sys_enter_newlstat
{
$file = *(ctx + 16);
@filename[tid] = $file;
@filename[tid] = args->filename;
}
tracepoint:syscalls:sys_exit_statfs,
......
......@@ -37,22 +37,20 @@ BEGIN
tracepoint:writeback:writeback_start
{
$sb_dev = *(ctx + 48) & 0xffffffff;
@start[$sb_dev] = nsecs;
@start[args->sb_dev] = nsecs;
}
tracepoint:writeback:writeback_written
{
$name = str(ctx + 8);
$nr_pages = *(ctx + 40) & 0xffff;
$sb_dev = *(ctx + 48) & 0xffffffff;
$r = *(ctx + 68) & 0xffffffff;
$sb_dev = args->sb_dev;
$s = @start[$sb_dev];
delete(@start[$sb_dev]);
$lat = $s ? (nsecs - $s) / 1000 : 0;
time("%H:%M:%S ");
printf("%-8s %-8d %-16s %d.%03d\n", $name, $nr_pages, @reason[$r],
printf("%-8s %-8d %-16s %d.%03d\n", args->name,
args->nr_pages & 0xffff, // TODO: explain these bitmasks
@reason[args->reason & 0xffffffff],
$lat / 1000, $lat % 1000);
}
......
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