Skip to content

Commit

Permalink
yank stat call here as we are just prepping a list of klibs; the fold… (
Browse files Browse the repository at this point in the history
#1653)

* yank stat call here as we are just prepping a list of klibs; the folder will be filled out later

* .
  • Loading branch information
eyberg authored Aug 13, 2024
1 parent f3728c5 commit 8bc66ac
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
6 changes: 1 addition & 5 deletions cmd/flags_run_local_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@ import (
"debug/elf"
"fmt"
"net"
"os"
"os/exec"
"path/filepath"
"slices"
"strconv"
"strings"
Expand Down Expand Up @@ -81,9 +79,7 @@ func (flags *RunLocalInstanceCommandFlags) MergeToConfig(c *types.Config) error
}

if (flags.Trace || flags.SyscallSummary) && !slices.Contains(c.Klibs, "strace") {
if _, err := os.Stat(filepath.Join(c.KlibDir, "strace")); err == nil {
c.Klibs = append(c.Klibs, "strace") // debugsyscalls, notrace, tracelist, syscall_summary
}
c.Klibs = append(c.Klibs, "strace") // debugsyscalls, notrace, tracelist, syscall_summary
}

if flags.MissingFiles {
Expand Down
1 change: 1 addition & 0 deletions cmd/flags_run_local_instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ func TestRunLocalInstanceFlagsMergeToConfig(t *testing.T) {
BuildDir: "",
Debugflags: []string{"trace", "debugsyscalls", "fault", "futex_trace", "syscall_summary"}, // "futex_trace" is just for temporay compatibility
Force: true,
Klibs: []string{"strace"},
NoTrace: []string{"a"},
RunConfig: types.RunConfig{
Accel: true,
Expand Down

0 comments on commit 8bc66ac

Please sign in to comment.