Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/ImportTraceWizardPage.java20
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramCurrentTimeControl.java16
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramUtils.java81
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramView.java30
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramZoom.java8
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/TimeGraphCombo.java3
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/TimeGraphViewer.java1
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/widgets/TimeGraphControl.java93
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.doc/Linux_Tools_Project/OProfile/User_Guide/Example-Project.html8
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.doc/Linux_Tools_Project/OProfile/User_Guide/Installation-and-Set-Up.html36
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.doc/Linux_Tools_Project/OProfile/User_Guide/Launching-A-Profile.html10
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.doc/Linux_Tools_Project/OProfile/User_Guide/OProfile-View.html8
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.doc/Linux_Tools_Project/OProfile/User_Guide/Remote-OProfile.html88
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.doc/Linux_Tools_Project/OProfile/User_Guide/Troubleshooting.html20
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.doc/Linux_Tools_Project/OProfile/User_Guide/images/Screenshot-remote-oprofile.pngbin0 -> 110060 bytes
-rw-r--r--oprofile/org.eclipse.linuxtools.oprofile.doc/toc.xml7
-rw-r--r--profiling/org.eclipse.linuxtools.profiling.launch/schema/org.eclipse.linuxtools.profiling.launch.provider.exsd8
-rw-r--r--profiling/org.eclipse.linuxtools.profiling.launch/src/org/eclipse/linuxtools/profiling/launch/ProfileLaunchShortcut.java55
-rw-r--r--profiling/org.eclipse.linuxtools.profiling.snapshot/src/org/eclipse/linuxtools/profiling/snapshot/SnapshotOptionsTab.java1
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.doc/Linux_Tools_Project/Valgrind/User_Guide/Remote-Valgrind.html65
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.doc/Linux_Tools_Project/Valgrind/User_Guide/Special-Cases.html8
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.doc/Linux_Tools_Project/Valgrind/User_Guide/Using-Helgrind.html10
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.doc/Linux_Tools_Project/Valgrind/User_Guide/images/HelgrindOutput2.pngbin0 -> 58530 bytes
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.doc/Linux_Tools_Project/Valgrind/User_Guide/images/Screenshot-main-remote-valgrind.pngbin0 -> 131739 bytes
-rw-r--r--valgrind/org.eclipse.linuxtools.valgrind.doc/toc.xml1
25 files changed, 394 insertions, 183 deletions
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/ImportTraceWizardPage.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/ImportTraceWizardPage.java
index 219605786f..91c0dd17e5 100644
--- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/ImportTraceWizardPage.java
+++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/project/wizards/ImportTraceWizardPage.java
@@ -19,6 +19,7 @@ import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.Comparator;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
@@ -870,7 +871,14 @@ public class ImportTraceWizardPage extends WizardResourceImportPage {
if (ok && traceTypeOK && !traceType.equals("")) { //$NON-NLS-1$
// Tag the selected traces with their type
List<String> files = new ArrayList<String>(fileSystemObjects.keySet());
- Collections.sort(files);
+ Collections.sort(files, new Comparator<String>() {
+ @Override
+ public int compare(String o1, String o2) {
+ String v1 = o1 + File.separatorChar;
+ String v2 = o2 + File.separatorChar;
+ return v1.compareTo(v2);
+ }
+ });
// After sorting, traces correspond to the unique prefixes
String prefix = null;
for (int i = 0; i < files.size(); i++) {
@@ -913,8 +921,14 @@ public class ImportTraceWizardPage extends WizardResourceImportPage {
for (Entry<String, File> entry : fileSystemObjects.entrySet()) {
fileList.add(entry.getValue());
}
- Collections.sort(fileList);
-
+ Collections.sort(fileList, new Comparator<File>() {
+ @Override
+ public int compare(File o1, File o2) {
+ String v1 = o1.getAbsolutePath() + File.separatorChar;
+ String v2 = o2.getAbsolutePath() + File.separatorChar;
+ return v1.compareTo(v2);
+ }
+ });
// Perform a distinct import operation for everything that has the same prefix
// (distinct prefixes correspond to traces - we don't want to re-create parent structures)
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramCurrentTimeControl.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramCurrentTimeControl.java
index 79a502633f..663b9874ae 100644
--- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramCurrentTimeControl.java
+++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramCurrentTimeControl.java
@@ -13,6 +13,8 @@
package org.eclipse.linuxtools.tmf.ui.views.histogram;
+import org.eclipse.linuxtools.tmf.core.event.TmfTimeRange;
+import org.eclipse.linuxtools.tmf.core.trace.TmfExperiment;
import org.eclipse.swt.widgets.Composite;
/**
@@ -63,6 +65,20 @@ public class HistogramCurrentTimeControl extends HistogramTextControl {
long value = HistogramUtils.stringToNanoseconds(stringValue);
if (getValue() != value) {
+ // Make sure that the new time is within range
+ TmfExperiment<?> exp = TmfExperiment.getCurrentExperiment();
+ if (exp != null) {
+ TmfTimeRange range = exp.getTimeRange();
+ long startTime = range.getStartTime().getValue();
+ long endTime = range.getEndTime().getValue();
+ if (value < startTime) {
+ value = startTime;
+ } else if (value > endTime) {
+ value = endTime;
+ }
+ }
+
+ // Set and propagate
setValue(value);
fParentView.updateCurrentEventTime(value);
}
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramUtils.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramUtils.java
index bf203842a5..f0516fda75 100644
--- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramUtils.java
+++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramUtils.java
@@ -1,11 +1,11 @@
/*******************************************************************************
* Copyright (c) 2009, 2011, 2012 Ericsson
- *
+ *
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* William Bourque - Initial API and implementation
* Francois Chouinard - Cleanup and refactoring
@@ -19,10 +19,10 @@ import org.eclipse.swt.widgets.Composite;
/**
* Bunch of conversion utilities.
- *
+ *
* @version 1.0
* @author Francois Chouinard
- * <p>
+ * <p>
*/
public abstract class HistogramUtils {
@@ -34,8 +34,9 @@ public abstract class HistogramUtils {
* Format a long representing nanoseconds into a string of the form
* "[seconds].[nanoseconds]" with the appropriate zero-padding.
* <p>
- *
- * @param ns the timestamp in nanoseconds
+ *
+ * @param ns
+ * the timestamp in nanoseconds
* @return the formatted string
*/
public static String nanosecondsToString(long ns) {
@@ -45,7 +46,8 @@ public abstract class HistogramUtils {
int length = time.length();
if (time.length() > 9) {
// Just insert the decimal dot
- time = time.substring(0, length - 9) + "." + time.substring(length - 9); //$NON-NLS-1$
+ time = time.substring(0, length - 9)
+ + "." + time.substring(length - 9); //$NON-NLS-1$
return time;
}
@@ -60,8 +62,9 @@ public abstract class HistogramUtils {
/**
* Convert a string representing a time to the corresponding long.
* <p>
- *
- * @param time the string to convert
+ *
+ * @param time
+ * the string to convert
* @return the corresponding nanoseconds value
*/
public static long stringToNanoseconds(String time) {
@@ -72,27 +75,39 @@ public abstract class HistogramUtils {
try {
int dot = buffer.indexOf("."); //$NON-NLS-1$
- // Prepend a "." if none was found (assume ns)
+ // if no . was found, assume ns
if (dot == -1) {
- buffer.insert(0, "."); //$NON-NLS-1$
- dot = 0;
+ // nanoseconds are the base unit.
+ if (time.length() > 9) {
+ long nanos = Long
+ .parseLong(time.substring(time.length() - 9));
+ long secs = Long.parseLong(time.substring(0,
+ time.length() - 9));
+ result = (secs * 1000000000) + nanos;
+ } else {
+ result = Long.parseLong(time);
+ }
+
+ } else {
+ // Zero-pad the string for nanoseconds
+ for (int i = buffer.length() - dot - 1; i < 9; i++) {
+ buffer.append("0"); //$NON-NLS-1$
+ }
+
+ // Remove the extra decimals if present
+ int nbDecimals = buffer.substring(dot + 1).length();
+ if (nbDecimals > 9) {
+ buffer.delete(buffer.substring(0, dot + 1 + 9).length(),
+ buffer.length());
+ }
+
+ // Do the conversion
+ long seconds = (dot > 0) ? Long.parseLong(buffer.substring(0,
+ dot)) : 0;
+ seconds = Math.abs(seconds);
+ long nanosecs = Long.parseLong(buffer.substring(dot + 1));
+ result = (seconds * 1000000000) + nanosecs;
}
-
- // Zero-pad the string for nanoseconds
- for (int i = buffer.length() - dot - 1; i < 9; i++)
- buffer.append("0"); //$NON-NLS-1$
-
- // Remove the extra decimals if present
- int nbDecimals = buffer.substring(dot + 1).length();
- if (nbDecimals > 9)
- buffer.delete(buffer.substring(0, dot + 1 + 9).length(), buffer.length());
-
- // Do the conversion
- long seconds = (dot > 0) ? Long.parseLong(buffer.substring(0, dot)) : 0;
- seconds = Math.abs(seconds);
- long nanosecs = Long.parseLong(buffer.substring(dot + 1));
- result = seconds * 1000000000 + nanosecs;
-
} catch (NumberFormatException e) {
// TODO: Find something interesting to say
}
@@ -103,10 +118,12 @@ public abstract class HistogramUtils {
/**
* Calculate the width of a String.
* <p>
- *
- * @param parent The control used as reference
- * @param text The Text to measure
- *
+ *
+ * @param parent
+ * The control used as reference
+ * @param text
+ * The Text to measure
+ *
* @return The result size
*/
public static int getTextSizeInControl(Composite parent, String text) {
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramView.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramView.java
index 6ad857d434..0601b5eb00 100644
--- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramView.java
+++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramView.java
@@ -1,15 +1,15 @@
/*******************************************************************************
* Copyright (c) 2009, 2010, 2011, 2012 Ericsson
- *
+ *
* All rights reserved. This program and the accompanying materials are
* made available under the terms of the Eclipse Public License v1.0 which
* accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
- *
+ *
* Contributors:
* William Bourque - Initial API and implementation
* Yuriy Vashchuk - GUI reorganisation, simplification and some related code improvements.
- * Yuriy Vashchuk - Histograms optimisation.
+ * Yuriy Vashchuk - Histograms optimisation.
* Yuriy Vashchuk - Histogram Canvas Heritage correction
* Francois Chouinard - Cleanup and refactoring
* Francois Chouinard - Moved from LTTng to TMF
@@ -114,10 +114,10 @@ public class HistogramView extends TmfView {
@Override
public void dispose() {
- if (fTimeRangeRequest != null && !fTimeRangeRequest.isCompleted()) {
+ if ((fTimeRangeRequest != null) && !fTimeRangeRequest.isCompleted()) {
fTimeRangeRequest.cancel();
}
- if (fFullTraceRequest != null && !fFullTraceRequest.isCompleted()) {
+ if ((fFullTraceRequest != null) && !fFullTraceRequest.isCompleted()) {
fFullTraceRequest.cancel();
}
fFullTraceHistogram.dispose();
@@ -246,8 +246,9 @@ public class HistogramView extends TmfView {
// Load the experiment if present
fCurrentExperiment = (TmfExperiment<ITmfEvent>) TmfExperiment.getCurrentExperiment();
- if (fCurrentExperiment != null)
+ if (fCurrentExperiment != null) {
loadExperiment();
+ }
}
@Override
@@ -326,21 +327,26 @@ public class HistogramView extends TmfView {
public synchronized void updateTimeRange(long newDuration) {
if (fCurrentExperiment != null) {
long delta = newDuration - fWindowSpan;
- long newStartTime = fWindowStartTime + delta / 2;
+ long newStartTime = fWindowStartTime + (delta / 2);
setNewRange(newStartTime, newDuration);
}
}
private void setNewRange(long startTime, long duration) {
- if (startTime < fExperimentStartTime)
+ if (startTime < fExperimentStartTime) {
startTime = fExperimentStartTime;
+ }
long endTime = startTime + duration;
+ if( endTime < startTime ) {
+ endTime = fExperimentEndTime;
+ startTime = fExperimentStartTime;
+ }
if (endTime > fExperimentEndTime) {
endTime = fExperimentEndTime;
- if (endTime - duration > fExperimentStartTime)
+ if ((endTime - duration) > fExperimentStartTime) {
startTime = endTime - duration;
- else {
+ } else {
startTime = fExperimentStartTime;
}
}
@@ -508,7 +514,7 @@ public class HistogramView extends TmfView {
}
private void sendTimeRangeRequest(long startTime, long endTime) {
- if (fTimeRangeRequest != null && !fTimeRangeRequest.isCompleted()) {
+ if ((fTimeRangeRequest != null) && !fTimeRangeRequest.isCompleted()) {
fTimeRangeRequest.cancel();
}
TmfTimestamp startTS = new TmfTimestamp(startTime, TIME_SCALE);
@@ -524,7 +530,7 @@ public class HistogramView extends TmfView {
}
private void sendFullRangeRequest(TmfTimeRange fullRange) {
- if (fFullTraceRequest != null && !fFullTraceRequest.isCompleted()) {
+ if ((fFullTraceRequest != null) && !fFullTraceRequest.isCompleted()) {
fFullTraceRequest.cancel();
}
int cacheSize = fCurrentExperiment.getCacheSize();
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramZoom.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramZoom.java
index 1b2d88d694..7d837aea91 100644
--- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramZoom.java
+++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/views/histogram/HistogramZoom.java
@@ -159,14 +159,11 @@ public class HistogramZoom implements MouseWheelListener {
// MouseWheelListener
// ------------------------------------------------------------------------
- private long fMouseTimestamp = 0;
-
@Override
public synchronized void mouseScrolled(MouseEvent event) {
if (fScrollCounter == null) {
fScrollCounter = new MouseScrollCounter(this);
fScrollCounter.start();
- fMouseTimestamp = fHistogram.getTimestamp(event.x);
}
fScrollCounter.incrementMouseScroll(event.count);
}
@@ -178,9 +175,8 @@ public class HistogramZoom implements MouseWheelListener {
// Compute the new time range
long requestedRange = (nbClicks > 0) ? Math.round(ZOOM_FACTOR * fRangeDuration) : (long) Math.ceil(fRangeDuration * (1.0 / ZOOM_FACTOR));
- // Perform a proportional zoom wrt the mouse position
- double ratio = ((double) (fMouseTimestamp - fRangeStartTime)) / fRangeDuration;
- long requestedStart = validateStart(fRangeStartTime + (long) ((fRangeDuration - requestedRange) * ratio));
+ // Distribute delta and adjust for boundaries
+ long requestedStart = validateStart(fRangeStartTime + (long) ((fRangeDuration - requestedRange) / 2));
long requestedEnd = validateEnd(requestedStart, requestedStart + requestedRange);
requestedStart = validateStart(requestedEnd - requestedRange);
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/TimeGraphCombo.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/TimeGraphCombo.java
index 733d2800fa..f8039cd4c0 100644
--- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/TimeGraphCombo.java
+++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/TimeGraphCombo.java
@@ -594,6 +594,9 @@ public class TimeGraphCombo extends Composite {
public void setInput(ITimeGraphEntry[] input) {
fInhibitTreeSelection = true;
fTreeViewer.setInput(input);
+ for (SelectionListenerWrapper listenerWrapper : fSelectionListenerMap.values()) {
+ listenerWrapper.selection = null;
+ }
fInhibitTreeSelection = false;
fTreeViewer.expandAll();
fTreeViewer.getTree().getVerticalBar().setEnabled(false);
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/TimeGraphViewer.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/TimeGraphViewer.java
index 1c78b54ead..ca3c629a53 100644
--- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/TimeGraphViewer.java
+++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/TimeGraphViewer.java
@@ -142,6 +142,7 @@ public class TimeGraphViewer implements ITimeDataProvider, SelectionListener {
_verticalScrollBar.setEnabled(true);
setTopIndex(0);
_selectedTime = 0;
+ _selectedEntry = null;
refreshAllData(input);
}
}
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/widgets/TimeGraphControl.java b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/widgets/TimeGraphControl.java
index bc782fba25..b0a6b48d12 100644
--- a/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/widgets/TimeGraphControl.java
+++ b/lttng/org.eclipse.linuxtools.tmf.ui/src/org/eclipse/linuxtools/tmf/ui/widgets/timegraph/widgets/TimeGraphControl.java
@@ -490,78 +490,6 @@ public class TimeGraphControl extends TimeGraphBaseControl implements FocusListe
return sel;
}
-
- // TODO select implementation for selectTrace
-// public void selectTrace(int n) {
-// if (n != 1 && n != -1)
-// return;
-// boolean changed = false;
-// int lastSelection = -1;
-// for (int i = 0; i < _data._expandedItems.length; i++) {
-// TimeGraphItem item = (TimeGraphItem) _data._expandedItems[i];
-// if (item._selected) {
-// lastSelection = i;
-// if (1 == n && i < _data._expandedItems.length - 1) {
-// item._selected = false;
-// if (item._hasChildren) {
-// _data.expandItem(i);
-// fireTreeEvent(item._trace, item._expanded);
-// }
-// item = (TimeGraphItem) _data._expandedItems[i + 1];
-// if (item._hasChildren) {
-// _data.expandItem(i + 1);
-// fireTreeEvent(item._trace, item._expanded);
-// item = (TimeGraphItem) _data._expandedItems[i + 2];
-// }
-// item._selected = true;
-// changed = true;
-// } else if (-1 == n && i > 0) {
-// i--;
-// TimeGraphItem prevItem = (TimeGraphItem) _data._expandedItems[i];
-// if (prevItem._hasChildren) {
-// if (prevItem._expanded) {
-// if (i > 0) {
-// i--;
-// prevItem = (TimeGraphItem) _data._expandedItems[i];
-// }
-// }
-// if (!prevItem._expanded) {
-// _data.expandItem(i);
-// fireTreeEvent(prevItem._trace, prevItem._expanded);
-// prevItem = (TimeGraphItem) _data._expandedItems[i + prevItem.children.size()];
-// item._selected = false;
-// prevItem._selected = true;
-// changed = true;
-// }
-// } else {
-// item._selected = false;
-// prevItem._selected = true;
-// changed = true;
-// }
-// }
-// break;
-// }
-// }
-// if (lastSelection < 0 && _data._expandedItems.length > 0) {
-// TimeGraphItem item = (TimeGraphItem) _data._expandedItems[0];
-// if (item._hasChildren) {
-// _data.expandItem(0);
-// fireTreeEvent(item._trace, item._expanded);
-// item = (TimeGraphItem) _data._expandedItems[1];
-// item._selected = true;
-// changed = true;
-// } else {
-// item._selected = true;
-// changed = true;
-// }
-// }
-// if (changed) {
-// ensureVisibleItem(-1, false);
-// redraw();
-// fireSelectionChanged();
-// }
-// }
-
/**
* Enable/disable one of the traces in the model
*
@@ -874,7 +802,13 @@ public class TimeGraphControl extends TimeGraphBaseControl implements FocusListe
x -= nameWidth;
int timeWidth = size.x - nameWidth - RIGHT_MARGIN;
if (x >= 0 && size.x >= nameWidth) {
- hitTime = time0 + Math.round((time1 - time0) * ((double) x / timeWidth));
+ if (time1 - time0 > timeWidth) {
+ // nanosecond smaller than one pixel: use the first integer nanosecond of this pixel's time range
+ hitTime = time0 + (long) Math.ceil((time1 - time0) * ((double) x / timeWidth));
+ } else {
+ // nanosecond greater than one pixel: use the nanosecond that covers this pixel start position
+ hitTime = time0 + (long) Math.floor((time1 - time0) * ((double) x / timeWidth));
+ }
}
return hitTime;
}
@@ -1042,7 +976,7 @@ public class TimeGraphControl extends TimeGraphBaseControl implements FocusListe
long time1 = _timeProvider.getTime1();
long selectedTime = _timeProvider.getSelectedTime();
double pixelsPerNanoSec = (bounds.width - nameSpace <= RIGHT_MARGIN) ? 0 : (double) (bounds.width - nameSpace - RIGHT_MARGIN) / (time1 - time0);
- int x = bounds.x + nameSpace + (int) Math.round((selectedTime - time0) * pixelsPerNanoSec);
+ int x = bounds.x + nameSpace + (int) ((selectedTime - time0) * pixelsPerNanoSec);
if (x >= nameSpace && x < bounds.x + bounds.width) {
gc.setForeground(_colors.getColor(TimeGraphColorScheme.SELECTED_TIME));
gc.drawLine(x, bounds.y, x, bounds.y + bounds.height);
@@ -1900,17 +1834,6 @@ public class TimeGraphControl extends TimeGraphBaseControl implements FocusListe
}
}
- public void expandItem(int idx) {
- if (idx < 0 || idx >= _expandedItems.length) {
- return;
- }
- Item item = _expandedItems[idx];
- if (item._hasChildren && !item._expanded) {
- item._expanded = true;
- updateExpandedItems();
- }
- }
-
public void refreshData(ITimeGraphEntry traces[]) {
if (traces == null || traces.length == 0) {
traceFilter = null;
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.doc/Linux_Tools_Project/OProfile/User_Guide/Example-Project.html b/oprofile/org.eclipse.linuxtools.oprofile.doc/Linux_Tools_Project/OProfile/User_Guide/Example-Project.html
index 7739adb8a2..9f1de3f332 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.doc/Linux_Tools_Project/OProfile/User_Guide/Example-Project.html
+++ b/oprofile/org.eclipse.linuxtools.oprofile.doc/Linux_Tools_Project/OProfile/User_Guide/Example-Project.html
@@ -12,7 +12,7 @@
</tr>
<tr>
<td style="width: 20%" align="left">
- <a href="OProfile-View.html" title="OProfile View">
+ <a href="Remote-OProfile.html" title="Remote OProfile">
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
</a>
</td>
@@ -24,7 +24,7 @@
</td>
</tr>
<tr>
- <td style="width: 20%" align="left" valign="top">OProfile View</td>
+ <td style="width: 20%" align="left" valign="top">Remote OProfile</td>
<td style="width: 60%" align="center"></td>
<td style="width: 20%" align="right" valign="top">Troubleshooting</td>
</tr>
@@ -38,7 +38,7 @@
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
<tr>
<td style="width: 20%" align="left">
- <a href="OProfile-View.html" title="OProfile View">
+ <a href="Remote-OProfile.html" title="Remote OProfile">
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
</a>
</td>
@@ -54,7 +54,7 @@
</td>
</tr>
<tr>
- <td style="width: 20%" align="left" valign="top">OProfile View</td>
+ <td style="width: 20%" align="left" valign="top">Remote OProfile</td>
<td style="width: 60%" align="center"></td>
<td style="width: 20%" align="right" valign="top">Troubleshooting</td>
</tr>
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.doc/Linux_Tools_Project/OProfile/User_Guide/Installation-and-Set-Up.html b/oprofile/org.eclipse.linuxtools.oprofile.doc/Linux_Tools_Project/OProfile/User_Guide/Installation-and-Set-Up.html
index d0881dafb5..c52bb078ba 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.doc/Linux_Tools_Project/OProfile/User_Guide/Installation-and-Set-Up.html
+++ b/oprofile/org.eclipse.linuxtools.oprofile.doc/Linux_Tools_Project/OProfile/User_Guide/Installation-and-Set-Up.html
@@ -30,8 +30,8 @@
</tr>
</table><hr/>
<h1 id="Installation_and_Set-Up">Installation and Set-Up</h1>
- <p>The easiest way to install the OProfile plug-in for Eclipse is through the
- <b>''Software Updates and Add-ons '</b>' menu. For information on how to use this menu, refer to
+ <p>The easiest way to install the OProfile plug-in for Eclipse is through the ''
+ <b>Software Updates and Add-ons '</b>' menu. For information on how to use this menu, refer to
<a href="http://wiki.eclipse.org/Linux_Tools_Project/PluginInstallHelp#Installing_Updates_From_the_Linux_Tools_Update_Site">http://wiki.eclipse.org/Linux_Tools_Project/PluginInstallHelp#Installing_Updates_From_the_Linux_Tools_Update_Site</a>.
</p>
<p>Unlike most Eclipse plug-ins, the OProfile plug-in requires some configuration after installation. Note that this configuration process takes only a few simple steps, and only needs to be done once.</p>
@@ -77,21 +77,27 @@
</p>
<h2 id="Step_2_-_Choose_Which_Installation_Script_To_Run">Step 2 - Choose Which Installation Script To Run</h2>
<p>The
- <i><code>natives/linux/scripts</code></i> subdirectory contains two scripts:
- <i><code>install.sh</code></i> and
- <i><code>install-noconsolehelper.sh</code></i>. Both scripts perform sanity checks to ensure OProfile is installed. The difference is in how root authentication with the plug-in is set up.
+ <i><code>natives/linux/scripts</code></i> subdirectory contains three scripts:
+ <i><code>install.sh</code></i>,
+ <i><code>install-consolehelper.sh</code></i> and
+ <i><code>install-noconsolehelper.sh</code></i>. These scripts perform sanity checks to ensure OProfile is installed. The difference is in how root authentication with the plug-in is set up.
</p>
<ul>
<li>
- <i><code>install.sh</code></i> uses the pluggable authentication modules (PAM) mechanism. This is the default and recommended method for root authentication. When an OProfile task is required, you will be presented with this dialog to enter the root password:
+ <i><code>install.sh</code></i> uses PolicyKit. This is the default and recommended method for root authentication. When an OProfile task is required, you will be presented with a dialog to enter the root password. If PolicyKit is not installed on the system, it is recommended to use
+ <i><code>install-consolehelper.sh</code></i> instead.
+ <br/>
+ </li>
+ <li>
+ <i><code>install-consolehelper.sh</code></i> uses the pluggable authentication modules (PAM) mechanism. When an OProfile task is required, you will be presented with this dialog to enter the root password:
<br/>
<img border="0" src="images/Screenshot-opcontrol_consolehelper.png"/>
</li>
<li>
<i><code>install-noconsolehelper.sh</code></i> can be used when <code>consolehelper</code> is not present on the system, or if required PAM modules are not on the system. It uses the sudo mechanism and a small wrapper script. The install script will describe the text which should be written in the
<i><code>sudoers</code></i> file, then run the command <code>visudo</code> to edit it.
- <br/>'
- <i>Warning:</i>' The
+ <br/>
+ <b>Warning:</b> The
<i><code>sudoers</code></i> file is a sensitive system file and altering it in other ways may lead to system instability. Only users with enough knowledge of running a Linux system should use this method. For these reasons, this method of root authentication is discouraged. However, it may be the only option available to some users and it has been tested to work by developers and users of the plug-in.
</li>
</ul>
@@ -106,9 +112,9 @@
<pre>./install.sh
Eclipse-OProfile plugin install successful.
</pre>
- <p>Either install script should be run as the root user since both scripts perform some actions that require elevated privileges:
- <i><code>install.sh</code></i> places files in
- <i><code>/etc</code></i> subdirectories, while
+ <p>Install scripts should be run as the root user since these scripts perform some actions that require elevated privileges:
+ <i><code>install.sh</code></i> uses PolicyKit,
+ <i><code>install-consolehelper.sh</code></i> uses consolehelper with PAM, and
<i><code>install-noconsolehelper.sh</code></i> runs the command <code>visudo</code>. If you wish to simply run either install script without logging in as root, use:
</p>
<pre> su -c './install.sh'
@@ -118,9 +124,9 @@ Eclipse-OProfile plugin install successful.
</p>
<h2 id="Step_4_-_Restart_Eclipse">Step 4 - Restart Eclipse</h2>
<p>After running the install script, restart Eclipse using <u>File</u> &gt; <u>Restart</u>. </p>
- <p>If you need to uninstall the plug-in, run the
- <i><code>uninstall.sh</code></i> or
- <i><code>uninstall-noconsolehelper.sh</code></i> script before uninstalling it from within Eclipse. These scripts are also located in the
+ <p>If you need to uninstall the plug-in, run the uninstall script that corresponds to the install script used. For example, if you used
+ <i><code>install-consolehelper.sh</code></i>, you would run
+ <i><code>uninstall-consolehelper.sh</code></i> before uninstalling it from within Eclipse. These scripts are also located in the
<i><code>natives/linux/scripts</code></i> subdirectory of the OProfile core plug-in directory (i.e. the same directory where the install scripts are found).
</p><hr/>
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
@@ -148,4 +154,4 @@ Eclipse-OProfile plugin install successful.
</tr>
</table>
</body>
-</html>
+</html> \ No newline at end of file
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.doc/Linux_Tools_Project/OProfile/User_Guide/Launching-A-Profile.html b/oprofile/org.eclipse.linuxtools.oprofile.doc/Linux_Tools_Project/OProfile/User_Guide/Launching-A-Profile.html
index 24cd357312..c414adcaac 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.doc/Linux_Tools_Project/OProfile/User_Guide/Launching-A-Profile.html
+++ b/oprofile/org.eclipse.linuxtools.oprofile.doc/Linux_Tools_Project/OProfile/User_Guide/Launching-A-Profile.html
@@ -64,7 +64,15 @@
</p>
<p>
<img border="0" src="images/Oprofile_manual_shortcut.png"/>
- </p><hr/>
+ </p>
+ <p>The basic workflow to run manual OProfile is</p>
+ <ol>
+ <li>Profile -&gt; Profile with OProfile (Manual)</li>
+ <li>On control dialog, hit "Start Daemon"</li>
+ <li>Run the application binary</li>
+ <li>On control dialog, hit "Refresh View" (Oprofile view should be refreshed with profiling data)</li>
+ <li>On control dialog, hit "Stop Daemon"</li>
+ </ol><hr/>
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
<tr>
<td style="width: 20%" align="left">
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.doc/Linux_Tools_Project/OProfile/User_Guide/OProfile-View.html b/oprofile/org.eclipse.linuxtools.oprofile.doc/Linux_Tools_Project/OProfile/User_Guide/OProfile-View.html
index 75f272e8c5..2ba6a86d58 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.doc/Linux_Tools_Project/OProfile/User_Guide/OProfile-View.html
+++ b/oprofile/org.eclipse.linuxtools.oprofile.doc/Linux_Tools_Project/OProfile/User_Guide/OProfile-View.html
@@ -18,7 +18,7 @@
</td>
<td style="width: 60%" align="center"></td>
<td style="width: 20%" align="right">
- <a href="Example-Project.html" title="Example Project">
+ <a href="Remote-OProfile.html" title="Remote OProfile">
<img alt="Next" border="0" src="../../../images/next.gif"/>
</a>
</td>
@@ -26,7 +26,7 @@
<tr>
<td style="width: 20%" align="left" valign="top">Profiling Configuration</td>
<td style="width: 60%" align="center"></td>
- <td style="width: 20%" align="right" valign="top">Example Project</td>
+ <td style="width: 20%" align="right" valign="top">Remote OProfile</td>
</tr>
</table><hr/>
<h1 id="OProfile_View">OProfile View</h1>
@@ -133,7 +133,7 @@
</a>
</td>
<td style="width: 20%" align="right">
- <a href="Example-Project.html" title="Example Project">
+ <a href="Remote-OProfile.html" title="Remote OProfile">
<img alt="Next" border="0" src="../../../images/next.gif"/>
</a>
</td>
@@ -141,7 +141,7 @@
<tr>
<td style="width: 20%" align="left" valign="top">Profiling Configuration</td>
<td style="width: 60%" align="center"></td>
- <td style="width: 20%" align="right" valign="top">Example Project</td>
+ <td style="width: 20%" align="right" valign="top">Remote OProfile</td>
</tr>
</table>
</body>
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.doc/Linux_Tools_Project/OProfile/User_Guide/Remote-OProfile.html b/oprofile/org.eclipse.linuxtools.oprofile.doc/Linux_Tools_Project/OProfile/User_Guide/Remote-OProfile.html
new file mode 100644
index 0000000000..2a13a31397
--- /dev/null
+++ b/oprofile/org.eclipse.linuxtools.oprofile.doc/Linux_Tools_Project/OProfile/User_Guide/Remote-OProfile.html
@@ -0,0 +1,88 @@
+<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <title>OProfile User Guide - Remote OProfile</title>
+ <link type="text/css" rel="stylesheet" href="../../../book.css"/>
+ </head>
+ <body>
+ <table class="navigation" style="width: 100%;" border="0" summary="navigation">
+ <tr>
+ <th style="width: 100%" align="center" colspan="3">Remote OProfile</th>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left">
+ <a href="OProfile-View.html" title="OProfile View">
+ <img alt="Previous" border="0" src="../../../images/prev.gif"/>
+ </a>
+ </td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right">
+ <a href="Example-Project.html" title="Example Project">
+ <img alt="Next" border="0" src="../../../images/next.gif"/>
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left" valign="top">OProfile View</td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right" valign="top">Example Project</td>
+ </tr>
+ </table><hr/>
+ <h1 id="Remote_OProfile">Remote OProfile</h1>
+ <p>The OProfile plug-in allows profiling a project stored in a remote machine. This can be particularly useful when developing an application for a different architecture. </p>
+ <h2 id="Set-up">Set-up</h2>
+ <p>The remote OProfile plug-in doesn't have installation scripts, but requires some setup in the remote machine. First, the remote machine's user must be able to run OProfile as root. For this, log in the remote machine as root and edit the /etc/sudoers file to add the following line: </p>
+ <pre>&lt;user&gt; ALL=(ALL) NOPASSWD: &lt;linux-tools-path&gt;/opcontrol
+</pre>
+ <p>Where: </p>
+ <ul>
+ <li>
+ <b>&lt;user&gt;</b> - Remote machine's user
+ </li>
+ <li>
+ <b>&lt;linux-tools-path&gt;</b> - Path for linux tools set for the project. The default is /usr/bin. This path can be modified by right-clicking the remote project, clicking in "Properties" and choosing the "Linux Tools Path" tab.
+ </li>
+ </ul>
+ <p>Also make sure that following line is not present or commented out: </p>
+ <pre>Defaults requiretty
+</pre>
+ <p>This is necessary for running a remote command using sudo. </p>
+ <h2 id="Launching_A_Remote_Profile">Launching A Remote Profile</h2>
+ <p>To run OProfile remotely, right-click the project and navigate to "Profile As", then to "Profile Configurations". (Note: there's no One-click launch for remote OProfile). In the new window, double-click the Profile with OProfile (remote) profile configuration. </p>
+ <p>In the main tab, choose the binary that will be profiled by clicking the "Browse" button under "C/C++ executable".</p>
+ <p>
+ <img border="0" src="images/Screenshot-remote-oprofile.png"/>
+ </p>
+ <p>The same
+ <a href="Profiling-Configuration.html#Event_Configuration">Event Configuration</a> Event Configuration options for regular OProfile apply for remote OProfile as well.
+ </p>
+ <p>After configuring the profile, click the Profile button to launch the profile. The same
+ <a href="OProfile-View.html#OProfile_View">OProfile View</a> as the local one will show the results.
+ </p><hr/>
+ <table class="navigation" style="width: 100%;" border="0" summary="navigation">
+ <tr>
+ <td style="width: 20%" align="left">
+ <a href="OProfile-View.html" title="OProfile View">
+ <img alt="Previous" border="0" src="../../../images/prev.gif"/>
+ </a>
+ </td>
+ <td style="width: 60%" align="center">
+ <a href="User-Guide.html" title="OProfile User Guide">
+ <img alt="OProfile User Guide" border="0" src="../../../images/home.gif"/>
+ </a>
+ </td>
+ <td style="width: 20%" align="right">
+ <a href="Example-Project.html" title="Example Project">
+ <img alt="Next" border="0" src="../../../images/next.gif"/>
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left" valign="top">OProfile View</td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right" valign="top">Example Project</td>
+ </tr>
+ </table>
+ </body>
+</html> \ No newline at end of file
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.doc/Linux_Tools_Project/OProfile/User_Guide/Troubleshooting.html b/oprofile/org.eclipse.linuxtools.oprofile.doc/Linux_Tools_Project/OProfile/User_Guide/Troubleshooting.html
index 14f09ef70d..445cb1f11c 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.doc/Linux_Tools_Project/OProfile/User_Guide/Troubleshooting.html
+++ b/oprofile/org.eclipse.linuxtools.oprofile.doc/Linux_Tools_Project/OProfile/User_Guide/Troubleshooting.html
@@ -35,7 +35,8 @@
</p>
<h2 id="Install_Script_Errors">Install Script Errors</h2>
<p>This section describes different errors that could occur from running the install scripts (i.e. <code>
- <i>install.sh</i></code> or <code>
+ <i>install.sh</i></code>, <code>
+ <i>install-consolehelper.sh</i></code> or <code>
<i>install-noconsolehelper.sh</i></code>)
</p>
<h3 id="Error:_script_must_be_run_as_the_root_user">Error: script must be run as the root user</h3>
@@ -59,16 +60,27 @@
<i>/usr/bin</i></code> directory. Of course, if the binaries do not exist on your system, then install the <code>
<i>oprofile</i></code> package.
</p>
+ <h3 id="Error:_.2Fusr.2Fbin.2Fpkexec_does_not_exist">Error: /usr/bin/pkexec does not exist</h3>
+ <p>You ran the <code>
+ <i>install.sh</i></code> script, but <code>pkexec</code> which is provided by PolicyKit was not installed on your system.
+ As described in
+ <a href="Installation-and-Set-Up.html#Step_2_-_Choose_Which_Installation_Script_To_Run">Step 2 - Choose Which Installation Script To Run</a>, if <code>PolicyKit</code> is not installed, then you can still choose from the other installation scripts : <code>
+ <i>install-consolehelper.sh</i></code> or <code>
+ <i>install-noconsolehelper.sh</i></code>.
+ </p>
+ <p>Solution: Run the <code>
+ <i>install-consolehelper.sh</i></code> script instead.
+ </p>
<h3 id="Error:_.2Fusr.2Fbin.2Fconsolehelper_does_not_exist.2C_run_install-noconsolehelper.sh_instead">Error: /usr/bin/consolehelper does not exist, run install-noconsolehelper.sh instead</h3>
<p>You ran the <code>
- <i>install.sh</i></code> script, but <code>consolehelper</code> was not installed on your system.
+ <i>install-consolehelper.sh</i></code> script, but <code>consolehelper</code> was not installed on your system.
As described in
<a href="Installation-and-Set-Up.html#Step_2_-_Choose_Which_Installation_Script_To_Run">Step 2 - Choose Which Installation Script To Run</a>, if <code>consolehelper</code> is not installed, then you will need to use a root authentication mode that uses the <code>sudo</code> mechanism.
</p>
<p>Solution: Run the <code>
<i>install-noconsolehelper.sh</i></code> script instead.
</p>
- <h3 id="Error:_cannot_create_opcontrol_wrapper_in_.3Cdirectory.3E">Error: cannot create opcontrol wrapper in &lt;directory&gt;</h3>
+ <h3 id="Error:_cannot_create_opcontrol_wrapper_in">Error: cannot create opcontrol wrapper in &lt;directory&gt;</h3>
<p>The <code>ln</code> command reports that the symlink could not be created. This can occur if the <code>
<i>natives/linux/scripts</i></code> subdirectory is located on an NFS mount; the NFS server will not allow the local root user to create files in the directory.
</p>
@@ -84,7 +96,7 @@ if [ $? -ne 0 ]; then
fi
</pre>
<p>The <code>
- <i>install.sh</i></code> script is fixed in the most recent version of the OProfile plug-in for Eclipse, but not in the 0.2.0 release.
+ <i>install-consolehelper.sh</i></code> script is fixed in the most recent version of the OProfile plug-in for Eclipse, but not in the 0.2.0 release.
</p>
<h3 id="Error:_cannot_find_opxml_binary.2C_required_plugin_missing_.28Deprecated.29">Error: cannot find opxml binary, required plugin missing (Deprecated)</h3>
<p>
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.doc/Linux_Tools_Project/OProfile/User_Guide/images/Screenshot-remote-oprofile.png b/oprofile/org.eclipse.linuxtools.oprofile.doc/Linux_Tools_Project/OProfile/User_Guide/images/Screenshot-remote-oprofile.png
new file mode 100644
index 0000000000..4fa53629e3
--- /dev/null
+++ b/oprofile/org.eclipse.linuxtools.oprofile.doc/Linux_Tools_Project/OProfile/User_Guide/images/Screenshot-remote-oprofile.png
Binary files differ
diff --git a/oprofile/org.eclipse.linuxtools.oprofile.doc/toc.xml b/oprofile/org.eclipse.linuxtools.oprofile.doc/toc.xml
index 7cee287f7a..b8091e79aa 100644
--- a/oprofile/org.eclipse.linuxtools.oprofile.doc/toc.xml
+++ b/oprofile/org.eclipse.linuxtools.oprofile.doc/toc.xml
@@ -26,14 +26,19 @@
<topic href="Linux_Tools_Project/OProfile/User_Guide/OProfile-View.html#View_Menu" label="View Menu"></topic>
</topic>
</topic>
+ <topic href="Linux_Tools_Project/OProfile/User_Guide/Remote-OProfile.html" label="Remote OProfile">
+ <topic href="Linux_Tools_Project/OProfile/User_Guide/Remote-OProfile.html#Set-up" label="Set-up"></topic>
+ <topic href="Linux_Tools_Project/OProfile/User_Guide/Remote-OProfile.html#Launching_A_Remote_Profile" label="Launching A Remote Profile"></topic>
+ </topic>
<topic href="Linux_Tools_Project/OProfile/User_Guide/Example-Project.html" label="Example Project"></topic>
<topic href="Linux_Tools_Project/OProfile/User_Guide/Troubleshooting.html" label="Troubleshooting">
<topic href="Linux_Tools_Project/OProfile/User_Guide/Troubleshooting.html#Install_Script_Errors" label="Install Script Errors">
<topic href="Linux_Tools_Project/OProfile/User_Guide/Troubleshooting.html#Error:_script_must_be_run_as_the_root_user" label="Error: script must be run as the root user"></topic>
<topic href="Linux_Tools_Project/OProfile/User_Guide/Troubleshooting.html#Error:_script_must_be_run_with_pwd_in_script_dir" label="Error: script must be run with pwd in script dir"></topic>
<topic href="Linux_Tools_Project/OProfile/User_Guide/Troubleshooting.html#Error:_required_binaries_do_not_exist.2C_OProfile_not_installed.3F" label="Error: required binaries do not exist, OProfile not installed?"></topic>
+ <topic href="Linux_Tools_Project/OProfile/User_Guide/Troubleshooting.html#Error:_.2Fusr.2Fbin.2Fpkexec_does_not_exist" label="Error: /usr/bin/pkexec does not exist"></topic>
<topic href="Linux_Tools_Project/OProfile/User_Guide/Troubleshooting.html#Error:_.2Fusr.2Fbin.2Fconsolehelper_does_not_exist.2C_run_install-noconsolehelper.sh_instead" label="Error: /usr/bin/consolehelper does not exist, run install-noconsolehelper.sh instead"></topic>
- <topic href="Linux_Tools_Project/OProfile/User_Guide/Troubleshooting.html#Error:_cannot_create_opcontrol_wrapper_in_.3Cdirectory.3E" label="Error: cannot create opcontrol wrapper in &lt;directory&quot;"></topic>
+ <topic href="Linux_Tools_Project/OProfile/User_Guide/Troubleshooting.html#Error:_cannot_create_opcontrol_wrapper_in" label="Error: cannot create opcontrol wrapper in "></topic>
<topic href="Linux_Tools_Project/OProfile/User_Guide/Troubleshooting.html#Error:_cannot_find_opxml_binary.2C_required_plugin_missing_.28Deprecated.29" label="Error: cannot find opxml binary, required plugin missing (Deprecated)"></topic>
</topic>
<topic href="Linux_Tools_Project/OProfile/User_Guide/Troubleshooting.html#No_Samples_From_A_Profile" label="No Samples From A Profile"></topic>
diff --git a/profiling/org.eclipse.linuxtools.profiling.launch/schema/org.eclipse.linuxtools.profiling.launch.provider.exsd b/profiling/org.eclipse.linuxtools.profiling.launch/schema/org.eclipse.linuxtools.profiling.launch.provider.exsd
index 2d79eb2f8b..c9035f7021 100644
--- a/profiling/org.eclipse.linuxtools.profiling.launch/schema/org.eclipse.linuxtools.profiling.launch.provider.exsd
+++ b/profiling/org.eclipse.linuxtools.profiling.launch/schema/org.eclipse.linuxtools.profiling.launch.provider.exsd
@@ -83,6 +83,14 @@
</appinfo>
</annotation>
</attribute>
+ <attribute name="priority" type="string" use="required">
+ <annotation>
+ <documentation>
+ Positive integer stating priorty over launch provider&apos;s of the same type.
+Invalid values will be assigned the lowest priority to the extension.
+ </documentation>
+ </annotation>
+ </attribute>
</complexType>
</element>
diff --git a/profiling/org.eclipse.linuxtools.profiling.launch/src/org/eclipse/linuxtools/profiling/launch/ProfileLaunchShortcut.java b/profiling/org.eclipse.linuxtools.profiling.launch/src/org/eclipse/linuxtools/profiling/launch/ProfileLaunchShortcut.java
index 1ed7dac6fe..58c43fc1d3 100644
--- a/profiling/org.eclipse.linuxtools.profiling.launch/src/org/eclipse/linuxtools/profiling/launch/ProfileLaunchShortcut.java
+++ b/profiling/org.eclipse.linuxtools.profiling.launch/src/org/eclipse/linuxtools/profiling/launch/ProfileLaunchShortcut.java
@@ -15,6 +15,7 @@ package org.eclipse.linuxtools.profiling.launch;
import java.lang.reflect.InvocationTargetException;
import java.util.ArrayList;
import java.util.Collections;
+import java.util.Comparator;
import java.util.List;
import org.eclipse.cdt.core.model.CModelException;
@@ -89,24 +90,64 @@ public abstract class ProfileLaunchShortcut implements ILaunchShortcut {
IExtensionPoint extPoint = Platform.getExtensionRegistry()
.getExtensionPoint(ProfileLaunchPlugin.PLUGIN_ID, "launchProvider"); //$NON-NLS-1$
IConfigurationElement[] configs = extPoint.getConfigurationElements();
+ ArrayList<IConfigurationElement> configList = new ArrayList<IConfigurationElement>();
+
for (IConfigurationElement config : configs) {
if (config.getName().equals("provider")) { //$NON-NLS-1$
String currentType = config.getAttribute("type"); //$NON-NLS-1$
String shortcut = config.getAttribute("shortcut"); //$NON-NLS-1$
- if (currentType != null && shortcut != null
+ if (currentType != null && shortcut != null
&& currentType.equals(type)) {
- try {
- Object obj = config.createExecutableExtension("shortcut"); //$NON-NLS-1$
- if (obj instanceof ProfileLaunchShortcut) {
- return (ProfileLaunchShortcut) obj;
+
+ String priority = config.getAttribute("priority");
+ if (priority != null) {
+ try {
+ Integer.parseInt(priority);
+ configList.add(config);
+ } catch (NumberFormatException e) {
+ // continue
}
- } catch (CoreException e) {
- // continue, perhaps another configuration will succeed
}
}
}
}
+ Collections.sort(configList, new Comparator<IConfigurationElement>() {
+ public int compare(IConfigurationElement c1,
+ IConfigurationElement c2) {
+ int p1, p2;
+ // If priority is not an int or is < 0, corresponding config has
+ // lowest priority.
+ try {
+ p1 = Integer.parseInt(c1.getAttribute("priority"));
+ if (p1 <= 0) {
+ return 1;
+ }
+ } catch (NumberFormatException e) {
+ return 1;
+ }
+ try {
+ p2 = Integer.parseInt(c2.getAttribute("priority"));
+ if (p2 <= 0) {
+ return -1;
+ }
+ } catch (NumberFormatException e) {
+ return -1;
+ }
+ return p1 < p2 ? -1 : 1;
+ }
+ });
+
+ for (IConfigurationElement config : configList) {
+ try {
+ Object obj = config.createExecutableExtension("shortcut"); //$NON-NLS-1$
+ if (obj instanceof ProfileLaunchShortcut) {
+ return (ProfileLaunchShortcut) obj;
+ }
+ } catch (CoreException e) {
+ // continue, other configuration may succeed
+ }
+ }
return null;
}
diff --git a/profiling/org.eclipse.linuxtools.profiling.snapshot/src/org/eclipse/linuxtools/profiling/snapshot/SnapshotOptionsTab.java b/profiling/org.eclipse.linuxtools.profiling.snapshot/src/org/eclipse/linuxtools/profiling/snapshot/SnapshotOptionsTab.java
index c3c11d78fb..3c6d0f739a 100644
--- a/profiling/org.eclipse.linuxtools.profiling.snapshot/src/org/eclipse/linuxtools/profiling/snapshot/SnapshotOptionsTab.java
+++ b/profiling/org.eclipse.linuxtools.profiling.snapshot/src/org/eclipse/linuxtools/profiling/snapshot/SnapshotOptionsTab.java
@@ -67,6 +67,7 @@ public class SnapshotOptionsTab extends ProfileLaunchConfigurationTab {
// initialize all tab widgets based on the configuration
initializeFrom(initial);
+ top.layout();
}
});
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.doc/Linux_Tools_Project/Valgrind/User_Guide/Remote-Valgrind.html b/valgrind/org.eclipse.linuxtools.valgrind.doc/Linux_Tools_Project/Valgrind/User_Guide/Remote-Valgrind.html
new file mode 100644
index 0000000000..50c5df7d50
--- /dev/null
+++ b/valgrind/org.eclipse.linuxtools.valgrind.doc/Linux_Tools_Project/Valgrind/User_Guide/Remote-Valgrind.html
@@ -0,0 +1,65 @@
+<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+ <title>Valgrind User Guide - Remote Valgrind</title>
+ <link type="text/css" rel="stylesheet" href="../../../book.css"/>
+ </head>
+ <body>
+ <table class="navigation" style="width: 100%;" border="0" summary="navigation">
+ <tr>
+ <th style="width: 100%" align="center" colspan="3">Remote Valgrind</th>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left">
+ <a href="Using-Helgrind.html" title="Using Helgrind">
+ <img alt="Previous" border="0" src="../../../images/prev.gif"/>
+ </a>
+ </td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right">
+ <a href="Special-Cases.html" title="Special Cases">
+ <img alt="Next" border="0" src="../../../images/next.gif"/>
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left" valign="top">Using Helgrind</td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right" valign="top">Special Cases</td>
+ </tr>
+ </table><hr/>
+ <h1 id="Remote_Valgrind">Remote Valgrind</h1>
+ <p>You can profile remote projects just as local ones. This can be useful when developing an application for a different architecture.</p>
+ <p>To run Valgrind remotely, right-click a remote c/c++ project and navigate to "Profile As", then "Profile Configurations". In the new window, double-click the Profile with Valgrind (remote) profile configuration. </p>
+ <p>In the main tab, click "Browse" under "C/C++ executable" to choose the binary that will be executed. The same tool configurations for local projects apply to remote ones. </p>
+ <p>
+ <img border="0" src="images/Screenshot-main-remote-valgrind.png"/>
+ </p>
+ <p>After configuring the profile, click the Profile button to launch the profile. Results will be displayed in the same Valgrind view previously described.</p><hr/>
+ <table class="navigation" style="width: 100%;" border="0" summary="navigation">
+ <tr>
+ <td style="width: 20%" align="left">
+ <a href="Using-Helgrind.html" title="Using Helgrind">
+ <img alt="Previous" border="0" src="../../../images/prev.gif"/>
+ </a>
+ </td>
+ <td style="width: 60%" align="center">
+ <a href="User-Guide.html" title="Valgrind User Guide">
+ <img alt="Valgrind User Guide" border="0" src="../../../images/home.gif"/>
+ </a>
+ </td>
+ <td style="width: 20%" align="right">
+ <a href="Special-Cases.html" title="Special Cases">
+ <img alt="Next" border="0" src="../../../images/next.gif"/>
+ </a>
+ </td>
+ </tr>
+ <tr>
+ <td style="width: 20%" align="left" valign="top">Using Helgrind</td>
+ <td style="width: 60%" align="center"></td>
+ <td style="width: 20%" align="right" valign="top">Special Cases</td>
+ </tr>
+ </table>
+ </body>
+</html> \ No newline at end of file
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.doc/Linux_Tools_Project/Valgrind/User_Guide/Special-Cases.html b/valgrind/org.eclipse.linuxtools.valgrind.doc/Linux_Tools_Project/Valgrind/User_Guide/Special-Cases.html
index c12ec0cca2..3e4cea4db4 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.doc/Linux_Tools_Project/Valgrind/User_Guide/Special-Cases.html
+++ b/valgrind/org.eclipse.linuxtools.valgrind.doc/Linux_Tools_Project/Valgrind/User_Guide/Special-Cases.html
@@ -12,7 +12,7 @@
</tr>
<tr>
<td style="width: 20%" align="left">
- <a href="Using-Helgrind.html" title="Using Helgrind">
+ <a href="Remote-Valgrind.html" title="Remote Valgrind">
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
</a>
</td>
@@ -24,7 +24,7 @@
</td>
</tr>
<tr>
- <td style="width: 20%" align="left" valign="top">Using Helgrind</td>
+ <td style="width: 20%" align="left" valign="top">Remote Valgrind</td>
<td style="width: 60%" align="center"></td>
<td style="width: 20%" align="right" valign="top">Updating This Document</td>
</tr>
@@ -59,7 +59,7 @@
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
<tr>
<td style="width: 20%" align="left">
- <a href="Using-Helgrind.html" title="Using Helgrind">
+ <a href="Remote-Valgrind.html" title="Remote Valgrind">
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
</a>
</td>
@@ -75,7 +75,7 @@
</td>
</tr>
<tr>
- <td style="width: 20%" align="left" valign="top">Using Helgrind</td>
+ <td style="width: 20%" align="left" valign="top">Remote Valgrind</td>
<td style="width: 60%" align="center"></td>
<td style="width: 20%" align="right" valign="top">Updating This Document</td>
</tr>
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.doc/Linux_Tools_Project/Valgrind/User_Guide/Using-Helgrind.html b/valgrind/org.eclipse.linuxtools.valgrind.doc/Linux_Tools_Project/Valgrind/User_Guide/Using-Helgrind.html
index 1879510f5b..0ea84c6e77 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.doc/Linux_Tools_Project/Valgrind/User_Guide/Using-Helgrind.html
+++ b/valgrind/org.eclipse.linuxtools.valgrind.doc/Linux_Tools_Project/Valgrind/User_Guide/Using-Helgrind.html
@@ -18,7 +18,7 @@
</td>
<td style="width: 60%" align="center"></td>
<td style="width: 20%" align="right">
- <a href="Special-Cases.html" title="Special Cases">
+ <a href="Remote-Valgrind.html" title="Remote Valgrind">
<img alt="Next" border="0" src="../../../images/next.gif"/>
</a>
</td>
@@ -26,7 +26,7 @@
<tr>
<td style="width: 20%" align="left" valign="top">Using Cachegrind</td>
<td style="width: 60%" align="center"></td>
- <td style="width: 20%" align="right" valign="top">Special Cases</td>
+ <td style="width: 20%" align="right" valign="top">Remote Valgrind</td>
</tr>
</table><hr/>
<h1 id="Using_Helgrind">Using Helgrind</h1>
@@ -37,7 +37,7 @@
<p>All the synchronization errors found by Helgrind are displayed in the Valgrind view, which appears automatically after a profile run. Each displayed error can be expanded in the Valgrind view to display its stack trace.</p>
<p>
<br/>
- <img border="0" src="images/HelgrindOutput.png"/>
+ <img border="0" src="images/HelgrindOutput2.png"/>
</p>
<p>In some cases, Helgrind can determine which section of the source code causes a reported error. Whenever this is the case, double-clicking on the stack trace of the reported error will open the related source file and place the cursor on the line responsible for the error. This stack trace view is similar to the view that the Memcheck plug-in provides. </p>
<h2 id="Configuring_a_Helgrind_Profile_Run">Configuring a Helgrind Profile Run</h2>
@@ -96,7 +96,7 @@
</a>
</td>
<td style="width: 20%" align="right">
- <a href="Special-Cases.html" title="Special Cases">
+ <a href="Remote-Valgrind.html" title="Remote Valgrind">
<img alt="Next" border="0" src="../../../images/next.gif"/>
</a>
</td>
@@ -104,7 +104,7 @@
<tr>
<td style="width: 20%" align="left" valign="top">Using Cachegrind</td>
<td style="width: 60%" align="center"></td>
- <td style="width: 20%" align="right" valign="top">Special Cases</td>
+ <td style="width: 20%" align="right" valign="top">Remote Valgrind</td>
</tr>
</table>
</body>
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.doc/Linux_Tools_Project/Valgrind/User_Guide/images/HelgrindOutput2.png b/valgrind/org.eclipse.linuxtools.valgrind.doc/Linux_Tools_Project/Valgrind/User_Guide/images/HelgrindOutput2.png
new file mode 100644
index 0000000000..500db6b17e
--- /dev/null
+++ b/valgrind/org.eclipse.linuxtools.valgrind.doc/Linux_Tools_Project/Valgrind/User_Guide/images/HelgrindOutput2.png
Binary files differ
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.doc/Linux_Tools_Project/Valgrind/User_Guide/images/Screenshot-main-remote-valgrind.png b/valgrind/org.eclipse.linuxtools.valgrind.doc/Linux_Tools_Project/Valgrind/User_Guide/images/Screenshot-main-remote-valgrind.png
new file mode 100644
index 0000000000..20c280cc32
--- /dev/null
+++ b/valgrind/org.eclipse.linuxtools.valgrind.doc/Linux_Tools_Project/Valgrind/User_Guide/images/Screenshot-main-remote-valgrind.png
Binary files differ
diff --git a/valgrind/org.eclipse.linuxtools.valgrind.doc/toc.xml b/valgrind/org.eclipse.linuxtools.valgrind.doc/toc.xml
index 3bb6786889..700fcc83ad 100644
--- a/valgrind/org.eclipse.linuxtools.valgrind.doc/toc.xml
+++ b/valgrind/org.eclipse.linuxtools.valgrind.doc/toc.xml
@@ -31,6 +31,7 @@
<topic href="Linux_Tools_Project/Valgrind/User_Guide/Using-Helgrind.html#Analyzing_Helgrind_Profile_Results" label="Analyzing Helgrind Profile Results"></topic>
<topic href="Linux_Tools_Project/Valgrind/User_Guide/Using-Helgrind.html#Configuring_a_Helgrind_Profile_Run" label="Configuring a Helgrind Profile Run"></topic>
</topic>
+ <topic href="Linux_Tools_Project/Valgrind/User_Guide/Remote-Valgrind.html" label="Remote Valgrind"></topic>
<topic href="Linux_Tools_Project/Valgrind/User_Guide/Special-Cases.html" label="Special Cases">
<topic href="Linux_Tools_Project/Valgrind/User_Guide/Special-Cases.html#Encountering_Errors" label="Encountering Errors"></topic>
<topic href="Linux_Tools_Project/Valgrind/User_Guide/Special-Cases.html#Profiling_Child_Processes" label="Profiling Child Processes"></topic>

Back to the top