DESCRIPTION

TMF: Fix the state of processes in the LTTng Kernel Analysis Module

A process with prev_state=1024 was shown as blocked, while it is actually
ready to be run on CPU, so that state must be ignored.

Change-Id: I0f2e7acd05e1592e5a91d898869a9a82ad66ead1
Signed-off-by: Aryana Jones xxx@xxx.xxx


COMMENTS

author: Annalise Jimenez
date: 2014-10-09 21:24:11.000000000

Uploaded patch set 1.

-------------------------------------
author: Brenden Conley
date: 2014-10-09 21:24:17.000000000

Patch Set 1:

Build Started https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/9194/

-------------------------------------
author: Annalise Jimenez
date: 2014-10-09 21:25:45.000000000

Patch Set 1:

Alex, I think this patch should be worth going in 3.2 here

-------------------------------------
author: Brenden Conley
date: 2014-10-09 22:08:24.000000000

Patch Set 1: Verified+1

Build Successful 

https://hudson.eclipse.org/linuxtools/job/linuxtools-gerrit/9194/ : SUCCESS

-------------------------------------
author: Braxton Mccarthy
date: 2014-10-09 23:15:10.000000000

Patch Set 1: Code-Review-1

(3 comments)

Is it documented anywhere what TASK_MAX_STATE is? It's not very clear just from the name ;) Is it a really common case though? I don't mind it going in 3.2, but the "cutoff" is very very soon...

Also, don't forget to bump the VERSION constant in that file, to ensure a new history is rebuilt.

Line:7, /COMMIT_MSG -> it's not TMF:, it's lttng: in this case (the component affected by this change)

Line:239, lttng/org.eclipse.linuxtools.lttng2.kernel.core/src/org/eclipse/linuxtools/internal/lttng2/kernel/core/stateprovider/LttngKernelStateProvider.java -> don't use javadoc comments for in-line comments!

Line:255, lttng/org.eclipse.linuxtools.lttng2.kernel.core/src/org/eclipse/linuxtools/internal/lttng2/kernel/core/stateprovider/LttngKernelStateProvider.java -> These could be defined in a new interface in internal.lttng2.kernel.core, LinuxStrings or similar. (Although those are not technically strings here...)

-------------------------------------
author: Annalise Jimenez
date: 2014-10-10 01:42:11.000000000

Patch Set 1:

(2 comments)

> Is it documented anywhere what TASK_MAX_STATE is?

You know how the linux kernel is, no it's not. But Francis and I searched the linux code to try to understand what it did and the only place it's really used is to OR it with TASK_RUNNING when some preempt count thing reaches... whatever... and put that in prev_state. So in a way, we did our homework ;-)

> Is it a really common case though? 

I don't know, we actually noticed it while studying one of the demo trace where I have 6 qemu processes that share 4 CPU, so they preempt each other all the time, but the control flow view showed them as wait_blocked, while they should be in wait_for_cpu state, and the prev_state was 1024.

If you're interested, see in traces http://secretaire.dorsal.polymtl.ca/~gbastien/tracingSummit2014/mpi_traces.tgz in vmnet/localhost/kernel, the 6 qemu processes. This is the case we noticed it in, but it might actually be a quite common case for heavy loads that went unnoticed so far... Would have to check.

> I don't mind it going in 3.2, but the "cutoff" is very very soon...

Is there a clear cutoff? Or won't we cherry-pick patches from TraceCompass that fix stuff, like this one.

Line:239, lttng/org.eclipse.linuxtools.lttng2.kernel.core/src/org/eclipse/linuxtools/internal/lttng2/kernel/core/stateprovider/LttngKernelStateProvider.java -> Yeah, but for the <pre> to work, they have to be in javadoc otherwise ctrl-shift-f makes it look bad

Line:255, lttng/org.eclipse.linuxtools.lttng2.kernel.core/src/org/eclipse/linuxtools/internal/lttng2/kernel/core/stateprovider/LttngKernelStateProvider.java -> I thought so, but then again, it's really sched_switch specific, but yeah, some kind of lttngKernelConstant interface could be a good place.

-------------------------------------
author: Annalise Jimenez
date: 2014-10-10 02:32:46.000000000

Patch Set 1: Code-Review-2

With further review of some traces, this patch is not correct either. The process should definitely not be in a blocked state, but it is not quite waiting for cpu either, since I have some cases where it is waiting for cpu for very long times and CPU are available for it to run. We'll need to further investigate the meaning of this. There's a bug, but this is not the solution.

-------------------------------------
author: Annalise Jimenez
date: 2014-10-24 18:53:43.000000000

Abandoned

Moved to trace compass

-------------------------------------
