mirror of
https://github.com/cloud-hypervisor/cloud-hypervisor.git
synced 2024-12-22 13:45:20 +00:00
docs: Update instructions to point to new profiling target
This removes the need for the user to manually change the Cargo.toml file for profiling. Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
parent
c6d3f61a42
commit
e2886a4b1f
@ -4,20 +4,12 @@
|
||||
|
||||
## Building a suitable binary
|
||||
|
||||
Modify the `Cargo.toml` file to add `debug = 1` to the `[profile.release]` block. It should look like this:
|
||||
|
||||
```
|
||||
[profile.release]
|
||||
lto = true
|
||||
debug = 1
|
||||
```
|
||||
|
||||
This adds the symbol information to the release binary but does not otherwise affect the performance.
|
||||
|
||||
The binary must also be built with frame pointers included so that the call graph can be captured by the profiler.
|
||||
|
||||
```
|
||||
$ cargo clean && RUSTFLAGS='-C force-frame-pointers=y' cargo build --release
|
||||
$ cargo clean && RUSTFLAGS='-C force-frame-pointers=y' cargo build --profile profiling
|
||||
```
|
||||
|
||||
## Profiling
|
||||
@ -27,7 +19,7 @@ $ cargo clean && RUSTFLAGS='-C force-frame-pointers=y' cargo build --release
|
||||
e.g.
|
||||
|
||||
```
|
||||
$ perf record -g target/release/cloud-hypervisor \
|
||||
$ perf record -g target/profiling/cloud-hypervisor \
|
||||
--kernel ~/src/linux/vmlinux \
|
||||
--pmem file=~/workloads/focal.raw \
|
||||
--cpus boot=1 --memory size=1G \
|
||||
|
Loading…
Reference in New Issue
Block a user