diff options
author | Drew Richardson <drew.richardson@arm.com> | 2014-07-16 12:00:00 -0700 |
---|---|---|
committer | Drew Richardson <drew.richardson@arm.com> | 2014-12-19 15:54:51 -0800 |
commit | 8b39b6c50a01bcfa280151b43079dab428cbab45 (patch) | |
tree | 66294093e2cd51c0df7afa6d119ec78f65274515 /daemon/CapturedXML.cpp | |
parent | 020278c1a682ea75ddb63fe4e0d373116935199f (diff) |
gator: Version 5.195.19
Signed-off-by: Drew Richardson <drew.richardson@arm.com>
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 cf79b72..4a11415 100644 --- a/daemon/CapturedXML.cpp +++ b/daemon/CapturedXML.cpp @@ -33,7 +33,7 @@ mxml_node_t* CapturedXML::getTree(bool includeTime) { captured = mxmlNewElement(xml, "captured"); mxmlElementSetAttr(captured, "version", "1"); if (gSessionData->perf.isSetup()) { - mxmlElementSetAttr(captured, "type", "Perf"); + mxmlElementSetAttr(captured, "type", "Perf"); } mxmlElementSetAttrf(captured, "protocol", "%d", PROTOCOL_VERSION); if (includeTime) { // Send the following only after the capture is complete @@ -66,10 +66,15 @@ mxml_node_t* CapturedXML::getTree(bool includeTime) { mxml_node_t *const node = mxmlNewElement(counters, "counter"); mxmlElementSetAttrf(node, "key", "0x%x", counter.getKey()); mxmlElementSetAttr(node, "type", counter.getType()); - mxmlElementSetAttrf(node, "event", "0x%x", counter.getEvent()); + if (counter.getEvent() != -1) { + mxmlElementSetAttrf(node, "event", "0x%x", counter.getEvent()); + } if (counter.getCount() > 0) { mxmlElementSetAttrf(node, "count", "%d", counter.getCount()); } + if (counter.getCores() > 0) { + mxmlElementSetAttrf(node, "cores", "%d", counter.getCores()); + } } } @@ -89,7 +94,7 @@ void CapturedXML::write(char* path) { // Set full path snprintf(file, PATH_MAX, "%s/captured.xml", path); - + char* xml = getXML(true); if (util->writeToDisk(file, xml) < 0) { logg->logError(__FILE__, __LINE__, "Error writing %s\nPlease verify the path.", file); |