Skip to content

Changes

Summary

  1. ftrace: Properly parse comm (process name) even if it has spaces (details)
Commit 077f3acef1d032ea71774de44b0867886c35da4d by Matthew Khouzam
ftrace: Properly parse comm (process name) even if it has spaces

bug 579234

If a thread name has spaces the space is incorrectly interpreted as
a separator for key-value pairs, therefore ignoring the part after
the space,

When parsing fields look for the pattern "<key>=" and take as value
whatever string between the key pattern and the next key pattern,
ignoring trailing '[', ']' or ',' characters.

This under the assumption that the key does not contain spaces and
the value does not contain '='.

Added a unit test for this case.

Change-Id: I5836169e19156ebcb51f2c58bd6c6352df589cec
Signed-off-by: Fabrizio Iannetti <fabrizio.iannetti@gmail.com>
Reviewed-on: https://git.eclipse.org/r/c/tracecompass.incubator/org.eclipse.tracecompass.incubator/+/191818
Tested-by: Trace Compass Bot <tracecompass-bot@eclipse.org>
Tested-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-by: Hoang Thuan Pham <hoangpham.eclipse@gmail.com>
Reviewed-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
(cherry picked from commit cc3de14d41d5c6d97ac9c9c6f27dc44b490c60a6)
Reviewed-on: https://git.eclipse.org/r/c/tracecompass.incubator/org.eclipse.tracecompass.incubator/+/192135
Tested-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
The file was modified tracetypes/org.eclipse.tracecompass.incubator.ftrace.core.tests/src/org/eclipse/tracecompass/incubator/ftrace/core/tests/event/FtraceFieldTest.java
The file was modified tracetypes/org.eclipse.tracecompass.incubator.ftrace.core/src/org/eclipse/tracecompass/incubator/internal/ftrace/core/event/GenericFtraceField.java