logo资料库

BPF Performance Tools - Brendan Gregg.pdf

第1页 / 共1192页
第2页 / 共1192页
第3页 / 共1192页
第4页 / 共1192页
第5页 / 共1192页
第6页 / 共1192页
第7页 / 共1192页
第8页 / 共1192页
资料共1192页,剩余部分请下载后查看
Title Page
Copyright Page
Contents at a Glance
Table of Contents
Preface
Why Do You Need BPF Performance Tools?
About This Book
How This Book Is Structured
Intended Audience
Source Code Copyright
Supplemental Material and References
Part I: Technologies
Chapter 1. Introduction
What are BPF and eBPF?
What are Tracing, Snooping, Sampling, Profiling, and Observability?
What are BCC, bpftrace, and IO Visor?
A First Look at BCC: Quick Wins
BPF Tracing Visibility
Dynamic Instrumentation: kprobes and uprobes
Static Instrumentation: Tracepoints and USDT
A First Look at bpftrace: Tracing open()
Back to BCC: Tracing open()
Summary
Chapter 2. Technology Background
Illustrated
BPF
Extended BPF (eBPF)
Stack Trace Walking
Flame Graphs
Event Sources
Kprobes
Uprobes
Tracepoints
USDT
Dynamic USDT
PMCs
perf_events
Summary
Chapter 3. Performance Analysis
Overview
Performance Methodologies
Linux 60-Second Analysis
BCC Tool Checklist
Summary
Chapter 4. BCC
BCC Components
BCC Features
BCC Installation
BCC Tools
funccount
stackcount
trace
argdist
Tool Documentation
Developing BCC Tools
BCC Internals
BCC Debugging
Summary
Chapter 5. bpftrace
bpftrace Components
bpftrace Features
bpftrace Installation
bpftrace Tools
bpftrace One-Liners
bpftrace Documentation
bpftrace Programming
bpftrace Usage
bpftrace Probe Types
bpftrace Flow Control
bpftrace Operators
bpftrace Variables
bpftrace Functions
bpftrace Map Functions
bpftrace Future Work
bpftrace Internals
bpftrace Debugging
Summary
Part II: Using BPF Tools
Chapter 6. CPUs
Background
Traditional Tools
BPF Tools
BPF One-liners
Optional Exercises
Summary
Chapter 7. Memory
Background
Traditional Tools
BPF Tools
BPF One-liners
Optional Exercises
Summary
Chapter 8. File Systems
Background
Strategy
Traditional Tools
BPF Tools
BPF One-liners
BPF One-Liners Examples
Optional Exercises
Summary
Chapter 9. Disk I/O
Background
Traditional Tools
BPF Tools
BPF One-liners
BPF One-Liners Examples
Optional Exercises
Summary
Chapter 10. Networking
Background
Traditional Tools
BPF Tools
BPF One-liners
BPF One-Liners Examples
Optional Exercises
Summary
Chapter 11. Security
Background
BPF Tools
BPF One-Liners
BPF One-Liners Examples
Summary
Chapter 12. Languages
Background
C
Java
Bash Shell
Other Languages
Summary
Chapter 13. Applications
Background
BPF Tools
BPF One-liners
BPF One-Liners Examples
Summary
Chapter 14. Kernel
Background
Strategy
Traditional Tools
BPF Tools
BPF One-Liners
BPF One-Liners Examples
Challenges
Summary
Chapter 15. Containers
Background
Traditional Tools
BPF Tools
BPF One-liners
Optional Exercises
Summary
Chapter 16. Hypervisors
Background
Traditional Tools
Guest BPF Tools
Host BPF Tools
Summary
Part III: Additional Topics
Chapter 17. Other BPF Performance Tools
Vector and Performance Co-Pilot (PCP)
Grafana and Performance Co-Pilot (PCP)
Cloudflare eBPF Prometheus Exporter (with Grafana)
kubectl-trace
Other Tools
Summary
Chapter 18. Tips, Tricks, and Common Problems
1. Typical Event Frequency and Overhead
2. Sample at 49 or 99 Hertz
3. Yellow Pigs and Grey Rats
4. Write Target Software
5. Learn Syscalls
6. Keep it Simple
7. Missing Events
8. Missing Stacks Traces
9. Missing Symbols (Function Names) When Printing
10. Missing Functions When Tracing
11. Feedback Loops
12. Dropped Events
Part IV: Appendixes
A. bpftrace One-Liners [This content is currently in development.]
B. bpftrace Cheat Sheet [This content is currently in development.]
C. bcc Tool Development [This content is currently in development.]
D. C BPF [This content is currently in development.]
E. BPF Instructions [This content is currently in development.]
Glossary
Bibliography [This content is currently in development.]
BPF Performance Tools Linux
System
and
Application Observability Brendan
Gregg
Copyright
©
2020
Pearson
Education,
Inc.
Contents at a Glance Preface Part
I:
Technologies Chapter
1.
Intro Chapter
2.
Technology
Background Chapter
3.
Performance
Analysis Chapter
4.
bcc Chapter
5.
bpftrace Part
II:
Using
BPF
Tools Chapter
6.
CPUs Chapter
7.
Memory Chapter
8.
File
Systems Chapter
9.
Disk
I/O Chapter
10.
Networking Chapter
11.
Security Chapter
12.
Languages Chapter
13.
Applications Chapter
14.
Kernel Chapter
15.
Containers Chapter
16.
Hypervisors Part
III:
Additional
Topics
Chapter
17.
Other
BPF
Tools Chapter
18.
Tips
and
Tricks Part
IV:
Appendixes A.
bpftrace
One-Liners B.
bpftrace
Cheat
Sheet C.
bcc
Tool
Development D.
C
BPF E.
BPF
Instructions Glossary Bibliography
Table of Contents Preface Why
Do
You
Need
BPF
Performance
Tools? About
This
Book How
This
Book
Is
Structured Intended
Audience Source
Code
Copyright Supplemental
Material
and
References Part
I:
Technologies Chapter
1.
Introduction What
are
BPF
and
eBPF? What
are
Tracing,
Snooping,
Sampling,
Profiling,
and Observability? What
are
BCC,
bpftrace,
and
IO
Visor? A
First
Look
at
BCC:
Quick
Wins BPF
Tracing
Visibility Dynamic
Instrumentation:
kprobes
and
uprobes
Static
Instrumentation:
Tracepoints
and
USDT A
First
Look
at
bpftrace:
Tracing
open() Back
to
BCC:
Tracing
open() Summary Chapter
2.
Technology
Background Illustrated BPF Extended
BPF
(eBPF) Stack
Trace
Walking Flame
Graphs Event
Sources Kprobes Uprobes Tracepoints USDT Dynamic
USDT PMCs perf_events
Summary Chapter
3.
Performance
Analysis Overview Performance
Methodologies Linux
60-Second
Analysis BCC
Tool
Checklist Summary Chapter
4.
BCC BCC
Components BCC
Features BCC
Installation BCC
Tools funccount stackcount trace argdist Tool
Documentation Developing
BCC
Tools
分享到:
收藏