-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
71 lines (68 loc) · 2.68 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="" xml:lang="">
<head>
<meta charset="utf-8" />
<meta name="generator" content="pandoc" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes" />
<title>bpftrace</title>
<style>
code{white-space: pre-wrap;}
span.smallcaps{font-variant: small-caps;}
div.columns{display: flex; gap: min(4vw, 1.5em);}
div.column{flex: auto; overflow-x: auto;}
div.hanging-indent{margin-left: 1.5em; text-indent: -1.5em;}
/* The extra [class] is a hack that increases specificity enough to
override a similar rule in reveal.js */
ul.task-list[class]{list-style: none;}
ul.task-list li input[type="checkbox"] {
font-size: inherit;
width: 0.8em;
margin: 0 0.8em 0.2em -1.6em;
vertical-align: middle;
}
.display.math{display: block; text-align: center; margin: 0.5rem auto;}
</style>
<link rel="stylesheet" href="css/theme.css" />
</head>
<body>
<header id="title-block-header">
<h1 class="title">bpftrace</h1>
</header>
<p>High-level tracing language for Linux systems</p>
<p><a href="./docs/v0.21.x.html">Documentation</a></p>
<p><a
href="https://github.com/bpftrace/bpftrace/blob/master/docs/tutorial_one_liners.md">Tutorial</a></p>
<p><a href="https://github.com/bpftrace/bpftrace/discussions">Community
forum</a></p>
<p><a href="https://github.com/bpftrace/bpftrace/issues">Bug
tracker</a></p>
<p><a href="https://webchat.oftc.net/?channels=%23bpftrace">IRC</a></p>
<p><a href="https://github.com/bpftrace/bpftrace/">Github</a></p>
<h3 id="example">Example</h3>
<p>Produce a histogram of time (in nanoseconds) spent in
<code>read(2)</code>:</p>
<pre><code> // read.bt file
tracepoint:syscalls:sys_enter_read
{
@start[tid] = nsecs;
}
tracepoint:syscalls:sys_exit_read / @start[tid] /
{
@times = hist(nsecs - @start[tid]);
delete(@start[tid]);
}
# bpftrace read.bt
Attaching 2 probes...
^C
@times:
[256, 512) 326 |@ |
[512, 1k) 7715 |@@@@@@@@@@@@@@@@@@@@@@@@@@ |
[1k, 2k) 15306 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@|
[2k, 4k) 609 |@@ |
[4k, 8k) 611 |@@ |
[8k, 16k) 438 |@ |
[16k, 32k) 59 | |
[32k, 64k) 36 | |
[64k, 128k) 5 | |</code></pre>
</body>
</html>