Skip to content

Commit

Permalink
[pre-commit.ci lite] apply automatic fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pre-commit-ci-lite[bot] authored Feb 6, 2024
1 parent 84ca3c5 commit bddc587
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions internal/dwarf/frame/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -317,7 +317,7 @@ func executeDWARFInstruction(ctx *Context) {
fn(ctx)
}

// getPid gets the Process ID as a string from the fullExecutablePath provided
// getPid gets the Process ID as a string from the fullExecutablePath provided.
func getPid(fullExecutablePath string) string {
return strings.Split(fullExecutablePath, "/")[2]
}
Expand Down Expand Up @@ -413,7 +413,7 @@ func lookupFunc(instruction byte, ctx *Context) instruction {
case DW_CFA_GNU_window_save:
fn = gnuwindowsave
default:
//panic(fmt.Sprintf("Encountered an unexpected DWARF CFA opcode: %#v", instruction))

level.Error(ctx.logger).Log("msg", "Encountered an unexpected DWARF CFA opcode", "opcode instruction", instruction, "PID", getPid(ctx.fullExecutablePath), "comm", ctx.fullExecutablePath)
}
return fn
Expand Down
2 changes: 1 addition & 1 deletion pkg/stack/unwind/compact_unwind_table.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ import (
"bytes"
"debug/elf"
"fmt"

"sort"

"github.com/go-kit/log"

"github.com/parca-dev/parca-agent/internal/dwarf/frame"
)

Expand Down
2 changes: 1 addition & 1 deletion pkg/stack/unwind/unwind_table_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"github.com/parca-dev/parca-agent/pkg/logger"
)

// TODO(Sylfrena): Add equivalent test for arm64
// TODO(Sylfrena): Add equivalent test for arm64.
func TestBuildUnwindTable(t *testing.T) {
fdes, _, err := ReadFDEs("../../../testdata/out/x86/basic-cpp")
require.NoError(t, err)
Expand Down

0 comments on commit bddc587

Please sign in to comment.