Clutch

Spying on a Ruby process’s memory allocations with eBPF

Spying on a Ruby process’s memory allocations with eBPF
Average rating: 0
(0 votes)

Are you ready for some experiment? What if you could take an arbitrary Ruby process’s PID and start tracking its memory allocations? Today we’ll talk about spying on a Ruby process’s memory allocations with eBPF.

It is possible that the experiment will work only on some machines, but do not give up. The purpose of this material is to show you what you can actually do with Ruby, even if it is an experiment.

In the original material you will find:

  1. Settings and fundamentals of how it works
  2. Writing BPF compiler collection
  3. Getting the name of a class
  4. Mapping the ruby process’s memory
  5. How to ignore the segfaults
  6. Design principle

Here you can explore the demo and the code.

Rate this article, if you like it

Thanks! You’ve rated this material!

Got a project? Let's discuss it!

*By submitting this form you agree with our Privacy Policy.

Mailing & Legal Address

Syndicode Inc. 340 S Lemon Ave #3299, Walnut CA, 91789, USA

Visiting & Headquarters address
Kyiv Sofiivska 1/2a, 01001, Kyiv, Ukraine
Dnipro Hlinky 2, of. 1003, 49000, Dnipro, Ukraine
Email info@syndicode.com
Phone (+1) 9035021111