diff options
author | Eric Wong <e@80x24.org> | 2022-12-16 14:39:31 +0000 |
---|---|---|
committer | Eric Wong <mwrap-perl@80x24.org> | 2022-12-16 20:53:59 +0000 |
commit | 6b3e8c55e455d5bd407c66c189c8dbcf9881b4b6 (patch) | |
tree | 9ad9d2dd222449f63c901d32d763a5d626d70760 /Mwrap.xs | |
parent | 3e941dd301fc17905720060a5f6a0d2ea88d5810 (diff) | |
download | mwrap-6b3e8c55e455d5bd407c66c189c8dbcf9881b4b6.tar.gz |
This is a valuable tuning knob and allows users to forgo restarting an app to change backtrace depth. A /reset is recommended.
Diffstat (limited to 'Mwrap.xs')
-rw-r--r-- | Mwrap.xs | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -132,6 +132,22 @@ mwrap_reset() CODE: mwrap_reset(); +unsigned +mwrap_bt_depth(arg = &PL_sv_undef) + SV *arg; +CODE: + if (SvOK(arg)) { + UV n = SvUVx(arg); + if (n > MWRAP_BT_MAX) + n = MWRAP_BT_MAX; + CMM_STORE_SHARED(bt_req_depth, (uint32_t)n); + RETVAL = n; + } else { + RETVAL = CMM_LOAD_SHARED(bt_req_depth); + } +OUTPUT: + RETVAL + Devel::Mwrap::SrcLoc mwrap_get(loc) SV *loc; |