* We add the time from startTime until now to the cumulative
* time of the thread
*/
- if (startTime != null) {
- ITmfStateValue value = ss.queryOngoingState(cumulativeTimeQuark);
-
- /*
- * Modify cumulative time for this CPU/TID combo: The total
- * time changes when the process is scheduled out. Nothing
- * happens when the process is scheduled in.
- */
- long prevCumulativeTime = Math.max(0, value.unboxLong());
- long newCumulativeTime = prevCumulativeTime + (ts - startTime);
-
- value = TmfStateValue.newValueLong(newCumulativeTime);
- ss.modifyAttribute(ts, value, cumulativeTimeQuark);
- fLastStartTimes.put(cpu, ts);
- }
+ ITmfStateValue value = ss.queryOngoingState(cumulativeTimeQuark);
+
+ /*
+ * Modify cumulative time for this CPU/TID combo: The total time
+ * changes when the process is scheduled out. Nothing happens
+ * when the process is scheduled in.
+ */
+ long prevCumulativeTime = Math.max(0, value.unboxLong());
+ long newCumulativeTime = prevCumulativeTime + (ts - startTime);
+
+ value = TmfStateValue.newValueLong(newCumulativeTime);
+ ss.modifyAttribute(ts, value, cumulativeTimeQuark);
+ fLastStartTimes.put(cpu, ts);
+
} catch (AttributeNotFoundException e) {
Activator.getDefault().logError("Attribute not found in LttngKernelCpuStateProvider", e); //$NON-NLS-1$
}
* prev_state, string next_comm, int32 next_tid, int32 next_prio
*/
{
- Integer prevTid = ((Long) content.getField(fLayouts.get(event.getTrace()).fieldPrevTid()).getValue()).intValue();
- Integer nextTid = ((Long) content.getField(fLayouts.get(event.getTrace()).fieldNextTid()).getValue()).intValue();
-
- if (prevTid == null || nextTid == null) {
- break;
- }
+ int prevTid = ((Long) content.getField(fLayouts.get(event.getTrace()).fieldPrevTid()).getValue()).intValue();
+ int nextTid = ((Long) content.getField(fLayouts.get(event.getTrace()).fieldNextTid()).getValue()).intValue();
if (host.isGuest()) {
/* Get the event's CPU */