mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-16 08:38:26 +00:00
handle multiple performance manager options
by default, shellchat drives the performance management interface. But if an alternative one is specified, it overrides shellchat.
This commit is contained in:
parent
f05a879d93
commit
901525e3c9
2 changed files with 9 additions and 0 deletions
|
|
@ -257,6 +257,10 @@ impl Builder {
|
|||
self.features.retain(|x| x != feature);
|
||||
self
|
||||
}
|
||||
/// test if a feature is present
|
||||
pub fn has_feature(&self, feature: &str) -> bool {
|
||||
self.features.contains(feature)
|
||||
}
|
||||
/// add a feature to be passed on to just the loader
|
||||
pub fn add_loader_feature<'a>(&'a mut self, feature: &str) -> &'a mut Builder {
|
||||
self.loader_features.push(feature.into());
|
||||
|
|
|
|||
|
|
@ -272,6 +272,11 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||
.add_apps(&get_cratespecs());
|
||||
}
|
||||
Some("perf-image") => {
|
||||
// `--feature vaultperf` will make `vault` the performance manager, in exclusion of shellchat
|
||||
if !build.contains("shellperf") && !builder.contains("vaultperf") {
|
||||
// select `shellchat` as the performance manager by default.
|
||||
builder.add_feature("shellperf");
|
||||
}
|
||||
// note: to use this image, you need to load a version of the SOC that has the performance counters built in.
|
||||
// this can be generated using the command `python3 .\betrusted_soc.py -e .\dummy.nky --perfcounter` in the betrusted-soc repo.
|
||||
//
|
||||
|
|
|
|||
Loading…
Reference in a new issue