You've already forked go-profiler-notes
mirror of
https://github.com/DataDog/go-profiler-notes.git
synced 2025-07-12 23:50:13 +02:00
update links and stuff
This commit is contained in:
14
README.md
14
README.md
@ -3,15 +3,15 @@
|
||||
I've just started a new job at [Datadog](https://www.datadoghq.com/) to work on [Continuous Profiling](https://www.datadoghq.com/product/code-profiling/) for Go. To make sure that I know what I'm talking about, I'm planning to do an in-depth study of the existing profilers and how they work. I'll try to summarize what I learned in this repository as it might be useful to others.
|
||||
|
||||
- [pprof tool & format](./pprof.md): Describes the pprof tool and it's binary data format.
|
||||
- [Goroutine Profiling](./goroutine.md)
|
||||
|
||||
## Todo
|
||||
|
||||
- CPU Profiler
|
||||
- Heap Profiler
|
||||
- Mutex Profiler
|
||||
- Goroutine Profiler
|
||||
- Block Profiler
|
||||
- Wallclock Profiler (fgprof)
|
||||
- CPU Profiling
|
||||
- Heap Profiling
|
||||
- Mutex Profiling
|
||||
- Block Profiling
|
||||
- Wallclock Profiling (fgprof)
|
||||
|
||||
## External Links
|
||||
|
||||
@ -27,4 +27,4 @@ I've just started a new job at [Datadog](https://www.datadoghq.com/) to work on
|
||||
- [Using Instruments to profile Go programs](https://rakyll.org/instruments/): How to use the macOS Instruments app (I think it's built on dtrace) to profile Go programs. Not clear what the benfits are, if any.
|
||||
- [Profiling Go programs with pprof](https://jvns.ca/blog/2017/09/24/profiling-go-with-pprof/) by Julia Evans: A nice tour with a focus on heap profiling and the pprof output format.
|
||||
|
||||
Got great links to recommend? Open an issue or PR, I'd happy to add your suggestions : ).
|
||||
Got great links to recommend? Open an issue or PR, I'd happy to add your suggestions : ).
|
||||
|
6
cpu.md
6
cpu.md
@ -1,8 +1,6 @@
|
||||
🚧 This note is still work in progress, please come back later! 🚧
|
||||
|
||||
# Go's CPU profiler
|
||||
|
||||
[TOC]
|
||||
# CPU Profiling in Go
|
||||
|
||||
## How it works
|
||||
|
||||
@ -76,4 +74,4 @@ The various ways one can record CPU profiles in Go are listed below.
|
||||
- Profiler labels
|
||||
- bias
|
||||
- performance overhead
|
||||
- Discuss [Proposal: hardware performance counters for CPU profiling.](https://go.googlesource.com/proposal/+/refs/changes/08/219508/2/design/36821-perf-counter-pprof.md)
|
||||
- Discuss [Proposal: hardware performance counters for CPU profiling.](https://go.googlesource.com/proposal/+/refs/changes/08/219508/2/design/36821-perf-counter-pprof.md)
|
||||
|
@ -12,6 +12,8 @@ A `batch` has a `start` and an `end` time as well as a slice of `profiles`. Each
|
||||
|
||||
## Payload Format
|
||||
|
||||
TODO: This is outdated, needs updating [based on this PR](https://github.com/DataDog/dd-trace-go/pull/781).
|
||||
|
||||
The payload uses `multipart/form-data` encoding and includes the following form fields for every `batch` that is being uploaded.
|
||||
|
||||
- `format`: Always `pprof`
|
||||
|
@ -1,6 +1,6 @@
|
||||
This document was last updated for `go1.15.6` but probably still applies to older/newer versions for the most parts.
|
||||
|
||||
# Go's Goroutine Profiler
|
||||
# Goroutine Profiling in Go
|
||||
|
||||
Go has various APIs to provide users with a list of **active** goroutines, their current stack trace, as well as various other properties. Some APIs expose this information as statistical summaries, while other APIs provide information for each individual goroutine.
|
||||
|
||||
@ -215,4 +215,4 @@ Below is a truncated example of the returned output, see [2.runtime.goroutinepro
|
||||
|
||||
### [`net/http/pprof`](https://golang.org/pkg/net/http/pprof/)
|
||||
|
||||
This package exposes the [`pprof.Lookup("goroutine")`](https://golang.org/pkg/runtime/pprof/#Lookup) profiles described above via HTTP endpoints. The output is identical.
|
||||
This package exposes the [`pprof.Lookup("goroutine")`](https://golang.org/pkg/runtime/pprof/#Lookup) profiles described above via HTTP endpoints. The output is identical.
|
||||
|
3
pprof.md
3
pprof.md
@ -149,4 +149,5 @@ The output above is truncated also, [pprof.samples.cpu.001.protoc.txt](./example
|
||||
|
||||
- Write more about using `go tool pprof` itself.
|
||||
- Explain why pprof can be given a path to the binary the profile belongs to.
|
||||
- Get into more details about line numbers / addresses.
|
||||
- Get into more details about line numbers / addresses.
|
||||
- Talk about mappings and when a Go binary might have more than one
|
||||
|
Reference in New Issue
Block a user