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:
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.