-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1114 from hermit-os/test-rftrace
ci(xtask): add support for rftrace
- Loading branch information
Showing
7 changed files
with
87 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
use std::path::PathBuf; | ||
|
||
use anyhow::{anyhow, Result}; | ||
|
||
pub fn binutil(name: &str) -> Result<PathBuf> { | ||
let exe_suffix = std::env::consts::EXE_SUFFIX; | ||
let exe = format!("llvm-{name}{exe_suffix}"); | ||
|
||
let path = llvm_tools::LlvmTools::new() | ||
.map_err(|err| match err { | ||
llvm_tools::Error::NotFound => anyhow!( | ||
"Could not find llvm-tools component\n\ | ||
\n\ | ||
Maybe the rustup component `llvm-tools` is missing? Install it through: `rustup component add llvm-tools`" | ||
), | ||
err => anyhow!("{err:?}"), | ||
})? | ||
.tool(&exe) | ||
.ok_or_else(|| anyhow!("could not find {exe}"))?; | ||
|
||
Ok(path) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# TID FUNCTION | ||
[ 1] | rftrace_example::f1() { | ||
[ 1] | rftrace_example::f2() { | ||
[ 1] | rftrace_example::f3() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters