aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFran├žois Rajotte2013-07-12 11:08:03 (EDT)
committerAlexandre Montplaisir2013-07-18 13:56:10 (EDT)
commit0b0a612647624d20685be6def20a72eba6576086 (patch)
tree06049c6f75dccb83b22c9a1d2adc0708f7882bf7
parent91f433812bbbe3fa4cc0732748093077d2ee822c (diff)
downloadorg.eclipse.linuxtools-0b0a612647624d20685be6def20a72eba6576086.zip
org.eclipse.linuxtools-0b0a612647624d20685be6def20a72eba6576086.tar.gz
org.eclipse.linuxtools-0b0a612647624d20685be6def20a72eba6576086.tar.bz2
Modify LTTng state provider to ignore scheduler wakeups on already-running processesrefs/changes/18/14518/3
Change-Id: I537caf33c348833de65a2836138f694d80a0c4fe Signed-off-by: Fran├žois Rajotte <francois.rajotte@polymtl.ca> Signed-off-by: Alexandre Montplaisir <alexmonthy@voxpopuli.im> Reviewed-on: https://git.eclipse.org/r/14518 Tested-by: Hudson CI
-rw-r--r--lttng/org.eclipse.linuxtools.lttng2.kernel.core/src/org/eclipse/linuxtools/internal/lttng2/kernel/core/stateprovider/LttngKernelStateProvider.java14
1 files changed, 10 insertions, 4 deletions
diff --git a/lttng/org.eclipse.linuxtools.lttng2.kernel.core/src/org/eclipse/linuxtools/internal/lttng2/kernel/core/stateprovider/LttngKernelStateProvider.java b/lttng/org.eclipse.linuxtools.lttng2.kernel.core/src/org/eclipse/linuxtools/internal/lttng2/kernel/core/stateprovider/LttngKernelStateProvider.java
index 5f62847..38bf88f 100644
--- a/lttng/org.eclipse.linuxtools.lttng2.kernel.core/src/org/eclipse/linuxtools/internal/lttng2/kernel/core/stateprovider/LttngKernelStateProvider.java
+++ b/lttng/org.eclipse.linuxtools.lttng2.kernel.core/src/org/eclipse/linuxtools/internal/lttng2/kernel/core/stateprovider/LttngKernelStateProvider.java
@@ -44,7 +44,7 @@ public class LttngKernelStateProvider extends AbstractTmfStateProvider {
* Version number of this state provider. Please bump this if you modify the
* contents of the generated state history in some way.
*/
- private static final int VERSION = 2;
+ private static final int VERSION = 3;
/* Event names HashMap. TODO: This can be discarded once we move to Java 7 */
private final HashMap<String, Integer> knownEventNames;
@@ -414,11 +414,17 @@ public class LttngKernelStateProvider extends AbstractTmfStateProvider {
/*
* The process indicated in the event's payload is now ready to
- * run. Assign it to the "wait for cpu" state.
+ * run. Assign it to the "wait for cpu" state, but only if it
+ * was not already running.
*/
quark = ss.getQuarkRelativeAndAdd(threadNode, Attributes.STATUS);
- value = StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE;
- ss.modifyAttribute(ts, value, quark);
+ int status = ss.queryOngoingState(quark).unboxInt();
+
+ if (status != StateValues.PROCESS_STATUS_RUN_SYSCALL &&
+ status != StateValues.PROCESS_STATUS_RUN_USERMODE) {
+ value = StateValues.PROCESS_STATUS_WAIT_FOR_CPU_VALUE;
+ ss.modifyAttribute(ts, value, quark);
+ }
}
break;