diff options
author | Camilo Bernal | 2013-03-06 19:40:06 +0000 |
---|---|---|
committer | Roland Grunberg | 2013-03-07 15:56:28 +0000 |
commit | 559a9fede192a24e56bf4b9f99d69f67857f6081 (patch) | |
tree | 285ff30aa9690872c3fd13700eaa29405bbb4e62 /perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/StatData.java | |
parent | 3305e4f915ecba324dc901a24eca20a59d4b9c67 (diff) | |
download | org.eclipse.linuxtools-559a9fede192a24e56bf4b9f99d69f67857f6081.tar.gz org.eclipse.linuxtools-559a9fede192a24e56bf4b9f99d69f67857f6081.tar.xz org.eclipse.linuxtools-559a9fede192a24e56bf4b9f99d69f67857f6081.zip |
Support events selection for perf stat.
* Added events field to StatData.
* Added test for events parsing.
* The perf stat functionality does not depend on perf report/record/
annotate, so there's no need to run these during a stat run.
* Disable options not related to perf stat accordingly.
Change-Id: I28b767046be016851843b8d1e42e7977c5404fa9
Reviewed-on: https://git.eclipse.org/r/10903
Tested-by: Hudson CI
Reviewed-by: Roland Grunberg <rgrunber@redhat.com>
IP-Clean: Roland Grunberg <rgrunber@redhat.com>
Tested-by: Roland Grunberg <rgrunber@redhat.com>
Diffstat (limited to 'perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/StatData.java')
-rw-r--r-- | perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/StatData.java | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/StatData.java b/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/StatData.java index a43747d3be..64bbf44048 100644 --- a/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/StatData.java +++ b/perf/org.eclipse.linuxtools.perf/src/org/eclipse/linuxtools/internal/perf/StatData.java @@ -23,12 +23,14 @@ public class StatData extends AbstractDataManipulator { private String prog; private String [] args; private int runCount; + private String [] events; - public StatData(String title, String prog, String [] args, int runCount) { + public StatData(String title, String prog, String [] args, int runCount, String[] events) { super(title); this.prog = prog; this.args = args; this.runCount = runCount; + this.events = events; } @Override @@ -45,6 +47,12 @@ public class StatData extends AbstractDataManipulator { ret.add("-r"); //$NON-NLS-1$ ret.add(String.valueOf(runCount)); } + if (events != null) { + for (String event : events) { + ret.add("-e"); //$NON-NLS-1$ + ret.add(event); + } + } ret.add(prog); ret.addAll(Arrays.asList(args)); return ret.toArray(new String [0]); |