summaryrefslogtreecommitdiffstats
path: root/src/testlib/qbenchmarkperfevents.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QTestLib: Introduce nullptrFriedemann Kleint2019-07-111-1/+1
| | | | | | | | Apply Fixits by Qt Creator with some amendments. Task-number: QTBUG-69413 Change-Id: I620e40a277dc2b20b0ec26fc32577e66b0456bb3 Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* QTestLib: Use member initializationFriedemann Kleint2019-07-111-4/+1
| | | | | | | | Apply Fixits by Qt Creator with some amendments. Task-number: QTBUG-69413 Change-Id: Iba0834dc89cbfc215acc5873f31fa6eeed74177d Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
* doc: Fix remaining clang parsing errors in QtTestMartin Smith2018-01-181-1/+3
| | | | | | | | This update also corrects all the remaining qdoc warnings in the mnodule. Change-Id: I1cea2cb1dd515d075a1e49a52ca78fc407c3a324 Reviewed-by: Topi Reiniƶ <topi.reinio@qt.io>
* Enable support for ref-cycles perf counter in QtTestLib.Milian Wolff2016-03-031-3/+6
| | | | | | | | | | | | The ref-cycles counter corresponds to the monotonic timestamp counter that can be read using the RDTSC assembler instruction. Using it instead of the default cycles counter is useful as it removes the effect of dynamic frequency scaling on the measurement. [ChangeLog][QtTest] The ref-cycles perf counter can now be used. Change-Id: Id7d56576db362706c20f9a399e5acea35ee799f2 Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
* Updated license headersJani Heikkinen2016-01-211-1/+1
| | | | | | | | | | | | | From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some exceptions, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one (in those files which will be under GPL 3 with exceptions) Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Updated license headersJani Heikkinen2016-01-151-13/+19
| | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-6/+6
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-18/+10
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Fix file descriptor leak in the perf event counterThiago Macieira2014-01-101-9/+11
| | | | | | | | | | | We opened the counter at every start(), even if we had already started before. Some of the benchlib's options caused it to start() and stop() over and over again, like -minimumvalue and -minimumtotal, which could leak to fd exhaustion (EMFILE). Change-Id: Ifeb7cca65c758877be600dc22928bea74f499934 Reviewed-by: Robin Burchell <robin+qt@viroteck.net> Reviewed-by: Jason McDonald <macadder1@gmail.com>
* Fix compilation of QtTest on Linux systems with old kernel headersThiago Macieira2013-07-211-0/+10
| | | | | | | | | | | | Hardcode our perf_event_open(2) function to simply return -1 and set errno to ENOSYS. This will disable the functionality. People compiling Qt with such old headers will probably carry quite a bit of dead code in QtTest. They should upgrade. Task-number: QTBUG-32507 Change-Id: I774b4a81bee5c3e2ddc75fa52520d123a6bebed9 Reviewed-by: Jason McDonald <macadder1@gmail.com>
* Add support for attributes in the -perfcounter argumentThiago Macieira2013-03-061-1/+38
| | | | | | | | | Five attributes are supported, matching what the perf(1) tool supports. The 'p' attribute (precise IP reporting) wasn't added because we don't do assembly-level debugging with benchlib. Change-Id: I726f735a5bcc0c97e62cde0fbe0843597068ad7c Reviewed-by: Jason McDonald <macadder1@gmail.com>
* Store the performance counter attributes globallyThiago Macieira2013-03-061-22/+27
| | | | | | | This will allow us to modify more attributes from the command-line Change-Id: I84d4933cbfa2b69c4e1009eaf3e005cfc3e7e01c Reviewed-by: Jason McDonald <macadder1@gmail.com>
* Add support for the cache-related operations counters in benchlibThiago Macieira2013-03-061-23/+180
| | | | | | | | | | | | This adds support for checking cache accesses and misses, per operation (read, write and prefetch) as well as per cache level (L1 for data, L1 for instructions, last level). The branch prediction unit (BPU) is also accessed via the cache monitor subsystem. Change-Id: I8fa96b141cc777c9d231bd57fa36bca33ae7bdfd Reviewed-by: Jason McDonald <macadder1@gmail.com>
* Add support for more performance counters in QBenchlibThiago Macieira2013-03-061-8/+198
| | | | | | | | | | | | | Added support for most hardware and software counters available on Linux 3.3. The cache-based counters are missing because they need special handling. Also added an option that lists available counters. Note that the list is of counters the library knows about, not the counters that the hardware can measure. Change-Id: I9f6fb09b5460bf4ac6082081611c1d6ff806a3fa Reviewed-by: Jason McDonald <macadder1@gmail.com>
* Add more events for QBenchlib, based on the Linux perf countersThiago Macieira2013-03-061-1/+1
| | | | | Change-Id: Ic7e7e122bfe3995eb7ea033c744fd501579ea8fa Reviewed-by: Jason McDonald <macadder1@gmail.com>
* Implement the Linux Perf Counter backend for benchlibThiago Macieira2013-03-061-1/+104
| | | | | | | | | | | | | | | | Currently, we only support one event type: counting CPU cycles with hardware counters. There are no fallbacks if this hardware counter is not available, and there is currently no way to specify other counters. Benchlib only supports reporting one event per benchmark, even though the event counter interface allows specifying more than one. Still, the hardware usually has limitations on how many events it can monitor at a time, and we'd prefer to have the counter running at 100% of the time, so this will not change. Change-Id: I79858a3ad1e696dc4b7b72c420e5a04b67cd55de Reviewed-by: Jason McDonald <macadder1@gmail.com>
* Add the skeleton Linux perf events counter for QtTestThiago Macieira2013-03-061-0/+115
Currently, it only prints "perf available" if you use the -perf option and perf is available. The implementation comes in the next commits. Change-Id: Ic6cdee70e21df25780799a4bc31ca2c2d923b9f8 Reviewed-by: Jason McDonald <macadder1@gmail.com>