Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include WordPress action and filter names in Excimer/XHProf sampling data #378

Open
johnbillion opened this issue Jun 29, 2022 · 0 comments

Comments

@johnbillion
Copy link
Member

johnbillion commented Jun 29, 2022

Flamegraphs which are generated using samples from Excimer (Altis v12+) and XHProf (Altis up to v11) don't show function parameter information (as expected). It would be really very useful if the first parameter passed in calls to do_action() and apply_filters() was stored in the sampling data and exposed in the flamegraphs. This requires a change to the underlying extension(s) but I've opened the ticket here for tracking purposes.

This would allow developers to more easily pinpoint which actions and filters are having performance problems without having to work backwards from the action and filter callbacks. Obviously it's the callbacks themselves that introduce performance issues, but being able to quickly identify which action or filter has problematic callbacks attached to it would ease subsequent debugging, particularly as issues are fixed and wall times are reduced.

In XHProf this is already the case for require/include* calls which show up as eg. require_once::path/to/file.php. It would be great to see WP_Hook::do_action::admin_init instead of just WP_Hook::do_action. I've not yet tested Excimer to see whether it does the same.

Ideally the list of functions or methods which have their first parameter included as part of the sampling data would be configurable in userland at runtime. Here's how this is managed in Query Monitor which actually supports showing more than one parameter in its output.

Joe mentioned this may be easier to achieve with Excimer than with XHProf. Either way, it needs someone with some solid C skills to modify the extension.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant