Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
executable file 36 lines (32 sloc) 736 Bytes
#!/usr/local/bin/bpftrace
/*
* qdisc-fq - Show qdisc FQ queue latency.
*
* See BPF Performance Tools, Chapter 10, for an explanation of this tool.
*
* Copyright (c) 2019 Brendan Gregg.
* Licensed under the Apache License, Version 2.0 (the "License").
* This was originally created for the BPF Performance Tools book
* published by Addison Wesley. ISBN-13: 9780136554820
* When copying or porting, include this comment.
*
* 21-Apr-2019 Brendan Gregg Created this.
*/
BEGIN
{
printf("Tracing qdisc fq latency. Hit Ctrl-C to end.\n");
}
kprobe:fq_enqueue
{
@start[arg0] = nsecs;
}
kretprobe:fq_dequeue
/@start[retval]/
{
@us = hist((nsecs - @start[retval]) / 1000);
delete(@start[retval]);
}
END
{
clear(@start);
}
You can’t perform that action at this time.