summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorAndrew Ferrazzutti2013-09-20 14:16:31 (EDT)
committer Roland Grunberg2013-09-27 14:57:49 (EDT)
commit0fe6a0459f65cc3c4f355e3d0e37a8040799a4ab (patch)
treec90b1cfc54b1f26b610a9b1bf88261c36ba0df79
parent571435217e2037d5fcbcbe8cbb8799652dc1d17d (diff)
downloadorg.eclipse.linuxtools-0fe6a0459f65cc3c4f355e3d0e37a8040799a4ab.zip
org.eclipse.linuxtools-0fe6a0459f65cc3c4f355e3d0e37a8040799a4ab.tar.gz
org.eclipse.linuxtools-0fe6a0459f65cc3c4f355e3d0e37a8040799a4ab.tar.bz2
Systemtap: perform line-by-line graph parsing.refs/changes/55/16655/4
Modify parsers so that the regex input in the Run Configurations-> Graphing menu must match an entire line of output (rather than a portion of it) for it to capture data to graph. Change-Id: I0faba1a31abdb47bedc377f9968e6a9759703d3e Signed-off-by: Andrew Ferrazzutti <aferrazz@redhat.com> Reviewed-on: https://git.eclipse.org/r/16655 Reviewed-by: Roland Grunberg <rgrunber@redhat.com> IP-Clean: Roland Grunberg <rgrunber@redhat.com> Tested-by: Roland Grunberg <rgrunber@redhat.com>
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core/src/org/eclipse/linuxtools/systemtap/graphingapi/core/datasets/row/LineParser.java5
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/launcher/SystemTapScriptGraphOptionsTab.java2
2 files changed, 4 insertions, 3 deletions
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core/src/org/eclipse/linuxtools/systemtap/graphingapi/core/datasets/row/LineParser.java b/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core/src/org/eclipse/linuxtools/systemtap/graphingapi/core/datasets/row/LineParser.java
index c8b82a9..8f9554b 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core/src/org/eclipse/linuxtools/systemtap/graphingapi/core/datasets/row/LineParser.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.core/src/org/eclipse/linuxtools/systemtap/graphingapi/core/datasets/row/LineParser.java
@@ -18,7 +18,8 @@ import org.eclipse.linuxtools.systemtap.graphingapi.core.datasets.IDataEntry;
import org.eclipse.linuxtools.systemtap.graphingapi.core.datasets.IDataSetParser;
/**
- * A DataSetParser for parsing a preconstructed single-line regex string.
+ * A DataSetParser for parsing a string, line-by-line, with a preconstructed
+ * single-line regex string.
*
* @author aferrazz
* @since 1.1
@@ -26,7 +27,7 @@ import org.eclipse.linuxtools.systemtap.graphingapi.core.datasets.IDataSetParser
*/
public class LineParser implements IDataSetParser {
public LineParser(String regEx) {
- wholePattern = Pattern.compile(regEx);
+ wholePattern = Pattern.compile(regEx, Pattern.MULTILINE);
}
@Override
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/launcher/SystemTapScriptGraphOptionsTab.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/launcher/SystemTapScriptGraphOptionsTab.java
index 985292d..668af49 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/launcher/SystemTapScriptGraphOptionsTab.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/launcher/SystemTapScriptGraphOptionsTab.java
@@ -109,7 +109,7 @@ public class SystemTapScriptGraphOptionsTab extends
public static IDataSetParser createDatasetParser(ILaunchConfiguration configuration) {
try {
- return new LineParser(configuration.getAttribute(REGULARE_EXPRESSION, "").concat("\\n")); //$NON-NLS-1$ //$NON-NLS-2$
+ return new LineParser("^" + configuration.getAttribute(REGULARE_EXPRESSION, "") + "$"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
} catch (CoreException e) {
ExceptionErrorDialog.openError(Messages.SystemTapScriptGraphOptionsTab_0, e);
}