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
12 changes: 12 additions & 0 deletions .github/memci.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
[
{
"name": "bindiff",
"build": "go build -trimpath -buildvcs=false -o bindiff.elf ./cmd/bindiff",
"elf": "bindiff.elf"
},
{
"name": "picobin",
"build": "go build -trimpath -buildvcs=false -o picobin.elf ./cmd/picobin",
"elf": "picobin.elf"
}
]
11 changes: 4 additions & 7 deletions .github/workflows/memci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,14 @@ jobs:

- uses: actions/setup-go@v6
with:
# TinyGo 0.42 builds with Go 1.25 through 1.27 and refuses anything
# outside that window, so the two versions below move together.
go-version: "1.26"
- uses: acifani/setup-tinygo@v2
with:
tinygo-version: "0.42.0"

# Both binaries here are host tools. A TinyGo target would need
# acifani/setup-tinygo installed above and a build command naming it.
- uses: soypat/memci@main
with:
args: -targets ./cmd/... -kind package
args: -kind package
# bindiff lives in this repo, so measure with the copy under test
# rather than installing a published one.
bindiff: go run ./cmd/bindiff
tinygo: tinygo
targets: .github/memci.json
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ local
*.tsv
*.dat
*.json
# memci's build list is configuration, not data.
!.github/memci.json
*.xlsx
*.xls
*.zip
Expand Down
6 changes: 3 additions & 3 deletions build/xdwarf/bench_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ func BenchmarkLineRowsXdwarf(b *testing.B) {
// once the tables have grown to their high-water mark.
var u xdwarf.LineUnit
aux := make([]byte, benchAux)
var nameBuf []byte
nameBuf := make([]byte, 0, benchAux)
b.ReportAllocs()
b.ResetTimer()
for i := 0; i < b.N; i++ {
for b.Loop() {
var rows int
for off := int64(0); off < size; {
next, err := xdwarf.DecodeLineUnit(&u, sec, off, size, aux)
Expand Down Expand Up @@ -68,7 +68,7 @@ func BenchmarkLineRowsStdlib(b *testing.B) {
}
b.ReportAllocs()
b.ResetTimer()
for i := 0; i < b.N; i++ {
for b.Loop() {
d, err := ef.DWARF()
if err != nil {
b.Fatal(err)
Expand Down
Loading