Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Ferrazzutti2014-02-21 23:12:01 +0000
committerSami Wagiaalla2014-02-26 16:15:36 +0000
commitd6b36055ee5f8d0f816f71580f00af60658a12ff (patch)
treead03b3a668b89bbfed8bdd52173d7d1acade1f13 /systemtap
parent707c5157f35c438ba5e499d92a92083f07c77efd (diff)
downloadorg.eclipse.linuxtools-d6b36055ee5f8d0f816f71580f00af60658a12ff.tar.gz
org.eclipse.linuxtools-d6b36055ee5f8d0f816f71580f00af60658a12ff.tar.xz
org.eclipse.linuxtools-d6b36055ee5f8d0f816f71580f00af60658a12ff.zip
Systemtap: Forbid negative pie chart slices.
Change-Id: I19433e720e0113f9ab6d99f5f8f0e26d859aa1cb Signed-off-by: Andrew Ferrazzutti <aferrazz@redhat.com> Reviewed-on: https://git.eclipse.org/r/22397 Tested-by: Hudson CI Reviewed-by: Sami Wagiaalla <swagiaal@redhat.com> IP-Clean: Sami Wagiaalla <swagiaal@redhat.com> Tested-by: Sami Wagiaalla <swagiaal@redhat.com>
Diffstat (limited to 'systemtap')
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/graphingapi/ui/charts/PieChartBuilder.java3
1 files changed, 2 insertions, 1 deletions
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/graphingapi/ui/charts/PieChartBuilder.java b/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/graphingapi/ui/charts/PieChartBuilder.java
index bbb1993607..b88de17c3e 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/graphingapi/ui/charts/PieChartBuilder.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/graphingapi/ui/charts/PieChartBuilder.java
@@ -67,8 +67,9 @@ public class PieChartBuilder extends AbstractChartWithoutAxisBuilder {
if (label != null) {
all_labels[i] = label.toString();
for (int j = 1; j < data[start + i].length; j++) {
+ // Ignore all null or negative slice values.
Double val = getDoubleOrNullValue(data[start + i][j]);
- if (val != null) {
+ if (val != null && val >= 0) {
all_values[i][j-1] = val;
} else {
all_values[i][j-1] = 0.0;

Back to the top