Skip to content

Commit dcff9c5

Browse files
--wip-- [skip ci]
1 parent 74347aa commit dcff9c5

5 files changed

Lines changed: 32 additions & 26 deletions

File tree

crates/exec-harness/build.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ fn main() {
6262
core_c: instrument_hooks_dir.join("dist/core.c"),
6363
includes_dir: instrument_hooks_dir.join("includes"),
6464
};
65+
println!("cargo:rerun-if-changed={}", paths.core_c.display());
6566
paths.check_sources_exist();
6667
build_shared_library(&paths, &preload_constants);
6768
}
@@ -101,6 +102,7 @@ fn build_shared_library(paths: &PreloadBuildPaths, constants: &PreloadConstants)
101102
.flag("-Wno-uninitialized")
102103
.flag("-Wno-overflow")
103104
.flag("-Wno-unused-function")
105+
// .flag("-Wno-unused-parameter")
104106
.flag("-Wno-unterminated-string-initialization");
105107

106108
// Compile source files to object files

src/executor/helpers/introspected_golang/go.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,10 @@ if [ "${CODSPEED_RUNNER_MODE:-}" != "walltime" ]; then
1818
exit 1
1919
fi
2020

21-
# Find the real go binary, so that we don't end up in infinite recursion
22-
REAL_GO=$(which -a go | grep -v "$(realpath "$0")" | head -1)
21+
# Find the real go binary by removing our directory from PATH (same approach as node.sh)
22+
ORIGINAL_PATH=$(echo "$PATH" | tr ":" "\n" | grep -v "codspeed_introspected_go" | tr "\n" ":")
23+
REAL_GO=$(env PATH="$ORIGINAL_PATH" which go 2>/dev/null || true)
24+
debug_log "Real go path: $REAL_GO"
2325
if [ -z "$REAL_GO" ]; then
2426
echo "ERROR: Could not find real go binary" >&2
2527
exit 1

src/executor/wall_time/executor.rs

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -105,28 +105,28 @@ impl WallTimeExecutor {
105105
bench_cmd.arg(script_file.path());
106106
let (mut bench_cmd, env_file) = wrap_with_env(bench_cmd, &extra_env)?;
107107

108-
let mut cmd_builder = CommandBuilder::new("systemd-run");
109-
if let Some(cwd) = &config.working_directory {
110-
let abs_cwd = canonicalize(cwd)?;
111-
cmd_builder.current_dir(abs_cwd);
112-
}
113-
if !is_codspeed_debug_enabled() {
114-
cmd_builder.arg("--quiet");
115-
}
116-
// Remarks:
117-
// - We're using --scope so that perf is able to capture the events of the benchmark process.
118-
// - We can't user `--user` here because we need to run in `codspeed.slice`, otherwise we'd run in
119-
// user.slice` (which is isolated). We can use `--gid` and `--uid` to run the command as the current user.
120-
// - We must use `bash` here instead of `sh` since `source` isn't available when symlinked to `dash`.
121-
// - We have to pass the environment variables because `--scope` only inherits the system and not the user environment variables.
122-
cmd_builder.arg("--slice=codspeed.slice");
123-
cmd_builder.arg("--scope");
124-
cmd_builder.arg("--same-dir");
125-
cmd_builder.arg(format!("--uid={}", nix::unistd::Uid::current().as_raw()));
126-
cmd_builder.arg(format!("--gid={}", nix::unistd::Gid::current().as_raw()));
127-
cmd_builder.args(["--"]);
128-
129-
bench_cmd.wrap_with(cmd_builder);
108+
// let mut cmd_builder = CommandBuilder::new("systemd-run");
109+
// if let Some(cwd) = &config.working_directory {
110+
// let abs_cwd = canonicalize(cwd)?;
111+
// cmd_builder.current_dir(abs_cwd);
112+
// }
113+
// if !is_codspeed_debug_enabled() {
114+
// cmd_builder.arg("--quiet");
115+
// }
116+
// // Remarks:
117+
// // - We're using --scope so that perf is able to capture the events of the benchmark process.
118+
// // - We can't user `--user` here because we need to run in `codspeed.slice`, otherwise we'd run in
119+
// // user.slice` (which is isolated). We can use `--gid` and `--uid` to run the command as the current user.
120+
// // - We must use `bash` here instead of `sh` since `source` isn't available when symlinked to `dash`.
121+
// // - We have to pass the environment variables because `--scope` only inherits the system and not the user environment variables.
122+
// cmd_builder.arg("--slice=codspeed.slice");
123+
// cmd_builder.arg("--scope");
124+
// cmd_builder.arg("--same-dir");
125+
// cmd_builder.arg(format!("--uid={}", nix::unistd::Uid::current().as_raw()));
126+
// cmd_builder.arg(format!("--gid={}", nix::unistd::Gid::current().as_raw()));
127+
// cmd_builder.args(["--"]);
128+
129+
// bench_cmd.wrap_with(cmd_builder);
130130

131131
Ok((env_file, script_file, bench_cmd))
132132
}

src/system/check.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@ pub fn check_system(system_info: &SystemInfo) -> Result<()> {
3737
return Ok(());
3838
}
3939

40+
dbg!(system_info);
41+
4042
match system_info.arch.as_str() {
41-
"x86_64" | "aarch64" => {
43+
"x86_64" | "aarch64" | "arm64" => {
4244
warn!(
4345
"Unofficially supported system: {} {}. Continuing with best effort support.",
4446
system_info.os, system_info.os_version

0 commit comments

Comments
 (0)