HHVM and Hack Support
Did you know that Blackfire supports HHVM and Hack out of the box? Let see how you can make it work very easily.
Deprecation notice: HHVM and Hack support is now deprecated. The following will not work anymore.
As more websites use HHVM as their platform of choice to run PHP code, it was important for us to make sure Blackfire works well on this new PHP engine as early as possible. And it was much easier than we thought at first.
In the early days of Blackfire, we started to develop a C++ extension to support HHVM. It worked quite well but we had to drastically update our code on a regular basis as the HHVM internals were still a moving target. At some point, we decided to put the project aside and wait for HHVM internals to stabilize. This was a great decision as creating a C++ extension and hooking into the engine is now much easier. But there is an even easier solution than starting from scratch by using the built-in XHProf support in HHVM.
Last month, we wrote about how PHP XHProf users can benefit from Blackfire by using the Blackfire PHP SDK. The good news is that the same SDK can also be used to profile PHP code running on HHVM! So, go read that blog post to learn more about how to enable Blackfire for your HHVM stack and the current limitations.
Oh, by the way, this also makes Blackfire compatible with Hack!
Happy HHVM profiling!