diff options
author | Simon Hausmann <simon.hausmann@digia.com> | 2013-10-16 10:50:08 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-16 16:03:54 +0200 |
commit | c1c526aafb2fc70ac6155eb775b3784f1e2e6504 (patch) | |
tree | 824bf1c301d24d51d3197f01400c55ec8b4e17ea /src/3rdparty | |
parent | ddd9c93b084c5168d7b12396450125e7a0929c28 (diff) |
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>
Diffstat (limited to 'src/3rdparty')
-rw-r--r-- | src/3rdparty/masm/assembler/MacroAssemblerX86.h | 5 | ||||
-rw-r--r-- | src/3rdparty/masm/assembler/MacroAssemblerX86_64.h | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/src/3rdparty/masm/assembler/MacroAssemblerX86.h b/src/3rdparty/masm/assembler/MacroAssemblerX86.h index 7a01e41e11..9a33fe870e 100644 --- a/src/3rdparty/masm/assembler/MacroAssemblerX86.h +++ b/src/3rdparty/masm/assembler/MacroAssemblerX86.h @@ -197,6 +197,11 @@ public: return Call(m_assembler.call(), Call::Linkable); } + void callToRetrieveIP() + { + m_assembler.call(); + } + // Address is a memory location containing the address to jump to void jump(AbsoluteAddress address) { diff --git a/src/3rdparty/masm/assembler/MacroAssemblerX86_64.h b/src/3rdparty/masm/assembler/MacroAssemblerX86_64.h index db0e880cb9..9e74f1c29f 100644 --- a/src/3rdparty/masm/assembler/MacroAssemblerX86_64.h +++ b/src/3rdparty/masm/assembler/MacroAssemblerX86_64.h @@ -136,6 +136,11 @@ public: return result; } + void callToRetrieveIP() + { + m_assembler.call(); + } + // Address is a memory location containing the address to jump to void jump(AbsoluteAddress address) { |