From 8e4bff4cab0ddac6060645b0715210484d02ff40 Mon Sep 17 00:00:00 2001 From: Yuval Adam <_@yuv.al> Date: Wed, 30 Aug 2017 08:25:59 +0000 Subject: Initial file dump from open source release --- tools/gator/daemon/ExternalSource.h | 53 +++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 tools/gator/daemon/ExternalSource.h (limited to 'tools/gator/daemon/ExternalSource.h') diff --git a/tools/gator/daemon/ExternalSource.h b/tools/gator/daemon/ExternalSource.h new file mode 100644 index 00000000..919e75e8 --- /dev/null +++ b/tools/gator/daemon/ExternalSource.h @@ -0,0 +1,53 @@ +/** + * Copyright (C) ARM Limited 2010-2014. All rights reserved. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + */ + +#ifndef EXTERNALSOURCE_H +#define EXTERNALSOURCE_H + +#include + +#include "Buffer.h" +#include "Monitor.h" +#include "OlySocket.h" +#include "Source.h" + +// Counters from external sources like graphics drivers and annotations +class ExternalSource : public Source { +public: + ExternalSource(sem_t *senderSem); + ~ExternalSource(); + + bool prepare(); + void run(); + void interrupt(); + + bool isDone(); + void write(Sender *sender); + +private: + void waitFor(const int bytes); + void configureConnection(const int fd, const char *const handshake, size_t size); + bool connectMali(); + bool connectMve(); + + sem_t mBufferSem; + Buffer mBuffer; + Monitor mMonitor; + OlyServerSocket mMveStartupUds; + OlyServerSocket mMaliStartupUds; + OlyServerSocket mAnnotate; + int mInterruptFd; + int mMaliUds; + int mMveUds; + + // Intentionally unimplemented + ExternalSource(const ExternalSource &); + ExternalSource &operator=(const ExternalSource &); +}; + +#endif // EXTERNALSOURCE_H -- cgit v1.3.1