Skip to content

Commit

Permalink
fix(hydro_deploy): only record usermode events in perf (#1431)
Browse files Browse the repository at this point in the history
When kernel stacks are included, the DWARF traces can become corrupted /
overflown leading to flamegraphs with broken parents. We only are
interested in usermode, anyways, and can measure I/O overhead through
other methods.
  • Loading branch information
shadaj authored Aug 28, 2024
1 parent 3fde68d commit c4683ca
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 3 additions & 1 deletion hydro_deploy/core/src/localhost/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -229,8 +229,10 @@ impl LaunchedHost for LaunchedLocalhost {
"record",
"-F",
&tracing.frequency.to_string(),
"-e",
"cycles:u",
"--call-graph",
"dwarf,64000",
"dwarf,65528",
"-o",
])
.arg(perf_outfile)
Expand Down
2 changes: 1 addition & 1 deletion hydro_deploy/core/src/ssh.rs
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ impl<T: LaunchedSshHost> LaunchedHost for T {
if let Some(TracingOptions { frequency, .. }) = tracing.clone() {
// Attach perf to the command
command = format!(
"perf record -F {frequency} --call-graph dwarf,64000 -o {PERF_OUTFILE} {command}",
"perf record -F {frequency} -e cycles:u --call-graph dwarf,65528 -o {PERF_OUTFILE} {command}",
);
}
channel.exec(&command).await?;
Expand Down
4 changes: 2 additions & 2 deletions hydroflow_plus_test/examples/perf_compute_pi.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ async fn main() {
.dtrace_outfile("leader.stacks")
.fold_outfile("leader.data.folded")
.flamegraph_outfile("leader.svg")
.frequency(5)
.frequency(128)
.build(),
),
)
Expand All @@ -78,7 +78,7 @@ async fn main() {
.dtrace_outfile(format!("cluster{}.leader.stacks", idx))
.fold_outfile(format!("cluster{}.data.folded", idx))
.flamegraph_outfile(format!("cluster{}.svg", idx))
.frequency(5)
.frequency(128)
.build(),
)
})
Expand Down

0 comments on commit c4683ca

Please sign in to comment.