Speed up stack trace generation for the JIT
authorSimon Hausmann <simon.hausmann@digia.com>
Wed, 16 Oct 2013 08:50:08 +0000 (10:50 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 16 Oct 2013 14:03:54 +0000 (16:03 +0200)
commitc1c526aafb2fc70ac6155eb775b3784f1e2e6504
tree824bf1c301d24d51d3197f01400c55ec8b4e17ea
parentddd9c93b084c5168d7b12396450125e7a0929c28
Speed up stack trace generation for the JIT

It turns out that in QML it is not unusual that during early binding
evaluations due to the undefined order, the evaluation tries to look up
properties in objects that aren't initialized yet and thus exceptions are
thrown. Eeach thrown exception saves a stack trace, which is expensive to
generate when using the JIT, as it does full stack unwinding.

This patch implements a more light-weight approach by storing the instruction
pointer in the context before leaving JIT generated code.

Change-Id: I95e1cfd01179247dfc2c1df949828f474a23161b
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
src/3rdparty/masm/assembler/MacroAssemblerX86.h
src/3rdparty/masm/assembler/MacroAssemblerX86_64.h
src/qml/compiler/qv4isel_masm_p.h
src/qml/jsruntime/jsruntime.pri
src/qml/jsruntime/qv4context_p.h
src/qml/jsruntime/qv4engine.cpp
src/qml/jsruntime/qv4stacktrace.cpp [deleted file]
src/qml/jsruntime/qv4stacktrace_p.h [deleted file]