Skip to content

feat: disable JIT debugging by default#28

Open
carlos-granados wants to merge 1 commit intophp-debugger:mainfrom
carlos-granados:disable-jit-debugging-by-default
Open

feat: disable JIT debugging by default#28
carlos-granados wants to merge 1 commit intophp-debugger:mainfrom
carlos-granados:disable-jit-debugging-by-default

Conversation

@carlos-granados
Copy link
Copy Markdown
Collaborator

@carlos-granados carlos-granados commented Mar 24, 2026

This PR adds a new jit_debugging_enabled ini setting that allows you to disable some of the optimizations that we have added. When this is enabled you will be able to do JIT debugging even if you don't initially connect to any client by starting a connection using the xdebug_connect_to_client and xdebug_break functions or when an error or exception is raised. If you enable it then the performance gain is much smaller, instead of improving performance by 97% you will improve it by 60% (not bad in any case)

With this disabled I wanted to be able to disable even more operations so that we could save even more time but I found out that the only significant thing that we could add was not disabling the opcache optimizer, the other main source of overhead is the addition of the observer functions but this needs to be set up at the module initialization level, so we cannot actually disable it for each request depending on whether we connect or not

And the opcache optimizer is really only relevant for cgi/fpm processes, not cli processes, as opcache is not really useful for single use CLI commands and is usually disabled there, so I did not manage to really improve the current optimization by much

But what I was able to do is to get the vast majority of tests which had been marked as XFAIL to pass by setting this ini setting to enabled. There are still a couple which are still failing and where I need to take a deeper look. I also managed to get a few of the tests which had been skipped to pass by using this new setting or by changing some basic settings of the test setup

@carlos-granados carlos-granados added performance-check Add this label to run the performance CI workflow and removed performance-check Add this label to run the performance CI workflow labels Mar 24, 2026
@carlos-granados carlos-granados force-pushed the disable-jit-debugging-by-default branch from 1ed4f0a to d5e2d46 Compare March 24, 2026 20:10
@carlos-granados carlos-granados added performance-check Add this label to run the performance CI workflow and removed performance-check Add this label to run the performance CI workflow labels Mar 24, 2026
@carlos-granados carlos-granados force-pushed the disable-jit-debugging-by-default branch from d5e2d46 to 39ff765 Compare March 24, 2026 21:01
@carlos-granados carlos-granados marked this pull request as ready for review March 25, 2026 16:10
@pronskiy
Copy link
Copy Markdown
Collaborator

@carlos-granados I wonder why benchmarks workflow didnt run on this one?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance-check Add this label to run the performance CI workflow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants