diff options
| author | Paul Buetow <paul@buetow.org> | 2025-03-14 21:17:32 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2025-03-14 21:17:32 +0200 |
| commit | bcd854084554e72708bfcc17457b3063af88dda2 (patch) | |
| tree | 3f16024994dfaa2cc0e00a57c3586de2664fb15d /Makefile | |
| parent | 4e5ec5ec19baab4cfdda66622d86117d32b3b020 (diff) | |
add sleep to fix CPU spin
add memprofile pdf report
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 8 |
1 files changed, 7 insertions, 1 deletions
@@ -4,6 +4,7 @@ export GOOS = linux export GOARCH = amd64 export CGO_CFLAGS = -I$(LIBBPFGO)/output -I$(LIBBPFGO)/selftest/common export CGO_LDFLAGS = -lelf -lzstd $(LIBBPFGO)/output/libbpf/libbpf.a +export GO ?= go all: bpfbuild gobuild @@ -22,7 +23,7 @@ generated: .PHONY: gobuild gobuild: - go build -tags netgo -ldflags '-w -extldflags "-static"' -o ior ./cmd/ior/main.go + $(GO) build -tags netgo -ldflags '-w -extldflags "-static"' -o ior ./cmd/ior/main.go .PHONY: clean clean: @@ -47,3 +48,8 @@ flames: perl ~/git/FlameGraph/flamegraph.pl ior-by-syscall-duration-flamegraph.collapsed \ --title "I/O Syscall Durations" --nametype Path --hash --countname Nanoseconds \ > ior-by-syscall-duration-flamegraph.svg; \ + +.PHONY: prof +prof: + $(GO) tool pprof -pdf ./ior ior.cpuprofile > cpuprofile.pdf && evince cpuprofile.pdf & + $(GO) tool pprof -pdf ./ior ior.memprofile > memprofile.pdf && evince memprofile.pdf & |
