sel4bench icon indicating copy to clipboard operation
sel4bench copied to clipboard

Ability to change bench app options for RiscV

Open malus-brandywine opened this issue 3 years ago • 3 comments

Hi,

Does anyone remember why sel4bench configuration for RiscV was not allowed to change bench app options?

If it was skipped because it was not necessary then I'd like to fix it.

I would add a line to https://github.com/seL4/sel4bench/blob/master/apps/sel4bench/CMakeLists.txt

--- a/apps/sel4bench/CMakeLists.txt
+++ b/apps/sel4bench/CMakeLists.txt
@@ -35,14 +35,15 @@ config_string(
 
 # Default dependencies on kernel benchmarking features. Declared here so that
 # all the benchmark applications can use it
 if(
     (KernelArchX86 AND KernelExportPMCUser AND KernelX86DangerousMSR)
     OR (KernelArchARM AND KernelArmExportPMUUser)
     OR (KernelArchArmCortexA8 AND KernelDangerousCodeInjection)
+    OR (KernelArchRiscV)
 )
     set(DefaultBenchDeps TRUE)
 else()
     set(DefaultBenchDeps FALSE)
 endif()
 
 find_package(musllibc REQUIRED)

(copying it to devel mailing list)

Thanks!

malus-brandywine avatar Feb 08 '22 18:02 malus-brandywine

see PR https://github.com/seL4/sel4bench/pull/20

axel-h avatar Feb 11 '22 19:02 axel-h

DefaultBenchDeps is used to convey when a certain set of benchmark dependencies are met that benchmark apps can then assume to be present. What it means is not very well defined, and it would likely be an improvement if it was broken down into more fine-grained feature flags. It's probably fine to enable for RISC-V because it now supports reading the cycle counter. Although support for reading other event counters only seems implemented for hifive, which could some benchmark apps to not work on non-hifive platforms.

kent-mcleod avatar Feb 11 '22 23:02 kent-mcleod

So essentially, this setting should only be enabled for platforms that can properly run all of the benchmarks that it enables.

kent-mcleod avatar Feb 11 '22 23:02 kent-mcleod