1. 16
  1.  

  2. 5

    Hopefully a repost of this article in a year or two will get a FreeBSD/OpenBSD tag, too. Pity that such a good tech remains on Linux only.

    1. 1

      How is eBPF similar or different from DTrrace? I know they are philosophically related, but I’ve never written a program in either…

      1. 1

        My comment mostly stems from the desire to use the same tool across different platforms, as that would make life easier, due to less context switching. Of course, there is bpftrace, where I could use DTrace-like language for doing instrumentation, but (e)BPF tools seem to be more advanced.

        This is quite a great overview of both, pointing out the major differences: https://tracingsummit.org/ts/2019/files/Tracingsummit2019-dtrace-hees.pdf

    2. 2

      One thing I can’t seem to understand is whether or not eBPF requires you to write in C or not. Most “other languages you can use” seem to just wrap C programs you also have to write anyway. This has remained a point of confusion for me.

      1. 3

        Start with bpftrace which is a very DTrace like tool. If you want to do more elaborate things look into BCC. BCC has support for LuaJIT, Python and C.

        1. 2

          The references for C in the scripts is to be able to interpret and reference the information correctly (inclusion of C headers to get prototypes and data structures)

          1. 4

            Neato, I appreciate the pointers! Get it? Pointers!

            Seriously, thanks.

            1. 2

              Take this upvote and leave.

              :)

        2. 1

          Besides the ones mentioned by @sevan there are also some libraries which allow writing in Rust as well.

          1. 1

            Have a link to the ones you like? I’m a big fan of Rust!

            1. 1

              redbpf is the one I’m most familiar with, but I believe there are other options as well.

              1. 1

                Thanks!