<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Hi,<br><br>Anybody who knows why the stacktrace returned by process_info(Pid, current_stacktrace) is truncated to 8 items? Is it due to some performance consideration?<br><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">In order to get more usable stacktraces I were thinking of doing this little fix in our system? Do you foresee any drawbacks with it?<br><br>Btw, 8 happens to be the default of the system flag backtrace_depth.<br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br>diff --git a/otp/erts/emulator/beam/erl_bif_info.c b/otp/erts/emulator/beam/erl_bif_info.c<br>index d7f1e2d..2dc310f 100755<br>--- a/otp/erts/emulator/beam/erl_bif_info.c<br>+++ b/otp/erts/emulator/beam/erl_bif_info.c<br>@@ -1607,7 +1607,7 @@ current_stacktrace(Process* p, Process* rp, Eterm** hpp)<br>     Eterm mfa;<br>     Eterm res = NIL;<br> <br>-    depth = 8;<br>+    depth = erts_backtrace_depth;<br>     sz = offsetof(struct StackTrace, trace) + sizeof(BeamInstr *)*depth;<br>     s = (struct StackTrace *) erts_alloc(ERTS_ALC_T_TMP, sz);<br>     s->depth = 0;<br clear="all"></div><br clear="all"><div><div class="gmail_signature"><div dir="ltr">/Håkan<br><br></div></div></div>
</div>