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

Make depth of current_stacktrace configurable #1263

Merged
merged 1 commit into from
Dec 20, 2016

Conversation

hawk
Copy link
Contributor

@hawk hawk commented Dec 1, 2016

The BIF process_info(Pid, current_stacktrace) truncates the
stacktrace. The old behavior was to truncate long stacktraces to max
8 items. And this was hard coded. Now it is truncated to the value of
system_flag(backtrace_depth) instead. The backtrace_depth defaults to
8, but is configurable.

@psyeugenic psyeugenic added enhancement team:VM Assigned to OTP team VM labels Dec 1, 2016
@sverker sverker self-assigned this Dec 2, 2016
@garazdawi
Copy link
Contributor

Please also extend the documentation of process_info(Pid, current_stacktrace) and system_flag(backtrace_depth, Depth) to show how they are related.

@hawk
Copy link
Contributor Author

hawk commented Dec 12, 2016

Do I need to do anything more?

@sverker
Copy link
Contributor

sverker commented Dec 12, 2016

I added a fix to your branch for zero depth, but that seem to have been lost now.
I found the bug by running your new test code (!?).

sverker@fdd7719

Please add the fix again in whatever way you like.

The BIF process_info(Pid, current_stacktrace) truncates the
stacktrace. The old behavior was to truncate long stacktraces to max
8 items. And this was hard coded. Now it is truncated to the value of
system_flag(backtrace_depth) instead. The backtrace_depth defaults to
8, but is configurable.
@hawk
Copy link
Contributor Author

hawk commented Dec 13, 2016

OK?

@sverker sverker added the testing currently being tested, tag is used by OTP internal CI label Dec 14, 2016
@sverker sverker merged commit 420aa50 into erlang:maint Dec 20, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants