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/PerfSource.h | 55 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 tools/gator/daemon/PerfSource.h (limited to 'tools/gator/daemon/PerfSource.h') diff --git a/tools/gator/daemon/PerfSource.h b/tools/gator/daemon/PerfSource.h new file mode 100644 index 00000000..ce1eafe8 --- /dev/null +++ b/tools/gator/daemon/PerfSource.h @@ -0,0 +1,55 @@ +/** + * 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 PERFSOURCE_H +#define PERFSOURCE_H + +#include + +#include "Buffer.h" +#include "Monitor.h" +#include "PerfBuffer.h" +#include "PerfGroup.h" +#include "Source.h" +#include "UEvent.h" + +class Sender; + +class PerfSource : public Source { +public: + PerfSource(sem_t *senderSem, sem_t *startProfile); + ~PerfSource(); + + bool prepare(); + void run(); + void interrupt(); + + bool isDone(); + void write(Sender *sender); + +private: + bool handleUEvent(const uint64_t currTime); + + Buffer mSummary; + Buffer mBuffer; + PerfBuffer mCountersBuf; + PerfGroup mCountersGroup; + PerfGroup mIdleGroup; + Monitor mMonitor; + UEvent mUEvent; + sem_t *const mSenderSem; + sem_t *const mStartProfile; + int mInterruptFd; + bool mIsDone; + + // Intentionally undefined + PerfSource(const PerfSource &); + PerfSource &operator=(const PerfSource &); +}; + +#endif // PERFSOURCE_H -- cgit v1.3.1