javierhonduco / lightswitch

CPU profiler for Linux written in Rust
MIT License
7 stars 3 forks source link

Fixes for 20240325 #5

Closed gmarler closed 8 months ago

gmarler commented 8 months ago

This fixes 2 separate issues:

  1. The eBPF verifier in newer kernels requires all items on the stack to be fully initialized. This generally requires all values on the stack to be 64 bit values, or a multiple of 64 bits. Using u64 variables rather than u32 guarantees we won't have issues at present.
  2. The variable name PERF_BUFFER_PAGES stores a value that is actually in units of bytes, so changing the name to PERF_BUFFER_BYTES