aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jit
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@qt.io>2018-11-23 12:35:49 +0100
committerErik Verbruggen <erik.verbruggen@qt.io>2019-01-11 12:27:52 +0000
commitf3919f5d94510cc049a438ba2267f9db4a252970 (patch)
tree40450970d2b6620cdd7716ecf3a6fc585c5cdfcc /src/qml/jit
parent3b67ec7abdb3056f259eb0aa819de9b5bbf8ec3a (diff)
V4: Change assembler dumping to use a logging category
This includes removal of the QV4_SHOW_ASM environment variable. Change-Id: Ibbaf7f6eabd1b66e8539bcbcc3febdd79742e003 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/jit')
-rw-r--r--src/qml/jit/qv4assemblercommon.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/qml/jit/qv4assemblercommon.cpp b/src/qml/jit/qv4assemblercommon.cpp
index bc17be229d..35b8f34633 100644
--- a/src/qml/jit/qv4assemblercommon.cpp
+++ b/src/qml/jit/qv4assemblercommon.cpp
@@ -39,6 +39,7 @@
#include <QBuffer>
#include <QFile>
+#include <QLoggingCategory>
#include "qv4engine_p.h"
#include "qv4assemblercommon_p.h"
@@ -58,6 +59,8 @@ QT_BEGIN_NAMESPACE
namespace QV4 {
namespace JIT {
+Q_LOGGING_CATEGORY(lcAsm, "qt.v4.asm")
+
namespace {
class QIODevicePrintStream: public FilePrintStream
{
@@ -110,7 +113,9 @@ static void printDisassembledOutputWithCalls(QByteArray processedOutput,
}
}
- qDebug("%s", processedOutput.constData());
+ auto lines = processedOutput.split('\n');
+ for (const auto &line : lines)
+ qCDebug(lcAsm, "%s", line.constData());
}
JIT::PlatformAssemblerCommon::~PlatformAssemblerCommon()
@@ -131,7 +136,7 @@ void PlatformAssemblerCommon::link(Function *function, const char *jitKind)
JSC::MacroAssemblerCodeRef codeRef;
- static const bool showCode = qEnvironmentVariableIsSet("QV4_SHOW_ASM");
+ static const bool showCode = lcAsm().isDebugEnabled();
if (showCode) {
QBuffer buf;
buf.open(QIODevice::WriteOnly);