diff --git a/src/corelib/global/qsimd.cpp b/src/corelib/global/qsimd.cpp index 8bc53815916..2bd1aed573e 100644 --- a/src/corelib/global/qsimd.cpp +++ b/src/corelib/global/qsimd.cpp @@ -18,7 +18,7 @@ #include #ifdef Q_OS_LINUX -# include "../testlib/3rdparty/valgrind_p.h" +# include "../testlib/3rdparty/valgrind/valgrind_p.h" #endif #define QT_FUNCTION_TARGET_BASELINE diff --git a/src/testlib/3rdparty/CYCLE_LICENSE.txt b/src/testlib/3rdparty/cycle/LICENSE.txt similarity index 100% rename from src/testlib/3rdparty/CYCLE_LICENSE.txt rename to src/testlib/3rdparty/cycle/LICENSE.txt diff --git a/src/testlib/3rdparty/cycle_p.h b/src/testlib/3rdparty/cycle/cycle_p.h similarity index 100% rename from src/testlib/3rdparty/cycle_p.h rename to src/testlib/3rdparty/cycle/cycle_p.h diff --git a/src/testlib/3rdparty/cycle/qt_attribution.json b/src/testlib/3rdparty/cycle/qt_attribution.json new file mode 100644 index 00000000000..1eb932b42f7 --- /dev/null +++ b/src/testlib/3rdparty/cycle/qt_attribution.json @@ -0,0 +1,16 @@ +[ + { + "Id": "cycle", + "Name": "Cycle", + "QDocModule": "qttestlib", + "QtUsage": "Used in the Qt Test module.", + "Files": "cycle_p.h", + + "Description": "Allows to access the CPU's cycle counters.", + "License": "MIT License", + "LicenseId": "MIT", + "LicenseFile": "LICENSE.txt", + "Copyright": ["Copyright (c) 2003, 2006 Matteo Frigo", + "Copyright (c) 2003, 2006 Massachusetts Institute of Technology"] + } +] diff --git a/src/testlib/3rdparty/LINUX_LICENSE.txt b/src/testlib/3rdparty/linux/LICENSE.txt similarity index 100% rename from src/testlib/3rdparty/LINUX_LICENSE.txt rename to src/testlib/3rdparty/linux/LICENSE.txt diff --git a/src/testlib/3rdparty/linux_perf_event_p.h b/src/testlib/3rdparty/linux/perf_event_p.h similarity index 100% rename from src/testlib/3rdparty/linux_perf_event_p.h rename to src/testlib/3rdparty/linux/perf_event_p.h diff --git a/src/testlib/3rdparty/linux/qt_attribution.json b/src/testlib/3rdparty/linux/qt_attribution.json new file mode 100644 index 00000000000..07e82490580 --- /dev/null +++ b/src/testlib/3rdparty/linux/qt_attribution.json @@ -0,0 +1,28 @@ +[ + { + "Id": "linuxperf", + "Name": "Linux Performance Events", + "QDocModule": "qttestlib", + "QtUsage": "Used on Linux and Android in the Qt Test module.", + "Comment": { "UpstreamFile": "include/uapi/linux/perf_event.h", + "Repository": "https://github.com/torvalds/linux", + "License-note": "The SPDX's 'WITH Linux-syscall-note' is why we can use it", + "Update": [ + "Not normally needed unless", + "New feature in QtTest needs something in a newer version", + "or if a Linux port to some new architecture omits old API" + ] + }, + "Files": "perf_event_p.h", + + "Description": "Allows access to the Linux kernel's performance events.", + "Homepage": "https://www.kernel.org", + "Version": "6.0", + "License": "GNU General Public License v2.0 only with Linux Syscall Note", + "LicenseId": "GPL-2.0-only WITH Linux-syscall-note", + "LicenseFile": "LICENSE.txt", + "Copyright": ["Copyright (C) 2008-2009, Thomas Gleixner ", + "Copyright (C) 2008-2011, Red Hat, Inc., Ingo Molnar", + "Copyright (C) 2008-2011, Red Hat, Inc., Peter Zijlstra"] + } +] diff --git a/src/testlib/3rdparty/qt_attribution.json b/src/testlib/3rdparty/qt_attribution.json deleted file mode 100644 index 77f58e7d759..00000000000 --- a/src/testlib/3rdparty/qt_attribution.json +++ /dev/null @@ -1,51 +0,0 @@ -[ - { - "Id": "valgrind", - "Name": "Valgrind", - "QDocModule": "qttestlib", - "QtUsage": "Used on Linux ond MacOS in the Qt Test module.", - "Comment": { "UpstreamFiles": [ "include/valgrind.h.in", "callgrind/callgrind.h" ], - "License": "These two files are BSD; the rest of valgrind is GPL" }, - "Files": [ "valgrind_p.h", "callgrind_p.h" ], - - "Description": "An instrumentation framework for building dynamic analysis tools.", - "Homepage": "http://valgrind.org/", - "Version": "3.22.0", - "License": "BSD 4-clause \"Original\" or \"Old\" License", - "LicenseId": "BSD-4-Clause", - "LicenseFile": "VALGRIND_LICENSE.txt", - "Copyright": ["Copyright (C) 2000-2017 Julian Seward", - "Copyright (C) 2003-2017 Josef Weidendorfer."] - }, - { - "Id": "cycle", - "Name": "Cycle", - "QDocModule": "qttestlib", - "QtUsage": "Used in the Qt Test module.", - "Files": "cycle_p.h", - - "Description": "Allows to access the CPU's cycle counters.", - "License": "MIT License", - "LicenseId": "MIT", - "LicenseFile": "CYCLE_LICENSE.txt", - "Copyright": ["Copyright (c) 2003, 2006 Matteo Frigo", - "Copyright (c) 2003, 2006 Massachusetts Institute of Technology"] - }, - { - "Id": "linuxperf", - "Name": "Linux Performance Events", - "QDocModule": "qttestlib", - "QtUsage": "Used on Linux and Android in the Qt Test module. Note that this is a copy of the respective Linux header, and the clarifications of the Linux Syscall Note apply.", - "Files": "linux_perf_event_p.h", - - "Description": "Allows access to the Linux kernel's performance events.", - "Homepage": "https://www.kernel.org", - "Version": "3.7", - "License": "GNU General Public License v2.0 only with Linux Syscall Note", - "LicenseId": "GPL-2.0-only WITH Linux-syscall-note", - "LicenseFile": "LINUX_LICENSE.txt", - "Copyright": ["Copyright (C) 2008-2009, Thomas Gleixner ", - "Copyright (C) 2008-2011, Red Hat, Inc., Ingo Molnar", - "Copyright (C) 2008-2011, Red Hat, Inc., Peter Zijlstra"] - } -] diff --git a/src/testlib/3rdparty/VALGRIND_LICENSE.txt b/src/testlib/3rdparty/valgrind/LICENSE.txt similarity index 100% rename from src/testlib/3rdparty/VALGRIND_LICENSE.txt rename to src/testlib/3rdparty/valgrind/LICENSE.txt diff --git a/src/testlib/3rdparty/callgrind_p.h b/src/testlib/3rdparty/valgrind/callgrind_p.h similarity index 100% rename from src/testlib/3rdparty/callgrind_p.h rename to src/testlib/3rdparty/valgrind/callgrind_p.h diff --git a/src/testlib/3rdparty/valgrind/qt_attribution.json b/src/testlib/3rdparty/valgrind/qt_attribution.json new file mode 100644 index 00000000000..f828a1fc072 --- /dev/null +++ b/src/testlib/3rdparty/valgrind/qt_attribution.json @@ -0,0 +1,20 @@ +[ + { + "Id": "valgrind", + "Name": "Valgrind", + "QDocModule": "qttestlib", + "QtUsage": "Used on Linux ond MacOS in the Qt Test module.", + "Comment": { "UpstreamFiles": [ "include/valgrind.h.in", "callgrind/callgrind.h" ], + "License": "These two files are BSD; the rest of valgrind is GPL" }, + "Files": [ "valgrind_p.h", "callgrind_p.h" ], + + "Description": "An instrumentation framework for building dynamic analysis tools.", + "Homepage": "http://valgrind.org/", + "Version": "3.22.0", + "License": "BSD 4-clause \"Original\" or \"Old\" License", + "LicenseId": "BSD-4-Clause", + "LicenseFile": "LICENSE.txt", + "Copyright": ["Copyright (C) 2000-2017 Julian Seward", + "Copyright (C) 2003-2017 Josef Weidendorfer."] + } +] diff --git a/src/testlib/3rdparty/valgrind_p.h b/src/testlib/3rdparty/valgrind/valgrind_p.h similarity index 100% rename from src/testlib/3rdparty/valgrind_p.h rename to src/testlib/3rdparty/valgrind/valgrind_p.h diff --git a/src/testlib/CMakeLists.txt b/src/testlib/CMakeLists.txt index 944bd9876d3..856606b529a 100644 --- a/src/testlib/CMakeLists.txt +++ b/src/testlib/CMakeLists.txt @@ -12,7 +12,7 @@ qt_internal_add_module(Test QMAKE_MODULE_CONFIG console testlib_defines EXCEPTIONS SOURCES - 3rdparty/cycle_p.h + 3rdparty/cycle/cycle_p.h # Needed by tests, so visible to syncqt. removed_api.cpp # keep first qabstracttestlogger.cpp qabstracttestlogger_p.h qasciikey.cpp @@ -79,7 +79,9 @@ qt_internal_add_module(Test PRIVATE_MODULE_INTERFACE Qt::CorePrivate ATTRIBUTION_FILE_DIR_PATHS - 3rdparty + 3rdparty/cycle + 3rdparty/linux + 3rdparty/valgrind ) if(TARGET Gui) @@ -100,10 +102,12 @@ qt_internal_extend_target(Test CONDITION QT_FEATURE_batch_test_support qtestregistry.cpp qtestregistry_p.h ) +# 3rdparty/valgrind/*_p.h deliberately omitted, so syncqt doesn't +# mirror it in generated include/ directory - #include using "..._p.h" +# with a relative path. Only this module's sources and Core's qsimd.h +# should need to. qt_internal_extend_target(Test CONDITION QT_FEATURE_valgrind SOURCES - 3rdparty/callgrind_p.h - 3rdparty/valgrind_p.h qbenchmarkvalgrind.cpp qbenchmarkvalgrind_p.h ) diff --git a/src/testlib/qbenchmarkmeasurement.cpp b/src/testlib/qbenchmarkmeasurement.cpp index 99d5b1dd4fa..32a066967a5 100644 --- a/src/testlib/qbenchmarkmeasurement.cpp +++ b/src/testlib/qbenchmarkmeasurement.cpp @@ -41,7 +41,7 @@ int QBenchmarkTimeMeasurer::adjustMedianCount(int) return 1; } -#ifdef HAVE_TICK_COUNTER // defined in 3rdparty/cycle_p.h +#ifdef HAVE_TICK_COUNTER // defined in 3rdparty/cycle/cycle_p.h void QBenchmarkTickMeasurer::start() { diff --git a/src/testlib/qbenchmarkperfevents.cpp b/src/testlib/qbenchmarkperfevents.cpp index c161879a7db..98224615f30 100644 --- a/src/testlib/qbenchmarkperfevents.cpp +++ b/src/testlib/qbenchmarkperfevents.cpp @@ -21,7 +21,7 @@ #include #include -#include "3rdparty/linux_perf_event_p.h" +#include "3rdparty/linux/perf_event_p.h" // for PERF_TYPE_HW_CACHE, the config is a bitmask // lowest 8 bits: cache type diff --git a/src/testlib/qbenchmarktimemeasurers_p.h b/src/testlib/qbenchmarktimemeasurers_p.h index 2f1364db02d..ce11a7dc6e8 100644 --- a/src/testlib/qbenchmarktimemeasurers_p.h +++ b/src/testlib/qbenchmarktimemeasurers_p.h @@ -34,7 +34,7 @@ private: QElapsedTimer time; }; -#ifdef HAVE_TICK_COUNTER // defined in 3rdparty/cycle_p.h +#ifdef HAVE_TICK_COUNTER // defined in 3rdparty/cycle/cycle_p.h class QBenchmarkTickMeasurer : public QBenchmarkMeasurerBase { diff --git a/src/testlib/qbenchmarkvalgrind.cpp b/src/testlib/qbenchmarkvalgrind.cpp index bea3066e66e..1663c5d28d2 100644 --- a/src/testlib/qbenchmarkvalgrind.cpp +++ b/src/testlib/qbenchmarkvalgrind.cpp @@ -10,7 +10,7 @@ #include #include #include -#include +#include "3rdparty/valgrind/callgrind_p.h" #include #include