javierhonduco / lightswitch

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

Handle rbp offsets that do not fit in 2 bytes #88

Closed javierhonduco closed 1 month ago

javierhonduco commented 1 month ago

Improve the error handling and rather than just unwrapping this result causing a panic let's record this happening and move on. The unwinder will also recognise this rbp type and bump a counter.

I did not see any rbp offsets not fitting in 2 bytes but it can happen and panic'ing is not acceptable.

That being said, cfa offsets are in many cases larger than what can be represented in 2 bytes and this is something that could be done in another commit, perhaps with some special larger unwind row for these cases?

Test Plan

CI + ran for a while without issues