mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-20 09:03:28 +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.features.retain(|x| x != feature);
|
||||||
self
|
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
|
/// 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 {
|
pub fn add_loader_feature<'a>(&'a mut self, feature: &str) -> &'a mut Builder {
|
||||||
self.loader_features.push(feature.into());
|
self.loader_features.push(feature.into());
|
||||||
|
|
|
||||||
|
|
@ -272,6 +272,11 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||||
.add_apps(&get_cratespecs());
|
.add_apps(&get_cratespecs());
|
||||||
}
|
}
|
||||||
Some("perf-image") => {
|
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.
|
// 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.
|
// 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