-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tdx: cargo flag --with-perf-tools does
not include perf tooling in the ramdisk
#357
Comments
@jaredwhitedev maybe knows some hints here? |
Yeah the |
I wonder if we need to remove that flag or just have that flag bundle some stock perf tools image from a known source. Where did you get your "working perf binary"? I assume we still need to add |
I don't remember at this point, I think I built it a long time ago. Important bit is that it is statically linked. I believe we already bundle the perf binary with the kernel build, I see it here: I haven't needed CONFIG_BPF_SYSCALL for kernel and user stack sampling with perf. |
@jaredwhitedev it's likely that kernel config is a red herring, it's just to get rid of the "Couldn't synthesize bpf events" error when running perf. Building |
Yeah, I agree on the kernel config front. What command are you using to view/process the perf.data? It looks like Brendan Gregg's flramegraph scripts? Are you running perf script inside OHCL? For the record, I can normally see user-space stacks by executing the following inside OHCL (via the shell command): perf record -a -g -- sleep 1
perf report As a quick correctness test |
Scenario
Building CVMs with perf tooling for evaluating OHCL TDX performance
Expected Behavior
Running the below command should produce an initrd which contains the "perf" and "tracing" tools, which we can leverage to get kernel (and user?) stacks.
cargo xflowey build-igvm x64-cvm-devkern --release --with-perf-tools --override-manifest=./vm/loader/manifests/openhcl-x64-cvm-dev.json
Observed Behavior
We must modify openhcl's
rootfs.config
to include theperf
andtracing
binaries, a build a custom kernel withCONFIG_BPF_SYSCALL
. With this workaround we are able to get flamegraphs of the kernel stacks, but we have not found a build configuration that allows us to get the more critical user stacks.The text was updated successfully, but these errors were encountered: