analysis: Fix storing of fields of system call latency analysis
authorBernd Hufmann <Bernd.Hufmann@ericsson.com>
Fri, 29 Apr 2016 14:13:53 +0000 (10:13 -0400)
committerBernd Hufmann <bernd.hufmann@ericsson.com>
Mon, 2 May 2016 19:15:56 +0000 (15:15 -0400)
Right now all fields stored as map fieldName -> field value using
the toString() method on the field value (field.getValue().toString)
However, this cause a problem when the type the value is an object
other than string or a primitive type (e.g. long[]). This patches
changes this to uses field.toString() which creates a formatted string
of the value.

Change-Id: I6ff61eb70d7a7bb958b77797c3271c61cc430eef
Signed-off-by: Bernd Hufmann <Bernd.Hufmann@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/71698
Reviewed-by: Hudson CI
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/analysis/os/linux/core/latency/SystemCallLatencyAnalysis.java

index 5a4d3934802809663839b2a443d1996ddbfcf8cb..67ee8795d81781455f083e3f979251be2195c51e 100644 (file)
@@ -111,7 +111,7 @@ public class SystemCallLatencyAnalysis extends AbstractSegmentStoreAnalysisEvent
 
                 Map<String, String> args = event.getContent().getFieldNames().stream()
                     .collect(Collectors.toMap(Function.identity(),
-                            input -> checkNotNull(event.getContent().getField(input).getValue().toString())));
+                            input -> checkNotNull(event.getContent().getField(input).toString())));
 
                 SystemCall.InitialInfo newSysCall = new SystemCall.InitialInfo(startTime, checkNotNull(syscallName), checkNotNull(args));
                 fOngoingSystemCalls.put(tid, newSysCall);
This page took 0.028347 seconds and 5 git commands to generate.