Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ env:
GOFUMPT_VERSION: v0.4.0
# renovate: datasource=go depName=github.com/golangci/golangci-lint
GOLANGCI_LINT_VERSION: v1.51.2
# renovate: datasource=go depName=github.com/florianl/bluebox
BLUEBOX_VERSION: v0.0.1

jobs:
skip-check:
Expand All @@ -38,10 +40,10 @@ jobs:
".go-version",
"3rdparty",
"Makefile",
"bpf/",
"kerneltest/",
"bpf/**",
"go.mod",
"go.sum"
"go.sum",
"kerneltest/**"
]
skip_after_successful_duplicate: false

Expand Down Expand Up @@ -126,7 +128,7 @@ jobs:

- name: Build initramfs
run: |
go install github.com/florianl/bluebox@v0.0.1
go install "github.com/florianl/bluebox@${BLUEBOX_VERSION}"
make initramfs

- name: Upload initramfs
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
"3rdparty",
"Dockerfile*",
"Makefile",
"bpf/Makefile",
"bpf/**",
"deploy/**",
"e2e/**",
"go.mod",
Expand Down
16 changes: 5 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,15 +1,4 @@
repos:
- repo: local
hooks:
# We use custom step instead of https://github.com/golangci/golangci-lint,
# because we need to pass additional parameters to for CGO builds.
- id: go-lint
name: go-lint
entry: make go/lint
language: system
types: [go]
pass_filenames: false

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
Expand Down Expand Up @@ -38,6 +27,11 @@ repos:
- --fuzzy-match-generates-todo
types: [shell]
exclude: ^internal/(?:go|pprof)/
- repo: https://github.com/golangci/golangci-lint
rev: v1.51.2
hooks:
- id: golangci-lint
entry: make go/lint-fix
- repo: https://github.com/hadolint/hadolint
rev: v2.12.1-beta
hooks:
Expand Down
52 changes: 0 additions & 52 deletions 3rdparty/include/stdarg.h

This file was deleted.

2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -188,10 +188,12 @@ check-license:

.PHONY: go/lint
go/lint:
touch $(OUT_BPF)
$(GO_ENV) $(CGO_ENV) golangci-lint run

.PHONY: go/lint-fix
go/lint-fix:
touch $(OUT_BPF)
$(GO_ENV) $(CGO_ENV) golangci-lint run --fix

.PHONY: bpf/lint-fix
Expand Down
4 changes: 1 addition & 3 deletions bpf/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -43,9 +43,7 @@ OUT_BPF := $(OUT_BPF_DIR)/cpu.bpf.o
BPF_BUNDLE := $(OUT_DIR)/parca-agent.bpf.tar.gz

# input:
BPF_HEADERS := ../3rdparty/include
LIBBPF_HEADERS := $(OUT_DIR)/libbpf/$(ARCH)/usr/include
LIBBPF_OBJ := $(OUT_DIR)/libbpf/$(ARCH)/libbpf.a

VMLINUX := cpu/vmlinux.h
BPF_SRC := cpu/cpu.bpf.c
Expand All @@ -60,7 +58,7 @@ $(BPF_BUNDLE): $(BPF_SRC) $(LIBBPF_HEADERS)/bpf $(BPF_HEADERS)
mkdir -p $(bpf_bundle_dir)
cp $$(find $^ -type f) $(bpf_bundle_dir)

$(OUT_BPF): $(BPF_SRC) $(LIBBPF_HEADERS) $(LIBBPF_OBJ) $(BPF_HEADERS) | $(OUT_DIR)
$(OUT_BPF): $(BPF_SRC) $(LIBBPF_HEADERS) $(BPF_HEADERS) | $(OUT_DIR)
mkdir -p $(OUT_BPF_DIR)
$(CMD_CC) -S \
-D__BPF_TRACING__ \
Expand Down
1 change: 0 additions & 1 deletion pkg/profiler/cpu/bpf_metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ package cpu
import (
"bufio"
"bytes"
_ "embed"
"fmt"
"io"
"os"
Expand Down