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 8
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 *images;
34 char* configurationXMLPath;
35 char* target_path;
36 char* apcDir;
37 char* title;
39 bool mWaitingOnCommand;
40 bool mSessionIsActive;
41 bool mLocalCapture;
42 bool mOneShot; // halt processing of the driver data until profiling is complete or the buffer is filled
44 int mBacktraceDepth;
45 int mTotalBufferSize; // approximate number of MB to use for the entire collection buffer, the actual amount is a multiple based on a buffer size retrieved from the driver
46 int mSampleRate;
47 int mDuration;
48 int mCores;
49 int mBytes;
51 // PMU Counters
52 char mPerfCounterType[MAX_PERFORMANCE_COUNTERS][MAX_STRING_LEN];
53 char mPerfCounterTitle[MAX_PERFORMANCE_COUNTERS][MAX_STRING_LEN];
54 char mPerfCounterName[MAX_PERFORMANCE_COUNTERS][MAX_STRING_LEN];
55 char mPerfCounterDescription[MAX_PERFORMANCE_COUNTERS][MAX_DESCRIPTION_LEN];
56 int mPerfCounterEnabled[MAX_PERFORMANCE_COUNTERS];
57 int mPerfCounterEvent[MAX_PERFORMANCE_COUNTERS];
58 int mPerfCounterColor[MAX_PERFORMANCE_COUNTERS];
59 int mPerfCounterCount[MAX_PERFORMANCE_COUNTERS];
60 int mPerfCounterKey[MAX_PERFORMANCE_COUNTERS];
61 bool mPerfCounterPerCPU[MAX_PERFORMANCE_COUNTERS];
62 bool mPerfCounterEBSCapable[MAX_PERFORMANCE_COUNTERS];
63 char mPerfCounterOperation[MAX_PERFORMANCE_COUNTERS][MAX_STRING_LEN];
64 };
66 extern SessionData* gSessionData;
68 #endif // SESSION_DATA_H