summaryrefslogtreecommitdiffstats
path: root/src/testlib/qbenchmarkperfevents.cpp
Commit message (Collapse)AuthorAgeFilesLines
* 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>