diff options
Diffstat (limited to 'daemon/CapturedXML.cpp')
-rw-r--r-- | daemon/CapturedXML.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/daemon/CapturedXML.cpp b/daemon/CapturedXML.cpp index 30c4c44..cf79b72 100644 --- a/daemon/CapturedXML.cpp +++ b/daemon/CapturedXML.cpp | |||
@@ -1,16 +1,18 @@ | |||
1 | /** | 1 | /** |
2 | * Copyright (C) ARM Limited 2010-2013. All rights reserved. | 2 | * Copyright (C) ARM Limited 2010-2014. All rights reserved. |
3 | * | 3 | * |
4 | * This program is free software; you can redistribute it and/or modify | 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 | 5 | * it under the terms of the GNU General Public License version 2 as |
6 | * published by the Free Software Foundation. | 6 | * published by the Free Software Foundation. |
7 | */ | 7 | */ |
8 | 8 | ||
9 | #include "CapturedXML.h" | ||
10 | |||
9 | #include <stdlib.h> | 11 | #include <stdlib.h> |
10 | #include <string.h> | 12 | #include <string.h> |
11 | #include <dirent.h> | 13 | #include <dirent.h> |
14 | |||
12 | #include "SessionData.h" | 15 | #include "SessionData.h" |
13 | #include "CapturedXML.h" | ||
14 | #include "Logging.h" | 16 | #include "Logging.h" |
15 | #include "OlyUtility.h" | 17 | #include "OlyUtility.h" |
16 | 18 | ||
@@ -30,6 +32,9 @@ mxml_node_t* CapturedXML::getTree(bool includeTime) { | |||
30 | 32 | ||
31 | captured = mxmlNewElement(xml, "captured"); | 33 | captured = mxmlNewElement(xml, "captured"); |
32 | mxmlElementSetAttr(captured, "version", "1"); | 34 | mxmlElementSetAttr(captured, "version", "1"); |
35 | if (gSessionData->perf.isSetup()) { | ||
36 | mxmlElementSetAttr(captured, "type", "Perf"); | ||
37 | } | ||
33 | mxmlElementSetAttrf(captured, "protocol", "%d", PROTOCOL_VERSION); | 38 | mxmlElementSetAttrf(captured, "protocol", "%d", PROTOCOL_VERSION); |
34 | if (includeTime) { // Send the following only after the capture is complete | 39 | if (includeTime) { // Send the following only after the capture is complete |
35 | if (time(NULL) > 1267000000) { // If the time is reasonable (after Feb 23, 2010) | 40 | if (time(NULL) > 1267000000) { // If the time is reasonable (after Feb 23, 2010) |
@@ -41,7 +46,7 @@ mxml_node_t* CapturedXML::getTree(bool includeTime) { | |||
41 | mxmlElementSetAttr(target, "name", gSessionData->mCoreName); | 46 | mxmlElementSetAttr(target, "name", gSessionData->mCoreName); |
42 | mxmlElementSetAttrf(target, "sample_rate", "%d", gSessionData->mSampleRate); | 47 | mxmlElementSetAttrf(target, "sample_rate", "%d", gSessionData->mSampleRate); |
43 | mxmlElementSetAttrf(target, "cores", "%d", gSessionData->mCores); | 48 | mxmlElementSetAttrf(target, "cores", "%d", gSessionData->mCores); |
44 | mxmlElementSetAttrf(target, "cpuid", "0x%x", gSessionData->mCpuId); | 49 | mxmlElementSetAttrf(target, "cpuid", "0x%x", gSessionData->mMaxCpuId); |
45 | 50 | ||
46 | if (!gSessionData->mOneShot && (gSessionData->mSampleRate > 0)) { | 51 | if (!gSessionData->mOneShot && (gSessionData->mSampleRate > 0)) { |
47 | mxmlElementSetAttr(target, "supports_live", "yes"); | 52 | mxmlElementSetAttr(target, "supports_live", "yes"); |