2 * Copyright (C) ARM Limited 2010-2014. All rights reserved.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
10 #define SESSION_DATA_H
14 #include "AnnotateListener.h"
17 #include "FtraceDriver.h"
19 #include "MaliVideoDriver.h"
20 #include "PerfDriver.h"
22 #define PROTOCOL_VERSION 20
23 // Differentiates development versions (timestamp) from release versions
24 #define PROTOCOL_DEV 1000
26 #define NS_PER_S 1000000000LL
27 #define NS_PER_MS 1000000LL
28 #define NS_PER_US 1000LL
30 struct ImageLinkList {
32 struct ImageLinkList *next;
37 static const size_t MAX_STRING_LEN = 80;
42 void parseSessionXML(char* xmlString);
46 PolledDriver *usDrivers[6];
49 MaliVideoDriver maliVideo;
50 FtraceDriver ftraceDriver;
51 AnnotateListener annotateListener;
53 char mCoreName[MAX_STRING_LEN];
54 struct ImageLinkList *mImages;
55 char *mConfigurationXMLPath;
56 char *mSessionXMLPath;
60 char *mCaptureWorkingDir;
61 char *mCaptureCommand;
64 bool mWaitingOnCommand;
65 bool mSessionIsActive;
67 // halt processing of the driver data until profiling is complete or the buffer is filled
73 int64_t mMonotonicStarted;
75 // number of MB to use for the entire collection buffer
87 Counter mCounters[MAX_PERFORMANCE_COUNTERS];
90 // Intentionally unimplemented
91 SessionData(const SessionData &);
92 SessionData &operator=(const SessionData &);
95 extern SessionData* gSessionData;
99 int pipe_cloexec(int pipefd[2]);
100 FILE *fopen_cloexec(const char *path, const char *mode);
102 #endif // SESSION_DATA_H