aboutsummaryrefslogtreecommitdiff
path: root/daemon/FtraceSource.h
diff options
context:
space:
mode:
authorDrew Richardson <drew.richardson@arm.com>2014-10-22 12:00:00 -0700
committerDrew Richardson <drew.richardson@arm.com>2014-12-19 15:59:12 -0800
commitecc3d86ea62f7be7defa303d1d14b8506ec63e75 (patch)
tree4a0c3fb31869e2eca869f3eb2d35c6d1391ecd68 /daemon/FtraceSource.h
parent6a98fbff8b9f8a23045efdea51784b479cefac7f (diff)
gator: Version 5.205.20
Signed-off-by: Drew Richardson <drew.richardson@arm.com>
Diffstat (limited to 'daemon/FtraceSource.h')
-rw-r--r--daemon/FtraceSource.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/daemon/FtraceSource.h b/daemon/FtraceSource.h
new file mode 100644
index 0000000..2391b88
--- /dev/null
+++ b/daemon/FtraceSource.h
@@ -0,0 +1,43 @@
+/**
+ * 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 FTRACESOURCE_H
+#define FTRACESOURCE_H
+
+#include <semaphore.h>
+#include <stdio.h>
+
+#include "Buffer.h"
+#include "Source.h"
+
+class FtraceSource : public Source {
+public:
+ FtraceSource(sem_t *senderSem);
+ ~FtraceSource();
+
+ bool prepare();
+ void run();
+ void interrupt();
+
+ bool isDone();
+ void write(Sender *sender);
+
+private:
+ void waitFor(const int bytes);
+
+ FILE *mFtraceFh;
+ Buffer mBuffer;
+ int mTid;
+ int mTracingOn;
+
+ // Intentionally unimplemented
+ FtraceSource(const FtraceSource &);
+ FtraceSource &operator=(const FtraceSource &);
+};
+
+#endif // FTRACESOURCE_H