Skip to content

Commit

Permalink
tools: more adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
brendangregg committed Jun 8, 2019
1 parent a189c36 commit 9dbee04
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
7 changes: 6 additions & 1 deletion tools/biolatency.bt
Expand Up @@ -21,10 +21,15 @@ kprobe:blk_account_io_start
@start[arg0] = nsecs;
}

kprobe:blk_account_io_completion
kprobe:blk_account_io_done
/@start[arg0]/

{
@usecs = hist((nsecs - @start[arg0]) / 1000);
delete(@start[arg0]);
}

END
{
clear(@start);
}
10 changes: 8 additions & 2 deletions tools/biosnoop.bt
Expand Up @@ -22,9 +22,8 @@ kprobe:blk_account_io_start
@iocomm[arg0] = comm;
}

kprobe:blk_account_io_completion
kprobe:blk_account_io_done
/@start[arg0] != 0 && @iopid[arg0] != 0 && @iocomm[arg0] != ""/

{
$now = nsecs;
printf("%-12u %-16s %-6d %7d\n",
Expand All @@ -35,3 +34,10 @@ kprobe:blk_account_io_completion
delete(@iopid[arg0]);
delete(@iocomm[arg0]);
}

END
{
clear(@start);
clear(@iopid);
clear(@iocomm);
}
3 changes: 1 addition & 2 deletions tools/bitesize.bt
Expand Up @@ -16,12 +16,11 @@
BEGIN
{
printf("Tracing block device I/O... Hit Ctrl-C to end.\n");

}

tracepoint:block:block_rq_issue
{
@[comm] = hist(args->bytes);
@[args->comm] = hist(args->bytes);
}

END
Expand Down
1 change: 0 additions & 1 deletion tools/loads.bt
Expand Up @@ -20,7 +20,6 @@
BEGIN
{
printf("Reading load averages... Hit Ctrl-C to end.\n");

}

interval:s:1
Expand Down

0 comments on commit 9dbee04

Please sign in to comment.