1 /**
2 * Copyright (C) ARM Limited 2010-2012. All rights reserved.
3 *
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.
7 */
9 #ifndef SESSION_DATA_H
10 #define SESSION_DATA_H
12 #define MAX_PERFORMANCE_COUNTERS 50
13 #define MAX_STRING_LEN 80
14 #define MAX_DESCRIPTION_LEN 400
16 #define PROTOCOL_VERSION 10
17 #define PROTOCOL_DEV 1000 // Differentiates development versions (timestamp) from release versions
19 struct ImageLinkList {
20 char* path;
21 struct ImageLinkList *next;
22 };
24 class SessionData {
25 public:
26 SessionData();
27 ~SessionData();
28 void initialize();
29 void initializeCounters();
30 void parseSessionXML(char* xmlString);
32 char mCoreName[MAX_STRING_LEN];
33 struct ImageLinkList *mImages;
34 char* mConfigurationXMLPath;
35 char* mSessionXMLPath;
36 char* mEventsXMLPath;
37 char* mTargetPath;
38 char* mAPCDir;
39 char* mTitle;
41 bool mWaitingOnCommand;
42 bool mSessionIsActive;
43 bool mLocalCapture;
44 bool mOneShot; // halt processing of the driver data until profiling is complete or the buffer is filled
46 int mBacktraceDepth;
47 int mTotalBufferSize; // number of MB to use for the entire collection buffer
48 int mSampleRate;
49 int mDuration;
50 int mCores;
51 int mBytes;
53 // PMU Counters
54 char mPerfCounterType[MAX_PERFORMANCE_COUNTERS][MAX_STRING_LEN];
55 char mPerfCounterTitle[MAX_PERFORMANCE_COUNTERS][MAX_STRING_LEN];
56 char mPerfCounterName[MAX_PERFORMANCE_COUNTERS][MAX_STRING_LEN];
57 char mPerfCounterDescription[MAX_PERFORMANCE_COUNTERS][MAX_DESCRIPTION_LEN];
58 char mPerfCounterOperation[MAX_PERFORMANCE_COUNTERS][MAX_STRING_LEN];
59 char mPerfCounterAlias[MAX_PERFORMANCE_COUNTERS][MAX_STRING_LEN];
60 char mPerfCounterDisplay[MAX_PERFORMANCE_COUNTERS][MAX_STRING_LEN];
61 char mPerfCounterUnits[MAX_PERFORMANCE_COUNTERS][MAX_STRING_LEN];
62 int mPerfCounterEnabled[MAX_PERFORMANCE_COUNTERS];
63 int mPerfCounterEvent[MAX_PERFORMANCE_COUNTERS];
64 int mPerfCounterColor[MAX_PERFORMANCE_COUNTERS];
65 int mPerfCounterCount[MAX_PERFORMANCE_COUNTERS];
66 int mPerfCounterKey[MAX_PERFORMANCE_COUNTERS];
67 bool mPerfCounterPerCPU[MAX_PERFORMANCE_COUNTERS];
68 bool mPerfCounterEBSCapable[MAX_PERFORMANCE_COUNTERS];
69 bool mPerfCounterLevel[MAX_PERFORMANCE_COUNTERS];
70 bool mPerfCounterAverageSelection[MAX_PERFORMANCE_COUNTERS];
71 };
73 extern SessionData* gSessionData;
75 #endif // SESSION_DATA_H