aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOtavio Pontes2011-08-11 11:03:42 (EDT)
committerRoland Grunberg2011-08-11 11:03:42 (EDT)
commit40a1d6661fadc9b72fcf73bddd0e10b588e9a738 (patch)
tree744c03994c09867c760b1394dc621b0671c7cf04
parentd51321ee6aaf1471342ea2d79293d841f72e6c93 (diff)
downloadorg.eclipse.linuxtools-40a1d6661fadc9b72fcf73bddd0e10b588e9a738.zip
org.eclipse.linuxtools-40a1d6661fadc9b72fcf73bddd0e10b588e9a738.tar.gz
org.eclipse.linuxtools-40a1d6661fadc9b72fcf73bddd0e10b588e9a738.tar.bz2
Modify verbosity flag to accept levels of verbosity.
Bug #353809
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/ChangeLog5
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/LaunchConfigurationConstants.java2
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch/ChangeLog7
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/ConfigurationOptionsSetter.java15
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/SystemTapOptionsTab.java26
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/messages.properties2
6 files changed, 40 insertions, 17 deletions
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/ChangeLog b/systemtap/org.eclipse.linuxtools.callgraph.core/ChangeLog
index 8fa121b..a9e046b 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/ChangeLog
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/ChangeLog
@@ -1,3 +1,8 @@
+2011-08-11 Roland Grunberg <rgrunber@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/core/LaunchConfigurationConstants.java:
+ Modify verbosity.
+
2010-06-02 Roland Grunberg <rgrunber@redhat.com>
* plugin.properties: Externalize some strings in the Manifest.
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/LaunchConfigurationConstants.java b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/LaunchConfigurationConstants.java
index ef019fe..fde2a65 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/LaunchConfigurationConstants.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/callgraph/core/LaunchConfigurationConstants.java
@@ -59,7 +59,7 @@ public final class LaunchConfigurationConstants {
public static final String COMMAND = ".COMMAND"; //$NON-NLS-1$
//Defaults
- public static final boolean DEFAULT_COMMAND_VERBOSE = false;
+ public static final int DEFAULT_COMMAND_VERBOSE = 0;
public static final int DEFAULT_COMMAND_PASS = 0;
public static final boolean DEFAULT_COMMAND_KEEP_TEMPORARY = false;
public static final boolean DEFAULT_COMMAND_GURU = false;
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch/ChangeLog b/systemtap/org.eclipse.linuxtools.callgraph.launch/ChangeLog
index b6de491..4bdb9ed 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch/ChangeLog
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch/ChangeLog
@@ -1,3 +1,10 @@
+2011-08-11 Roland Grunberg <rgrunber@redhat.com>
+
+ * src/org/eclipse/linuxtools/callgraph/launch/SystemTapOptionsTab.java:
+ Set up verbosity level.
+ * src/org/eclipse/linuxtools/callgraph/launch/ConfigurationOptionsSetter.java:
+ Handle verbosity level.
+
2011-08-10 Roland Grunberg <rgrunber@redhat.com>
* src/org/eclipse/linuxtools/callgraph/launch/SystemTapLaunchShortcut.java:
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/ConfigurationOptionsSetter.java b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/ConfigurationOptionsSetter.java
index 7154f2b..9e44e50 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/ConfigurationOptionsSetter.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/ConfigurationOptionsSetter.java
@@ -26,10 +26,17 @@ public class ConfigurationOptionsSetter {
public static String setOptions(ILaunchConfiguration config) {
StringBuilder options = new StringBuilder(); //$NON-NLS-1$
try {
- if (config.getAttribute(LaunchConfigurationConstants.COMMAND_VERBOSE,
- LaunchConfigurationConstants.DEFAULT_COMMAND_VERBOSE)) {
- options.append("-v "); //$NON-NLS-1$
- }
+
+ int verboseLevel = config.getAttribute(LaunchConfigurationConstants.COMMAND_VERBOSE,
+ LaunchConfigurationConstants.DEFAULT_COMMAND_VERBOSE);
+ if (verboseLevel > 0) {
+ StringBuilder builder = new StringBuilder();
+ builder.append("-"); //$NON-NLS-1$
+ for (int i = 0; i < verboseLevel; i++)
+ builder.append("v"); //$NON-NLS-1$
+ builder.append(" "); //$NON-NLS-1$
+ options.append(builder.toString());
+ }
if (config.getAttribute(LaunchConfigurationConstants.COMMAND_PASS,
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/SystemTapOptionsTab.java b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/SystemTapOptionsTab.java
index 896e9e8..535634e 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/SystemTapOptionsTab.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/SystemTapOptionsTab.java
@@ -98,7 +98,6 @@ public class SystemTapOptionsTab extends AbstractLaunchConfigurationTab{
protected Button viewerButton;
- protected Button button_v;
protected Button button_k;
protected Button button_u;
protected Button button_w;
@@ -119,6 +118,7 @@ public class SystemTapOptionsTab extends AbstractLaunchConfigurationTab{
protected Spinner button_p_Spinner;
protected Spinner button_s_Spinner;
protected Spinner button_x_Spinner;
+ protected Spinner button_v_Spinner;
private Button useColourButton;
// private Button generateScriptButton;
@@ -662,13 +662,6 @@ public class SystemTapOptionsTab extends AbstractLaunchConfigurationTab{
buttonsTop.setLayoutData(buttonsData);
- button_v = new Button(buttonsTop, SWT.CHECK);
- button_v.setText(Messages.getString("SystemTapOptionsTab.18")); //$NON-NLS-1$
- button_v.addSelectionListener(selectListener);
- button_v.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- button_v.setToolTipText(Messages.getString("SystemTapOptionsTab.2") + //$NON-NLS-1$
- Messages.getString("SystemTapOptionsTab.4")); //$NON-NLS-1$
-
button_k = new Button(buttonsTop, SWT.CHECK);
button_k.setText(Messages.getString("SystemTapOptionsTab.20")); //$NON-NLS-1$
button_k.addSelectionListener(selectListener);
@@ -678,7 +671,6 @@ public class SystemTapOptionsTab extends AbstractLaunchConfigurationTab{
Messages.getString("SystemTapOptionsTab.6") + //$NON-NLS-1$
Messages.getString("SystemTapOptionsTab.7")); //$NON-NLS-1$
-
button_g = new Button(buttonsTop, SWT.CHECK);
button_g.setText(Messages.getString("SystemTapOptionsTab.21")); //$NON-NLS-1$
button_g.addSelectionListener(selectListener);
@@ -792,6 +784,18 @@ public class SystemTapOptionsTab extends AbstractLaunchConfigurationTab{
Messages.getString("SystemTapOptionsTab.39") + //$NON-NLS-1$
Messages.getString("SystemTapOptionsTab.40")); //$NON-NLS-1$
+ Composite button_v_Spinner_Top = new Composite(buttonsTop, SWT.NONE);
+ button_v_Spinner_Top.setLayout(new GridLayout(2, false));
+ Label button_v_Spinner_Label = new Label(button_v_Spinner_Top, SWT.NONE);
+ button_v_Spinner_Label.setText(Messages.getString("SystemTapOptionsTab.18")); //$NON-NLS-1$
+ button_v_Spinner = new Spinner(button_v_Spinner_Top, SWT.BORDER);
+ button_v_Spinner.setMaximum(3);
+ button_v_Spinner.addModifyListener(modifyListener);
+ button_v_Spinner.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
+ button_v_Spinner_Label.setToolTipText(
+ Messages.getString("SystemTapOptionsTab.2") + //$NON-NLS-1$
+ Messages.getString("SystemTapOptionsTab.4")); //$NON-NLS-1$
+
button_graphicsMode = new Button(buttonsTop, SWT.CHECK);
button_graphicsMode.setText(Messages.getString("SystemTapOptionsTab.3")); //$NON-NLS-1$
button_graphicsMode.addSelectionListener(graphicsModeListener);
@@ -828,7 +832,6 @@ public class SystemTapOptionsTab extends AbstractLaunchConfigurationTab{
workspacePath = location.toString();
try {
- button_v.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_VERBOSE, LaunchConfigurationConstants.DEFAULT_COMMAND_VERBOSE));
button_k.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_KEEP_TEMPORARY, LaunchConfigurationConstants.DEFAULT_COMMAND_KEEP_TEMPORARY));
button_u.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_NO_CODE_ELISION, LaunchConfigurationConstants.DEFAULT_COMMAND_NO_CODE_ELISION));
button_w.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_DISABLE_WARNINGS, LaunchConfigurationConstants.DEFAULT_COMMAND_DISABLE_WARNINGS));
@@ -842,6 +845,7 @@ public class SystemTapOptionsTab extends AbstractLaunchConfigurationTab{
button_F.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_LEAVE_RUNNING, LaunchConfigurationConstants.DEFAULT_COMMAND_LEAVE_RUNNING));
button_s_Spinner.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_BUFFER_BYTES, LaunchConfigurationConstants.DEFAULT_COMMAND_BUFFER_BYTES));
button_x_Spinner.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_TARGET_PID, LaunchConfigurationConstants.DEFAULT_COMMAND_TARGET_PID));
+ button_v_Spinner.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_VERBOSE, LaunchConfigurationConstants.DEFAULT_COMMAND_VERBOSE));
button_p_Spinner.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_PASS, LaunchConfigurationConstants.DEFAULT_COMMAND_PASS));
button_D_text.setText(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_C_DIRECTIVES, LaunchConfigurationConstants.DEFAULT_COMMAND_C_DIRECTIVES));
@@ -874,7 +878,6 @@ public class SystemTapOptionsTab extends AbstractLaunchConfigurationTab{
getControl().setRedraw(false);
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_VERBOSE, button_v.getSelection());
configuration.setAttribute(LaunchConfigurationConstants.COMMAND_KEEP_TEMPORARY, button_k.getSelection());
configuration.setAttribute(LaunchConfigurationConstants.COMMAND_GURU, button_g.getSelection());
configuration.setAttribute(LaunchConfigurationConstants.COMMAND_PROLOGUE_SEARCH, button_P.getSelection());
@@ -889,6 +892,7 @@ public class SystemTapOptionsTab extends AbstractLaunchConfigurationTab{
configuration.setAttribute(LaunchConfigurationConstants.COMMAND_PASS, button_p_Spinner.getSelection());
configuration.setAttribute(LaunchConfigurationConstants.COMMAND_BUFFER_BYTES, button_s_Spinner.getSelection());
configuration.setAttribute(LaunchConfigurationConstants.COMMAND_TARGET_PID, button_x_Spinner.getSelection());
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_VERBOSE, button_v_Spinner.getSelection());
configuration.setAttribute(LaunchConfigurationConstants.PARSER_CLASS, parser.getText());
configuration.setAttribute(LaunchConfigurationConstants.VIEW_CLASS, viewer.getText());
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/messages.properties b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/messages.properties
index 72e1ce3..c0c9a3c 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/messages.properties
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/messages.properties
@@ -59,7 +59,7 @@ SystemTapOptionsTab.14=code in user script.
SystemTapOptionsTab.15=\ Use bulk mode (percpu files) for kernel-to-user data transfer.
SystemTapOptionsTab.16=Collect timing information on the number of times probe executes
SystemTapOptionsTab.17=and average amount of time spent in each probe.
-SystemTapOptionsTab.18=-v: Enable verbose mode
+SystemTapOptionsTab.18=Verbosity level (-v, -vv, -vvv)
SystemTapOptionsTab.19=Stop after pass \#
SystemTapOptionsTab.2=Increase verbosity for all passes. Produce a larger volume of
SystemTapOptionsTab.20=-k: Keep temporary directories