kmem: capDL memory analyzer

Script that analyzes the CAmkES-generated capDL spec for memory use.

By default the memory footprint of each "component" is displayed.
(Shared memory regions are also displayed separately as it's unclear
which of multiple components to charge.)  The -d option gives each
component a breakdown by memory type:

- "elf": data loadeed from .text or .data ELF segments,
- "bss": zero-initialized memory,
- "ipc_buffer": CAmkES-generated per-thread IPC buffers,
- "stack": CAmkES-generated thread stacks,
- "copyregion": unmapped VSpace regions, and
- "mmio": device-backed memory, typically used to access MMIO registers
   but also used to reach Renode-loaded data like the cpio archive of
   builtin applications & models

(NB: mmio + copyregion sections do not count against memory use as they
are allocated from dedicated memory that does not have physical memory
backing).

By default the last release build will be analyzed (also selected with
the -R option). The -D option can be used to select the last debug build.

Change-Id: I8ed1d6249fca13e5dfd2a10159e2399463901229
2 files changed
tree: 59475ae9fa8304042299949f9493ca4a1a855669
  1. preupload-hooks/
  2. thirdparty/
  3. build-camkes.sh
  4. build-sparrow.sh
  5. check-iree-commit.sh
  6. CONTRIBUTING.md
  7. create-kshell-socket-port.sh
  8. download-toolchain.sh
  9. download_iree_compiler.py
  10. download_renode.py
  11. fetch-rust-toolchain.sh
  12. generate-renode-port-cmd.sh
  13. generate_renode_configs.sh
  14. install-prereqs.sh
  15. install-rust-toolchain.sh
  16. install-toolchain.sh
  17. install-verible.sh
  18. kcargo.sh
  19. kgdb.sh
  20. kmem.sh
  21. kshell.sh
  22. kupload.sh
  23. launch_renode.py
  24. LICENSE
  25. manage-rust-toolchain.sh
  26. mem.awk
  27. python-requirements.txt
  28. quick_sim.py
  29. README.md
  30. run-chip-verilator-sim.sh
  31. run-iree.sh
  32. run-spike-springbok.sh
  33. run-vector-simulation.py
  34. screenrc
  35. start-renode.sh
README.md

Project Shodan Scripts

Shodan is a project to build a low-power secure embeded platform for Ambient ML applications. The target platform leverages RISC-V and OpenTitan.

This directory holds scripts used in developing Shodan:

  • build-sparrow.sh: a script to demonstrate how to build and run seL4 CAmkES tests
  • kcargo.sh: a wrapper script that shows how Rust is run in the Shodan developement environment

[more scripts will appear here as more of the project is released]

Source Code Headers

Every file containing source code includes copyright and license information. For dependent / non-Google code these are inherited from the upstream repositories. If there are Google modifications you may find the Google Apache license found below.

Apache header:

Copyright 2022 Google LLC

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.