aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/doc/src/javascript/finetuning.qdoc
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/doc/src/javascript/finetuning.qdoc')
-rw-r--r--src/qml/doc/src/javascript/finetuning.qdoc63
1 files changed, 29 insertions, 34 deletions
diff --git a/src/qml/doc/src/javascript/finetuning.qdoc b/src/qml/doc/src/javascript/finetuning.qdoc
index 97dc2421c5..0e8a913a2a 100644
--- a/src/qml/doc/src/javascript/finetuning.qdoc
+++ b/src/qml/doc/src/javascript/finetuning.qdoc
@@ -1,29 +1,5 @@
-/****************************************************************************
-**
-** Copyright (C) 2019 The Qt Company Ltd.
-** Contact: https://www.qt.io/licensing/
-**
-** This file is part of the documentation of the Qt Toolkit.
-**
-** $QT_BEGIN_LICENSE:FDL$
-** Commercial License Usage
-** Licensees holding valid commercial Qt licenses may use this file in
-** accordance with the commercial license agreement provided with the
-** Software or, alternatively, in accordance with the terms contained in
-** a written agreement between you and The Qt Company. For licensing terms
-** and conditions see https://www.qt.io/terms-conditions. For further
-** information use the contact form at https://www.qt.io/contact-us.
-**
-** GNU Free Documentation License Usage
-** Alternatively, this file may be used under the terms of the GNU Free
-** Documentation License version 1.3 as published by the Free Software
-** Foundation and appearing in the file included in the packaging of
-** this file. Please review the following information to ensure
-** the GNU Free Documentation License version 1.3 requirements
-** will be met: https://www.gnu.org/licenses/fdl-1.3.html.
-** $QT_END_LICENSE$
-**
-****************************************************************************/
+// Copyright (C) 2019 The Qt Company Ltd.
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GFDL-1.3-no-invariants-only
/*!
\page qtqml-javascript-finetuning.html
@@ -44,8 +20,11 @@ Running JavaScript code can be influenced by a few environment variables, partic
considered for JIT compilation. The default value is 3 times.
\row
\li \c{QV4_FORCE_INTERPRETER}
- \li Setting this environment variable disables the JIT and runs all
- functions through the interpreter, no matter how often they are called.
+ \li Setting this environment variable runs all functions and expressions through the
+ interpreter. The JIT is never used, no matter how often a function or expression is
+ called. Functions and expressions may still be compiled ahead of time using
+ \l{qmlcachegen} or \l{qmlsc}, but only the generated byte code is used at run time. Any
+ generated C++ code and the machine code resulting from it is ignored.
\row
\li \c{QV4_JS_MAX_STACK_SIZE}
\li The JavaScript engine reserves a special memory area as a stack to run JavaScript.
@@ -82,9 +61,12 @@ Running JavaScript code can be influenced by a few environment variables, partic
\li \c{QV4_MAX_CALL_DEPTH}
\li Stack overflows when running (as opposed to compiling) JavaScript are prevented by
controlling the call depth: the number of nested function invocations. By
- default, an exception is generated if the call depth exceeds 1234. If it contains a
- number, this environment variable overrides the maximum call depth. Beware that the
- recursion limit when compiling JavaScript is not affected.
+ default, an exception is generated if the call depth exceeds a maximum number tuned
+ to the platform's default stack size. If the \c{QV4_MAX_CALL_DEPTH} environment
+ variable contains a number, this number is used as maximum call depth. Beware that
+ the recursion limit when compiling JavaScript is not affected. The default maximum
+ call depth is 1234 on most platforms. On QNX it is 640 because on QNX the default
+ stack size is smaller than on most platforms.
\row
\li \c{QV4_MM_AGGRESSIVE_GC}
\li Setting this environment variable runs the garbage collector before each memory
@@ -99,14 +81,27 @@ Running JavaScript code can be influenced by a few environment variables, partic
\c{perf-<pid>.map} in \e{/tmp} which perf then reads. This environment variable, if
set, causes the JIT to generate this file.
\row
- \li \c{QML_DISABLE_DISK_CACHE}
- \li Disables the disk cache. See \l{The QML Disk Cache}.
- \row
\li \c{QV4_SHOW_BYTECODE}
\li Outputs the IR bytecode generated by Qt to the console.
Has to be combined with \c{QML_DISABLE_DISK_CACHE} or already cached bytecode will not
be shown.
+ \row
+ \li \c{QV4_DUMP_BASIC_BLOCKS}
+ \li Outputs the basic blocks of each function compiled ahead of time. The details of the
+ blocks are printed to the console. Additionally, control flow graphs with the byte code
+ for each block are generated in the DOT format for each compiled function. The value of
+ \c {QV4_DUMP_BASIC_BLOCKS} is used as the path to the folder where the DOT files should
+ be generated. If the path is any of ["-", "1", "true"] or if files can't be opened,
+ the graphs are dumped to stdout instead.
+ \row
+ \li \c{QV4_VALIDATE_BASIC_BLOCKS}
+ \li Performs checks on the basic blocks of a function compiled ahead of time to validate
+ its structure and coherence. If the validation fails, an error message is printed to
+ the console.
\endtable
+\l{The QML Disk Cache} accepts further environment variables that allow fine tuning its behavior.
+In particular \c{QML_DISABLE_DISK_CACHE} may be useful for debugging.
+
*/