Skip to content
Draft
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
23 changes: 0 additions & 23 deletions src/executor/valgrind/helpers/ignored_objects_path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,28 +25,6 @@ fn get_python_objects() -> Vec<String> {
vec![so_output]
}

fn get_node_objects() -> Vec<String> {
let output = Command::new("node")
.arg("-e")
.arg("console.log(process.execPath);")
.output();

if output.is_err() {
debug!("Failed to get node shared objects: {:?}", output.err());
return vec![];
}
let output = output.unwrap();
if !output.status.success() {
debug!(
"Failed to get node shared objects: {}",
String::from_utf8_lossy(&output.stderr)
);
return vec![];
}
let so_output = String::from_utf8_lossy(&output.stdout).trim().to_string();
vec![so_output]
}

fn normalize_object_paths(objects_path_to_ignore: &mut [String]) {
for path in objects_path_to_ignore.iter_mut() {
let cpath = PathBuf::from(&path).canonicalize();
Expand All @@ -61,7 +39,6 @@ fn normalize_object_paths(objects_path_to_ignore: &mut [String]) {
pub fn get_objects_path_to_ignore() -> Vec<String> {
let mut objects_path_to_ignore = vec![];
objects_path_to_ignore.extend(get_python_objects());
objects_path_to_ignore.extend(get_node_objects());
debug!("objects_path_to_ignore before normalization: {objects_path_to_ignore:?}");
normalize_object_paths(&mut objects_path_to_ignore);
debug!("objects_path_to_ignore after normalization: {objects_path_to_ignore:?}");
Expand Down
6 changes: 6 additions & 0 deletions src/executor/valgrind/measure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ fn get_valgrind_args(tool: &SimulationTool, config: &ExecutorConfig) -> Vec<Stri
args.push("--compress-strings=no".to_string());
args.push("--combine-dumps=yes".to_string());
args.push("--dump-line=no".to_string());
// Separate every function by its whole call stack, so shared
// native code (e.g. V8 builtins between JS functions) doesn't join
// unrelated call chains. Tail jumps replace the jumping frame
// instead of nesting, which keeps those stacks shallow.
args.push("--separate-callers=all".to_string());
args.push("--pop-on-jump".to_string());
}
SimulationTool::Tracegrind => {
args.push("--tool=tracegrind".to_string());
Expand Down
Loading