Skip to content

Commit d0fea49

Browse files
committed
Merge branch 'master' of ssh://git.eclipse.org/gitroot/linuxtools/org.eclipse.linuxtools
2 parents 2443079 + 02ddf6e commit d0fea49

File tree

188 files changed

+113
-74
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

188 files changed

+113
-74
lines changed

gcov/org.eclipse.linuxtools.gcov-feature/feature.xml

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -35,32 +35,4 @@
3535
version="0.0.0"
3636
unpack="false"/>
3737

38-
<plugin
39-
id="org.eclipse.linuxtools.binutils"
40-
download-size="0"
41-
install-size="0"
42-
version="0.0.0"
43-
unpack="false"/>
44-
45-
<plugin
46-
id="org.eclipse.linuxtools.dataviewers"
47-
download-size="0"
48-
install-size="0"
49-
version="0.0.0"
50-
unpack="false"/>
51-
52-
<plugin
53-
id="org.eclipse.linuxtools.dataviewers.charts"
54-
download-size="0"
55-
install-size="0"
56-
version="0.0.0"
57-
unpack="false"/>
58-
59-
<plugin
60-
id="org.eclipse.linuxtools.dataviewers.annotatedsourceeditor"
61-
download-size="0"
62-
install-size="0"
63-
version="0.0.0"
64-
unpack="false"/>
65-
6638
</feature>

gcov/pom.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@
5858
</build>
5959

6060
<modules>
61-
<module>org.eclipse.linuxtools.dataviewers.annotatedsourceeditor</module>
62-
<module>org.eclipse.linuxtools.dataviewers.charts</module>
6361
<module>org.eclipse.linuxtools.gcov</module>
6462
<module>org.eclipse.linuxtools.gcov.docs</module>
6563
<module>org.eclipse.linuxtools.gcov-feature</module>

gprof/org.eclipse.linuxtools.gprof-feature/feature.xml

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -35,25 +35,4 @@
3535
version="0.0.0"
3636
unpack="false"/>
3737

38-
<plugin
39-
id="org.eclipse.linuxtools.binutils"
40-
download-size="0"
41-
install-size="0"
42-
version="0.0.0"
43-
unpack="false"/>
44-
45-
<plugin
46-
id="org.eclipse.linuxtools.dataviewers"
47-
download-size="0"
48-
install-size="0"
49-
version="0.0.0"
50-
unpack="false"/>
51-
52-
<plugin
53-
id="org.eclipse.linuxtools.dataviewers.charts"
54-
download-size="0"
55-
install-size="0"
56-
version="0.0.0"
57-
unpack="false"/>
58-
5938
</feature>

gprof/pom.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,6 @@
5858
</build>
5959

6060
<modules>
61-
<module>org.eclipse.linuxtools.binutils</module>
62-
<module>org.eclipse.linuxtools.dataviewers</module>
6361
<module>org.eclipse.linuxtools.gprof</module>
6462
<module>org.eclipse.linuxtools.gprof.docs</module>
6563
<module>org.eclipse.linuxtools.gprof-feature</module>

oprofile/org.eclipse.linuxtools.oprofile.core/ChangeLog

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
2011-07-06 Severin Gehwolf <[email protected]>
2+
3+
* src/org/eclipse/linuxtools/oprofile/core/linux/LinuxOpcontrolProvider.java (_runOpcontrol): Provide hints
4+
in error log if opcontrol errors are detected.
5+
* src/org/eclipse/linuxtools/oprofile/core/OprofileCorePlugin.java (log): Added logging methods.
6+
7+
18
2011-06-01 Severin Gehwolf <[email protected]>
29

310
* src/org/eclipse/linuxtools/oprofile/core/linux/LinuxOpcontrolProvider.java (_runOpcontrol): Add print

oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/OprofileCorePlugin.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,4 +158,26 @@ public static boolean isDebugMode() {
158158
&& Platform.getDebugOption(OprofileCorePlugin.getId()
159159
+ "/debug") != null; //$NON-NLS-1$
160160
}
161+
162+
/**
163+
* Log a string message with the given severity in the error log.
164+
*
165+
* @param severity
166+
* @param msg
167+
*/
168+
public static void log(int severity, String msg) {
169+
plugin.getLog().log(new Status(severity, PLUGIN_ID, Status.OK, msg, null));
170+
}
171+
172+
/**
173+
* Log an exception in the error log.
174+
*
175+
* @param severity
176+
* @param msg
177+
* @param cause
178+
*/
179+
public static void log(int severity, String msg, Throwable cause) {
180+
plugin.getLog().log(new Status(severity, PLUGIN_ID, Status.OK, msg, cause));
181+
}
182+
161183
}

oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/linux/LinuxOpcontrolProvider.java

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,12 @@
2121
import org.eclipse.core.runtime.FileLocator;
2222
import org.eclipse.core.runtime.Path;
2323
import org.eclipse.core.runtime.Platform;
24+
import org.eclipse.core.runtime.Status;
2425
import org.eclipse.linuxtools.oprofile.core.IOpcontrolProvider;
2526
import org.eclipse.linuxtools.oprofile.core.OpcontrolException;
2627
import org.eclipse.linuxtools.oprofile.core.Oprofile;
2728
import org.eclipse.linuxtools.oprofile.core.OprofileCorePlugin;
29+
import org.eclipse.linuxtools.oprofile.core.OprofileProperties;
2830
import org.eclipse.linuxtools.oprofile.core.daemon.OprofileDaemonEvent;
2931
import org.eclipse.linuxtools.oprofile.core.daemon.OprofileDaemonOptions;
3032
import org.eclipse.linuxtools.oprofile.core.opxml.sessions.SessionManager;
@@ -284,25 +286,42 @@ private boolean _runOpcontrol(ArrayList<String> args) throws OpcontrolException
284286
stdout.close();
285287
errout.close();
286288

287-
// give some hints which may be helpful for discovering the real
288-
// reason of weird problems.
289-
if (OprofileCorePlugin.isDebugMode()) {
289+
int ret = p.waitFor();
290+
if (ret != 0) {
291+
// give some hints which may be helpful for discovering the real
292+
// reason of weird problems.
293+
boolean extraInfo = false;
294+
290295
if (!errOutput.equals("")) { //$NON-NLS-1$
291-
System.err.println(OprofileCorePlugin.DEBUG_PRINT_PREFIX + errOutput);
296+
extraInfo = true;
297+
OprofileCorePlugin
298+
.log(Status.ERROR,
299+
OprofileProperties
300+
.getString("opcontrol.error.log.stderr") + ": " + errOutput); //$NON-NLS-1$
292301
}
293302
if (!output.equals("")) { //$NON-NLS-1$
294-
System.out.println(OprofileCorePlugin.DEBUG_PRINT_PREFIX + output);
303+
extraInfo = true;
304+
OprofileCorePlugin
305+
.log(Status.ERROR, // log as error, since stderr output might be masked as stdout
306+
OprofileProperties
307+
.getString("opcontrol.error.log.stdout") + ": " + output); //$NON-NLS-1$
295308
}
296-
}
297-
298-
int ret = p.waitFor();
299-
if (ret != 0) {
309+
300310
// Red Hat BZ #694631: NMI Watchdog problem.
301311
// Give better advice as to what the problem might be.
302312
if (output.contains("nmi_watchdog") && output.startsWith("Error:")) { //$NON-NLS-1$ $NON-NLS-2$
303-
throw new OpcontrolException(OprofileCorePlugin.createErrorStatus("opcontrolNmiWatchdog", null)); //$NON-NLS-1$
313+
throw new OpcontrolException(
314+
OprofileCorePlugin.createErrorStatus(
315+
"opcontrolNmiWatchdog", null)); //$NON-NLS-1$
316+
} else if (extraInfo) {
317+
throw new OpcontrolException(
318+
OprofileCorePlugin
319+
.createErrorStatus(
320+
"opcontrolNonZeroExitCodeExtraInfo", null)); //$NON-NLS-1$
304321
} else {
305-
throw new OpcontrolException(OprofileCorePlugin.createErrorStatus("opcontrolNonZeroExitCode", null)); //$NON-NLS-1$
322+
throw new OpcontrolException(
323+
OprofileCorePlugin.createErrorStatus(
324+
"opcontrolNonZeroExitCode", null)); //$NON-NLS-1$
306325
}
307326
}
308327

oprofile/org.eclipse.linuxtools.oprofile.core/src/org/eclipse/linuxtools/oprofile/core/oprofile.properties

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ oprofileInit.error.statusMessage=An error occurred initializing OProfile for use
1717
oprofileInit.error.dialog.title=Error initializing OProfile
1818
oprofileInit.error.dialog.message=FATAL: The OProfile kernel module could not be loaded.
1919

20+
opcontrol.error.log.stderr=opcontrol process error output
21+
opcontrol.error.log.stdout=opcontrol process output
22+
2023
opcontrolRun.error.statusMessage=Error during run of opcontrol
24+
opcontrolNonZeroExitCodeExtraInfo.error.statusMessage=Exit code of opcontrol indicates failure.\nLook for additional information in the Error Log.
2125
opcontrolNonZeroExitCode.error.statusMessage=Exit code of opcontrol indicates failure.\nIf this system does not have /usr/bin/consolehelper, make sure you have added\nthe following line to /etc/sudoers:\n<username> ALL=(ALL) NOPASSWD: <path to opcontrol, e.g. /usr/bin/opcontrol>
2226
opcontrolNmiWatchdog.error.statusMessage=Error: counter 0 not available\nnmi_watchdog using this resource?\nTry:\nopcontrol --deinit\necho 0 > /proc/sys/kernel/nmi_watchdog\nin a Terminal. Then try profiling your binary again.
2327

0 commit comments

Comments
 (0)