1. 15

Hello friends!

In the last week I’ve been building a sampling profiler for my operating system, SerenityOS.

It works by having the kernel record samples of call stacks while a process is running, and then exposing those recorded samples as a JSON file in the /proc directory.

It’s been a ton of fun so far, and I get super excited when the profiler learns some new trick, and I end up profiling random parts of the OS for a while, and then get back to implementing more features.

The linked video is the most recent one in the series where I add a timeline view to allow selecting a specific (time) range of the profile, but if you’d like to see the work in chronological order, it went like this:

  1. Adding a simple process profiling mechanism to the kernel
  2. Starting work on a tree-based GUI profile viewer
  3. Adding a timeline view to the profiler (this is the linked video)

If you know some cool tricks that a profiler could do, I’m very curious to hear them. I’ve used them a lot before, but never implemented one, so I’m happy to try random ideas.

Thanks for checking out my thread! :)

Edit: Here’s a current screenshot of the profiler GUI to give you an idea of where it’s at.

  1.