]> git.kaiwu.me - njs.git/commit
Implemented lazy stack symbolization.
authorDmitry Volyntsev <xeioex@nginx.com>
Wed, 16 Oct 2024 01:28:19 +0000 (18:28 -0700)
committerDmitry Volyntsev <xeioexception@gmail.com>
Thu, 17 Oct 2024 05:41:10 +0000 (22:41 -0700)
commiteda6fa7d430619f646a2c969a267225306cff521
treed7765957b61e6ea5ad97ceed15558f013b23a1f0
parent6ed6c100db944dc9d820897f8f0c582c245b2b48
Implemented lazy stack symbolization.

Previously, when an exception was thrown, the exception got 'stack'
property attached which contained the backtrace information about where
the exception happened. This could be a heavy operation and it was not
always needed.

To optimize it, the process is split into 2 phases. The first phase
collects all the necessary info about the current stack. The second
phase, where the stack symbolization happens, occurs only when this
property is referenced.
src/njs_error.c
src/njs_vm.h
src/test/njs_benchmark.c