7aeb3bb475
The build-redbear.sh script auto-stashes working tree changes
in nested relibc and base source trees before running the
build. These changes were captured by the failed kernel
build attempt that hit the json-target-spec / kernel rust
toolchain mismatch (fixed in 0.2.5 by creating the local
0.2.5 branch).
Captured changes:
- local/recipes/kde/* : KDE Frameworks 6 source CMakeLists
whitespace changes from the autostash (preserved)
- local/recipes/qt/qtbase/* : qtypes.h whitespace from the
autostash (preserved)
- local/sources/kernel/Cargo.lock : dependency lock from
the kernel relibc rebuild attempt
- local/sources/kernel/src/lib.rs : touched (mtime) by the
build script's touch + make prefix command
This is a bookkeeping commit — the actual code changes
for the threading plan are on the 4 submodule branches
(kernel, relibc, base, libredox) and will be pushed
separately.
0.2.5 branch was created from 0.2.4 (HEAD cd3950072e) to
continue Phase 0 of the multi-threading plan work in a
clean branch.
73 lines
1.5 KiB
C++
73 lines
1.5 KiB
C++
/*
|
|
KWin - the KDE window manager
|
|
This file is part of the KDE project.
|
|
|
|
SPDX-FileCopyrightText: 2021 David Edmundson <davidedmundson@kde.org>
|
|
|
|
SPDX-License-Identifier: LGPL-2.0-or-later
|
|
*/
|
|
|
|
#include <QObject>
|
|
#include <QTemporaryFile>
|
|
#include <QTest>
|
|
|
|
#include "ftrace.h"
|
|
|
|
class TestFTrace : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
TestFTrace();
|
|
private Q_SLOTS:
|
|
void benchmarkTraceOff();
|
|
void benchmarkTraceDurationOff();
|
|
void enable();
|
|
|
|
private:
|
|
QTemporaryFile m_tempFile;
|
|
};
|
|
|
|
TestFTrace::TestFTrace()
|
|
{
|
|
m_tempFile.open();
|
|
qputenv("KWIN_PERF_FTRACE_FILE", m_tempFile.fileName().toLatin1());
|
|
|
|
KWin::FTraceLogger::create();
|
|
}
|
|
|
|
void TestFTrace::benchmarkTraceOff()
|
|
{
|
|
// this macro should no-op, so take no time at all
|
|
QBENCHMARK {
|
|
fTrace("BENCH", 123, "foo");
|
|
}
|
|
}
|
|
|
|
void TestFTrace::benchmarkTraceDurationOff()
|
|
{
|
|
QBENCHMARK {
|
|
fTraceDuration("BENCH", 123, "foo");
|
|
}
|
|
}
|
|
|
|
void TestFTrace::enable()
|
|
{
|
|
KWin::FTraceLogger::self()->setEnabled(true);
|
|
QVERIFY(KWin::FTraceLogger::self()->isEnabled());
|
|
|
|
{
|
|
fTrace("TEST", 123, "foo");
|
|
fTraceDuration("TEST_DURATION", "boo");
|
|
fTrace("TEST", 123, "foo");
|
|
}
|
|
|
|
QCOMPARE(m_tempFile.readLine(), "TEST123foo\n");
|
|
QCOMPARE(m_tempFile.readLine(), "TEST_DURATIONboo begin_ctx=1\n");
|
|
QCOMPARE(m_tempFile.readLine(), "TEST123foo\n");
|
|
QCOMPARE(m_tempFile.readLine(), "TEST_DURATIONboo end_ctx=1\n");
|
|
}
|
|
|
|
QTEST_MAIN(TestFTrace)
|
|
|
|
#include "test_ftrace.moc"
|