aboutsummaryrefslogtreecommitdiff
path: root/tests/framework
diff options
context:
space:
mode:
authorMoritz Pflanzer <moritz.pflanzer@arm.com>2017-09-21 15:06:59 +0100
committerAnthony Barbier <anthony.barbier@arm.com>2018-11-02 16:35:24 +0000
commit29088d517a2a9f249fe5cc851e0c97de3d4cc917 (patch)
tree49eb4dd1b7161e70a54d6f47c14af6a069c75ff0 /tests/framework
parent9688378ce14f0c2663a27b2c879ed1928247a08e (diff)
downloadComputeLibrary-29088d517a2a9f249fe5cc851e0c97de3d4cc917.tar.gz
COMPMID-417: Fix PMU/Mali counters for Android builds
Change-Id: I738cfb7cc799e0b05b5819663c373666a9da4597 Reviewed-on: http://mpd-gerrit.cambridge.arm.com/88644 Reviewed-by: Georgios Pinitas <georgios.pinitas@arm.com> Tested-by: Kaizen <jeremy.johnson+kaizengerrit@arm.com>
Diffstat (limited to 'tests/framework')
-rw-r--r--tests/framework/instruments/MaliCounter.cpp6
-rw-r--r--tests/framework/instruments/PMU.h1
2 files changed, 4 insertions, 3 deletions
diff --git a/tests/framework/instruments/MaliCounter.cpp b/tests/framework/instruments/MaliCounter.cpp
index bf73fec84f..887846e88c 100644
--- a/tests/framework/instruments/MaliCounter.cpp
+++ b/tests/framework/instruments/MaliCounter.cpp
@@ -202,12 +202,12 @@ void MaliCounter::init()
}
}
- if(ioctl(_hwc_fd, mali_userspace::KBASE_HWCNT_READER_GET_BUFFER_SIZE, &_buffer_size) != 0) // NOLINT
+ if(ioctl(_hwc_fd, static_cast<int>(mali_userspace::KBASE_HWCNT_READER_GET_BUFFER_SIZE), &_buffer_size) != 0) // NOLINT
{
throw std::runtime_error("Failed to get buffer size.");
}
- if(ioctl(_hwc_fd, mali_userspace::KBASE_HWCNT_READER_GET_HWVER, &_hw_ver) != 0) // NOLINT
+ if(ioctl(_hwc_fd, static_cast<int>(mali_userspace::KBASE_HWCNT_READER_GET_HWVER), &_hw_ver) != 0) // NOLINT
{
throw std::runtime_error("Could not determine HW version.");
}
@@ -300,7 +300,7 @@ void MaliCounter::wait_next_event()
{
mali_userspace::kbase_hwcnt_reader_metadata meta; // NOLINT
- if(ioctl(_hwc_fd, mali_userspace::KBASE_HWCNT_READER_GET_BUFFER, &meta) != 0) // NOLINT
+ if(ioctl(_hwc_fd, static_cast<int>(mali_userspace::KBASE_HWCNT_READER_GET_BUFFER), &meta) != 0) // NOLINT
{
throw std::runtime_error("Failed READER_GET_BUFFER.");
}
diff --git a/tests/framework/instruments/PMU.h b/tests/framework/instruments/PMU.h
index 571edb984d..d51b2f8ae1 100644
--- a/tests/framework/instruments/PMU.h
+++ b/tests/framework/instruments/PMU.h
@@ -29,6 +29,7 @@
#include <cstdint>
#include <linux/perf_event.h>
#include <stdexcept>
+#include <sys/syscall.h>
#include <unistd.h>
namespace arm_compute