-
Notifications
You must be signed in to change notification settings - Fork 209
Support PHP 8.0 Observer API - enabling JIT support #96
Conversation
@beberlei This looks fantastic! Did you run into any issues with implementation or side effects? I'm not sure there will be much of a performance gain with all function calls instrumented, but we haven't really focused on that aspect yet. We'll certainly need help from Niki, Dmitry, Joe, or someone on that part. But even if we can't get much of a performance boost with the new API when instrumenting all the things, the benefit of not having to hook |
@SammyK I believe the positive thing we can draw from this is that the new instrumentation API doesn't seem to make performance worse for the case where everything is instrumented. So combined with the benefit of getting rid of For the case where only a fraction is instrumented, this API by design should be faster than an API that checks explicit function instrumentation on every call during |
@SammyK @morrisonlevi just realized it doesn't work with internal functions yet. This test here 0ca7b91 becomes only "main()==>double". |
@beberlei When @morrisonlevi This brings up an important distinction regarding order of operations between userland and internal functions. Although internal functions are checked early by design, I'm sure other extensions will run into this same issue that Benjamin brought up. At any rate, it's a use case that we'll need to consider with the API. |
@beberlei FYI I've merged @morrisonlevi's PR and updated the observer extension with the new API changes. EDIT: And also added |
Changes looks promising! Is there suggestion about how to test it with jit enabled? |
With this PR Tideways XHProf will support PHP 8 through the new Observer API: php/php-src#5857