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

Add experimental option to allow stack extension #131

Merged
merged 2 commits into from
Feb 5, 2024

Conversation

agoallikmaa
Copy link
Contributor

@agoallikmaa agoallikmaa commented Feb 4, 2024

Resolves open-telemetry/opentelemetry-php#1223

Add INI option opentelemetry.allow_stack_extension (default Off) that enables experimental stack extension.

When processing the return value of a pre hook, the number of slots that the stack can be extended by is calculated. If the INI option is Off, this will be 0. Otherwise it is the minimum of remaining slots in the stack page and a hardcoded limit of 16. The purpose of the limit is to allow collecting the extended values to a temporary array without explicit allocations, so that the changes to stack size (and moving around slots on the stack) could be done in one step at the end.

@brettmc brettmc merged commit 85d4d59 into open-telemetry:main Feb 5, 2024
16 checks passed
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

Successfully merging this pull request may close these issues.

[opentelemetry-php-instrumentation] - Allow adding parameters even if stack frame needs to be extended
2 participants