tmf: lttngControl: fix: way to retrieve probe and function information
authorJonathan Rajotte Julien <jonathan.rajotte-julien@ericsson.com>
Thu, 28 Aug 2014 20:48:23 +0000 (16:48 -0400)
committerBernd Hufmann <bernd.hufmann@ericsson.com>
Fri, 10 Oct 2014 18:44:40 +0000 (14:44 -0400)
Change-Id: Ie47ac49b58de165397be92b23161f90faf43772d
Signed-off-by: Jonathan Rajotte Julien <jonathan.rajotte-julien@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/32440
Tested-by: Hudson CI
Reviewed-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im>
Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
Tested-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
org.eclipse.linuxtools.lttng2.control.core/src/org/eclipse/linuxtools/internal/lttng2/control/core/model/impl/ProbeEventInfo.java
org.eclipse.linuxtools.lttng2.control.ui/src/org/eclipse/linuxtools/internal/lttng2/control/ui/views/service/LTTngControlServiceMI.java

index 357c509f4a252bf929f3bc8bd6d2d6f5fb3e7d58..69068ee8c9a974cc45109b1a5d9449e0ae8eaf1a 100644 (file)
@@ -78,6 +78,7 @@ public class ProbeEventInfo extends EventInfo implements IProbeEventInfo {
         setLogLevelType(eventInfo.getLogLevelType());
         setLogLevel(eventInfo.getLogLevel());
         setFilterExpression(eventInfo.getFilterExpression());
+        setEventType(eventInfo.getEventType());
     }
 
     // ------------------------------------------------------------------------
index 9fb3ea9751368be04b044a5a306e55f594f203e5..8bb18a5613f555799318c5b0700818a52d0fdf07 100644 (file)
@@ -14,6 +14,7 @@ package org.eclipse.linuxtools.internal.lttng2.control.ui.views.service;
 
 import java.io.IOException;
 import java.io.StringReader;
+import java.math.BigInteger;
 import java.net.URL;
 import java.util.ArrayList;
 import java.util.List;
@@ -835,20 +836,19 @@ public class LTTngControlServiceMI extends LTTngControlService {
                 if (isProbeFunction) {
                     IProbeEventInfo probeEvent = new ProbeEventInfo(eventInfo);
                     eventInfo = probeEvent;
-                    // get attributes
-                    Node rawAttributes = getFirstOf(rawInfos, MIStrings.ATTRIBUTES);
-                    if (rawAttributes == null) {
-                        throw new ExecutionException(Messages.TraceControl_MiMissingRequiredError);
-                    }
 
                     Node rawDataNode = null;
                     switch (probeEvent.getEventType()) {
-                    case PROBE:
-                        rawDataNode = getFirstOf(rawAttributes.getChildNodes(), MIStrings.PROBE_ATTRIBUTES);
-                        break;
                     case FUNCTION:
-                        rawDataNode = getFirstOf(rawAttributes.getChildNodes(), MIStrings.FUNCTION_ATTRIBUTES);
+                    case PROBE: {
+                        // get attributes
+                        Node rawAttributes = getFirstOf(rawInfos, MIStrings.ATTRIBUTES);
+                        if (rawAttributes == null) {
+                            throw new ExecutionException(Messages.TraceControl_MiMissingRequiredError);
+                        }
+                        rawDataNode = getFirstOf(rawAttributes.getChildNodes(), MIStrings.PROBE_ATTRIBUTES);
                         break;
+                    }
                     case SYSCALL:
                     case TRACEPOINT:
                     case UNKNOWN:
@@ -869,10 +869,10 @@ public class LTTngControlServiceMI extends LTTngControlService {
                             probeEvent.setSymbol(rawData.getTextContent());
                             break;
                         case MIStrings.ADDRESS:
-                            probeEvent.setAddress(rawData.getTextContent());
+                            probeEvent.setAddress(String.format("%#016x", new BigInteger(rawData.getTextContent()))); //$NON-NLS-1$
                             break;
                         case MIStrings.OFFSET:
-                            probeEvent.setOffset(rawData.getTextContent());
+                            probeEvent.setOffset(String.format("%#016x", new BigInteger(rawData.getTextContent()))); //$NON-NLS-1$
                             break;
                         default:
                             break;
This page took 0.026333 seconds and 5 git commands to generate.