diff options
author | Erik Verbruggen <erik.verbruggen@qt.io> | 2018-06-06 15:32:50 +0200 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@qt.io> | 2018-06-21 19:51:04 +0000 |
commit | 3442f6c7679ecd30f035ca0708a2b47091ea47f4 (patch) | |
tree | cde96780738ce39b93fe5260dce0694c7815fcd7 /src/qml/jit | |
parent | 310d881ea0e42a4347c43ab8a9311a79d199ab34 (diff) |
Enable perf map writing on all platforms
This is controlled by a environment variable, so the code won't be
executed if not explicitly asked for.
Change-Id: Iec7be17ae1f21f604064e12f35ffe24be0407760
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Diffstat (limited to 'src/qml/jit')
-rw-r--r-- | src/qml/jit/qv4assembler.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/qml/jit/qv4assembler.cpp b/src/qml/jit/qv4assembler.cpp index bf7fb8a536..c9a2b7c451 100644 --- a/src/qml/jit/qv4assembler.cpp +++ b/src/qml/jit/qv4assembler.cpp @@ -1391,7 +1391,6 @@ void Assembler::link(Function *function) function->codeRef = new JSC::MacroAssemblerCodeRef(codeRef); function->jittedCode = reinterpret_cast<Function::JittedCode>(function->codeRef->code().executableAddress()); -#if defined(Q_OS_LINUX) // This implements writing of JIT'd addresses so that perf can find the // symbol names. // @@ -1399,7 +1398,7 @@ void Assembler::link(Function *function) // content, for more information, see: // https://github.com/torvalds/linux/blob/master/tools/perf/Documentation/jit-interface.txt static bool doProfile = !qEnvironmentVariableIsEmpty("QV4_PROFILE_WRITE_PERF_MAP"); - if (doProfile) { + if (Q_UNLIKELY(doProfile)) { static QFile perfMapFile(QString::fromLatin1("/tmp/perf-%1.map") .arg(QCoreApplication::applicationPid())); static const bool isOpen = perfMapFile.open(QIODevice::WriteOnly); @@ -1417,7 +1416,6 @@ void Assembler::link(Function *function) perfMapFile.flush(); } } -#endif } void Assembler::addLabel(int offset) |