{"id":19608645,"url":"https://github.com/sel4/sel4bench","last_synced_at":"2025-10-26T11:39:50.290Z","repository":{"id":14754018,"uuid":"60223246","full_name":"seL4/sel4bench","owner":"seL4","description":"sel4 benchmarking applications and support library.","archived":false,"fork":false,"pushed_at":"2025-03-17T00:39:08.000Z","size":863,"stargazers_count":20,"open_issues_count":14,"forks_count":33,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-04-05T03:22:21.761Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/seL4.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE.md","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-06-02T01:38:23.000Z","updated_at":"2025-03-17T00:39:11.000Z","dependencies_parsed_at":"2025-02-28T05:41:39.017Z","dependency_job_id":"cc86b2e4-db9b-43ac-88dd-cd4280ea478c","html_url":"https://github.com/seL4/sel4bench","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seL4%2Fsel4bench","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seL4%2Fsel4bench/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seL4%2Fsel4bench/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/seL4%2Fsel4bench/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/seL4","download_url":"https://codeload.github.com/seL4/sel4bench/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251204702,"owners_count":21552270,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T10:16:12.816Z","updated_at":"2025-10-26T11:39:45.229Z","avatar_url":"https://github.com/seL4.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\n     Copyright 2017, Data61, CSIRO (ABN 41 687 119 230)\n\n     SPDX-License-Identifier: BSD-2-Clause\n--\u003e\n# sel4bench\n\n_sel4bench_ is a benchmarking applications and support library for\n[seL4](https://sel4.systems/).\n\nTo get this project, check out the [project\nmanifest](https://github.com/seL4/sel4bench-manifest).\n\n# Applications\n\nWe provide multiple applications for benchmarking different paths in the\nkernel.\n\n## sel4bench\n\nThis is the driver application: it launches each benchmark in a separate\nprocess and collects, processes, and outputs results.\n\n## ipc\n\nThis is a hot-cache benchmark of the IPC path.\n\n## irq\n\nThis is a hot-cache benchmark of the IRQ path, measured from inside the\nkernel.  It requires\n[tracepoints](https://docs.sel4.systems/BenchmarkingGuide.html#in-kernel-log-buffer)\nto be placed on the IRQ path where the meaurements are to be taken from.\n\n## irquser\n\nThis is a hot-cache benchmark of the IRQ path, measured from user space.\n\n## scheduler\n\nThis is a hot-cache benchmark of a scheduling decision.  It works by\nusing a producer/consumer pattern between two notification objects.\nThis benchmark also measures `seL4_Yield()`.\n\n## signal\n\nThis is a hot-cache benchmark of the signal path in the kernel, measured\nfrom user space.\n\n## smp\n\nThis is an intra-core IPC round-trip benchmark to check overhead of\nkernel synchronization on IPC throughput.\n\n## vcpu _(AArch64 only)_\n\nThis benchmark will execute a thread as a VCPU (an EL1 guest kernel) and\nthen obtain numbers for the following actions:\n* Privilege escalation from EL1 to EL2 using the `HVC` instruction.\n* Privilege de-escalation from EL2 to EL1 using the `ERET` instruction.\n* The cost of a null invocation of the EL2 kernel using `HVC`.\n* The cost of an `seL4_Call()` from an EL1 guest thread to a native seL4\n  thread.\n* The cost of an `seL4_Reply()` from an seL4 native thread to an EL1\n  guest thread.\n\n*Note:* In order to run this benchmark, you must notify the build system\nthat you wish to enable this benchmark by passing `-DVCPU=true` on the\ncommand line, which will cause the kernel to be compiled to run in EL2.\nYou must also ensure that you pass `-DHARDWARE=false` to disable the\nhardware tests.\n\nSince this benchmark will cause the kernel image to be an EL2 image, it\nwill have an impact on the observed numbers for the other benchmark\napplications as well, since they'll be using an unexpected kernel build.\n\n\n# Adding a new benchmark\n\nContributing a new benchmark to seL4bench requires a few steps:\n\n* Under `apps`, create a directory for your new benchmark and:\n    * Provide a `CMakelists.txt` file that defines a new executable.\n    * Provide a `src` folder that contains the source code for your\n      benchmark.\n* Under `apps/sel4bench`:\n    * Update `CMakeLists.txt` to add your new benchmark to the list of\n      benchmarks.\n    * Under `src`:\n        * Update `benchmark.h` to include your generated config for your benchmark, and provide a function declaration that will act as the entry point for your benchmark.\n        * Provide a `\u003cbenchmark_name\u003e.c` file that implements the above function declaration. This function should return a `benchmark_t` struct. Construct this struct accordingly. The struct expects a function to process the results of the benchmark, which you should provide in this file as well\n        * Inside `main.c`, add your entry point function that was declared/defined above to the array of `benchmark_t` present.\n* Update `easy-settings.cmake` to add your new benchmark. You can define here whether the benchmark should be enabled by default or not.\n* Under `libsel4benchsupport/include`:\n    * Provide a `\u003cbenchmark_name.h\u003e` file that provides any extra definitions that your benchmark may need. You will also generally provide a `benchmark_name_results_t` struct here, which will be used to store the results of your benchmark when processing.\n* Update `settings.cmake` to include your new benchmark.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsel4%2Fsel4bench","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsel4%2Fsel4bench","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsel4%2Fsel4bench/lists"}