Skip to content

Profiling Uhyve

Panagiotis "Ivory" Vasilopoulos edited this page Dec 10, 2024 · 1 revision

Using perf

> sudo perf record -g -F 12000 target/release/uhyve path/to/my/bin
> sudo perf script -i perf.data > serial.perf

Open serial.perf in profiler.firefox.com.

Keep in mind that both the kernel and Uhyve should be built in release mode.

Valgrind & KCachegrind

  1. Add debug info to the release profile in the Cargo.toml:

    [profile.release]
    debug = true
  2. Execute Uhyve with valgrind (adapt the kernel and the arguments if necessary)

    > valgrind --tool=callgrind  --dump-instr=yes --collect-jumps=yes --simulate-cache=yes target/release/uhyve data/
    x86_64/hello_world
  3. Investigate the run with KCachegrind

    > kcachegrind callgrind.out.123456

    (of course: adapt the filename of the callgrind-file)

Clone this wiki locally