1 /*******************************************************************************
2 * Copyright (c) 2012 Ericsson
3 * Copyright (c) 2010, 2011 École Polytechnique de Montréal
4 * Copyright (c) 2010, 2011 Alexandre Montplaisir <alexandre.montplaisir@gmail.com>
6 * All rights reserved. This program and the accompanying materials are
7 * made available under the terms of the Eclipse Public License v1.0 which
8 * accompanies this distribution, and is available at
9 * http://www.eclipse.org/legal/epl-v10.html
11 *******************************************************************************/
13 package org
.eclipse
.linuxtools
.internal
.lttng2
.kernel
.core
.stateprovider
;
15 import java
.util
.HashMap
;
17 import org
.eclipse
.linuxtools
.internal
.lttng2
.kernel
.core
.Attributes
;
18 import org
.eclipse
.linuxtools
.internal
.lttng2
.kernel
.core
.LttngStrings
;
19 import org
.eclipse
.linuxtools
.internal
.lttng2
.kernel
.core
.StateValues
;
20 import org
.eclipse
.linuxtools
.tmf
.core
.ctfadaptor
.CtfTmfEvent
;
21 import org
.eclipse
.linuxtools
.tmf
.core
.ctfadaptor
.CtfTmfTrace
;
22 import org
.eclipse
.linuxtools
.tmf
.core
.event
.ITmfEvent
;
23 import org
.eclipse
.linuxtools
.tmf
.core
.event
.ITmfEventField
;
24 import org
.eclipse
.linuxtools
.tmf
.core
.exceptions
.AttributeNotFoundException
;
25 import org
.eclipse
.linuxtools
.tmf
.core
.exceptions
.StateValueTypeException
;
26 import org
.eclipse
.linuxtools
.tmf
.core
.exceptions
.TimeRangeException
;
27 import org
.eclipse
.linuxtools
.tmf
.core
.statesystem
.AbstractStateChangeInput
;
28 import org
.eclipse
.linuxtools
.tmf
.core
.statesystem
.IStateSystemBuilder
;
29 import org
.eclipse
.linuxtools
.tmf
.core
.statevalue
.ITmfStateValue
;
30 import org
.eclipse
.linuxtools
.tmf
.core
.statevalue
.TmfStateValue
;
33 * This is the state change input plugin for TMF's state system which handles
34 * the LTTng 2.0 kernel traces in CTF format.
36 * It uses the reference handler defined in CTFKernelHandler.java.
41 public class CtfKernelStateInput
extends AbstractStateChangeInput
{
43 /* Event names HashMap. TODO: This can be discarded once we move to Java 7 */
44 private final HashMap
<String
, Integer
> knownEventNames
;
46 /* Common locations in the attribute tree */
47 private int cpusNode
= -1;
48 private int threadsNode
= -1;
49 private int irqsNode
= -1;
50 private int softIrqsNode
= -1;
54 * Instantiate a new state provider plugin.
57 * The LTTng 2.0 kernel trace directory
59 public CtfKernelStateInput(CtfTmfTrace trace
) {
61 knownEventNames
= fillEventNames();
65 public void assignTargetStateSystem(IStateSystemBuilder ssb
) {
66 /* We can only set up the locations once the state system is assigned */
67 super.assignTargetStateSystem(ssb
);
68 setupCommonLocations();
72 public CtfTmfEvent
getExpectedEventType() {
73 return CtfTmfEvent
.getNullEvent();
77 protected void eventHandle(ITmfEvent ev
) {
78 if (!(ev
instanceof CtfTmfEvent
)) {
79 /* Wrong event type, can't process */
83 CtfTmfEvent event
= (CtfTmfEvent
) ev
;
88 final ITmfEventField content
= event
.getContent();
89 final String eventName
= event
.getEventName();
90 final long ts
= event
.getTimestamp().getValue();
93 /* Shortcut for the "current CPU" attribute node */
94 final Integer currentCPUNode
= ss
.getQuarkRelativeAndAdd(cpusNode
, String
.valueOf(event
.getCPU()));
97 * Shortcut for the "current thread" attribute node. It requires
98 * querying the current CPU's current thread.
100 quark
= ss
.getQuarkRelativeAndAdd(currentCPUNode
, Attributes
.CURRENT_THREAD
);
101 value
= ss
.queryOngoingState(quark
);
102 int thread
= value
.unboxInt();
103 final Integer currentThreadNode
= ss
.getQuarkRelativeAndAdd(threadsNode
, String
.valueOf(thread
));
106 * Feed event to the history system if it's known to cause a state
109 switch (getEventIndex(eventName
)) {
111 case 1: // "exit_syscall":
112 /* Fields: int64 ret */
114 /* Clear the current system call on the process */
115 quark
= ss
.getQuarkRelativeAndAdd(currentThreadNode
, Attributes
.SYSTEM_CALL
);
116 value
= TmfStateValue
.nullValue();
117 ss
.modifyAttribute(ts
, value
, quark
);
119 /* Put the process' status back to user mode */
120 quark
= ss
.getQuarkRelativeAndAdd(currentThreadNode
, Attributes
.STATUS
);
121 value
= TmfStateValue
.newValueInt(StateValues
.PROCESS_STATUS_RUN_USERMODE
);
122 ss
.modifyAttribute(ts
, value
, quark
);
124 /* Put the CPU's status back to user mode */
125 quark
= ss
.getQuarkRelativeAndAdd(currentCPUNode
, Attributes
.STATUS
);
126 value
= TmfStateValue
.newValueInt(StateValues
.CPU_STATUS_RUN_USERMODE
);
127 ss
.modifyAttribute(ts
, value
, quark
);
131 case 2: // "irq_handler_entry":
132 /* Fields: int32 irq, string name */
134 Integer irqId
= ((Long
) content
.getField(LttngStrings
.IRQ
).getValue()).intValue();
136 /* Mark this IRQ as active in the resource tree.
137 * The state value = the CPU on which this IRQ is sitting */
138 quark
= ss
.getQuarkRelativeAndAdd(irqsNode
, irqId
.toString());
139 value
= TmfStateValue
.newValueInt(event
.getCPU());
140 ss
.modifyAttribute(ts
, value
, quark
);
142 /* Change the status of the running process to interrupted */
143 quark
= ss
.getQuarkRelativeAndAdd(currentThreadNode
, Attributes
.STATUS
);
144 value
= TmfStateValue
.newValueInt(StateValues
.PROCESS_STATUS_INTERRUPTED
);
145 ss
.modifyAttribute(ts
, value
, quark
);
147 /* Change the status of the CPU to interrupted */
148 quark
= ss
.getQuarkRelativeAndAdd(currentCPUNode
, Attributes
.STATUS
);
149 value
= TmfStateValue
.newValueInt(StateValues
.CPU_STATUS_IRQ
);
150 ss
.modifyAttribute(ts
, value
, quark
);
154 case 3: // "irq_handler_exit":
155 /* Fields: int32 irq, int32 ret */
157 Integer irqId
= ((Long
) content
.getField(LttngStrings
.IRQ
).getValue()).intValue();
159 /* Put this IRQ back to inactive in the resource tree */
160 quark
= ss
.getQuarkRelativeAndAdd(irqsNode
, irqId
.toString());
161 value
= TmfStateValue
.nullValue();
162 ss
.modifyAttribute(ts
, value
, quark
);
164 /* Set the previous process back to running */
165 setProcessToRunning(ts
, currentThreadNode
);
167 /* Set the CPU status back to running or "idle" */
168 cpuExitInterrupt(ts
, currentCPUNode
, currentThreadNode
);
172 case 4: // "softirq_entry":
173 /* Fields: int32 vec */
175 Integer softIrqId
= ((Long
) content
.getField(LttngStrings
.VEC
).getValue()).intValue();
177 /* Mark this SoftIRQ as active in the resource tree.
178 * The state value = the CPU on which this SoftIRQ is processed */
179 quark
= ss
.getQuarkRelativeAndAdd(softIrqsNode
, softIrqId
.toString());
180 value
= TmfStateValue
.newValueInt(event
.getCPU());
181 ss
.modifyAttribute(ts
, value
, quark
);
183 /* Change the status of the running process to interrupted */
184 quark
= ss
.getQuarkRelativeAndAdd(currentThreadNode
, Attributes
.STATUS
);
185 value
= TmfStateValue
.newValueInt(StateValues
.PROCESS_STATUS_INTERRUPTED
);
186 ss
.modifyAttribute(ts
, value
, quark
);
188 /* Change the status of the CPU to interrupted */
189 quark
= ss
.getQuarkRelativeAndAdd(currentCPUNode
, Attributes
.STATUS
);
190 value
= TmfStateValue
.newValueInt(StateValues
.CPU_STATUS_SOFTIRQ
);
191 ss
.modifyAttribute(ts
, value
, quark
);
195 case 5: // "softirq_exit":
196 /* Fields: int32 vec */
198 Integer softIrqId
= ((Long
) content
.getField(LttngStrings
.VEC
).getValue()).intValue();
200 /* Put this SoftIRQ back to inactive (= -1) in the resource tree */
201 quark
= ss
.getQuarkRelativeAndAdd(softIrqsNode
, softIrqId
.toString());
202 value
= TmfStateValue
.nullValue();
203 ss
.modifyAttribute(ts
, value
, quark
);
205 /* Set the previous process back to running */
206 setProcessToRunning(ts
, currentThreadNode
);
208 /* Set the CPU status back to "busy" or "idle" */
209 cpuExitInterrupt(ts
, currentCPUNode
, currentThreadNode
);
213 case 6: // "softirq_raise":
214 /* Fields: int32 vec */
216 Integer softIrqId
= ((Long
) content
.getField(LttngStrings
.VEC
).getValue()).intValue();
218 /* Mark this SoftIRQ as *raised* in the resource tree.
219 * State value = -2 */
220 quark
= ss
.getQuarkRelativeAndAdd(softIrqsNode
, softIrqId
.toString());
221 value
= TmfStateValue
.newValueInt(StateValues
.SOFT_IRQ_RAISED
);
222 ss
.modifyAttribute(ts
, value
, quark
);
226 case 7: // "sched_switch":
228 * Fields: string prev_comm, int32 prev_tid, int32 prev_prio, int64 prev_state,
229 * string next_comm, int32 next_tid, int32 next_prio
232 Integer prevTid
= ((Long
) content
.getField(LttngStrings
.PREV_TID
).getValue()).intValue();
233 //Long prevState = (Long) content.getField(LttngStrings.PREV_STATE).getValue();
234 String nextProcessName
= (String
) content
.getField(LttngStrings
.NEXT_COMM
).getValue();
235 Integer nextTid
= ((Long
) content
.getField(LttngStrings
.NEXT_TID
).getValue()).intValue();
237 Integer formerThreadNode
= ss
.getQuarkRelativeAndAdd(threadsNode
, prevTid
.toString());
238 Integer newCurrentThreadNode
= ss
.getQuarkRelativeAndAdd(threadsNode
, nextTid
.toString());
240 /* Set the status of the process that got scheduled out. */
241 quark
= ss
.getQuarkRelativeAndAdd(formerThreadNode
, Attributes
.STATUS
);
242 value
= TmfStateValue
.newValueInt(StateValues
.PROCESS_STATUS_WAIT
);
243 ss
.modifyAttribute(ts
, value
, quark
);
245 /* Set the status of the new scheduled process */
246 setProcessToRunning(ts
, newCurrentThreadNode
);
248 /* Set the exec name of the new process */
249 quark
= ss
.getQuarkRelativeAndAdd(newCurrentThreadNode
, Attributes
.EXEC_NAME
);
250 value
= TmfStateValue
.newValueString(nextProcessName
);
251 ss
.modifyAttribute(ts
, value
, quark
);
254 * Check if we need to set the syscall state and the PPID of
255 * the new process (in case we haven't seen this process before)
257 quark
= ss
.getQuarkRelativeAndAdd(newCurrentThreadNode
, Attributes
.SYSTEM_CALL
);
258 if (ss
.isLastAttribute(quark
)) { /* Did we just add this attribute? */
259 value
= TmfStateValue
.nullValue();
260 ss
.modifyAttribute(ts
, value
, quark
);
262 quark
= ss
.getQuarkRelativeAndAdd(newCurrentThreadNode
, Attributes
.PPID
);
263 if (ss
.isLastAttribute(quark
)) {
264 value
= TmfStateValue
.nullValue();
265 ss
.modifyAttribute(ts
, value
, quark
);
268 /* Set the current scheduled process on the relevant CPU */
269 quark
= ss
.getQuarkRelativeAndAdd(currentCPUNode
, Attributes
.CURRENT_THREAD
);
270 value
= TmfStateValue
.newValueInt(nextTid
);
271 ss
.modifyAttribute(ts
, value
, quark
);
273 /* Set the status of the CPU itself */
275 /* Check if the entering process is in kernel or user mode */
276 quark
= ss
.getQuarkRelativeAndAdd(newCurrentThreadNode
, Attributes
.SYSTEM_CALL
);
277 if (ss
.queryOngoingState(quark
).isNull()) {
278 value
= TmfStateValue
.newValueInt(StateValues
.CPU_STATUS_RUN_USERMODE
);
280 value
= TmfStateValue
.newValueInt(StateValues
.CPU_STATUS_RUN_SYSCALL
);
283 value
= TmfStateValue
.newValueInt(StateValues
.CPU_STATUS_IDLE
);
285 quark
= ss
.getQuarkRelativeAndAdd(currentCPUNode
, Attributes
.STATUS
);
286 ss
.modifyAttribute(ts
, value
, quark
);
290 case 8: // "sched_process_fork":
291 /* Fields: string parent_comm, int32 parent_tid,
292 * string child_comm, int32 child_tid */
294 // String parentProcessName = (String) event.getFieldValue("parent_comm");
295 String childProcessName
= (String
) content
.getField(LttngStrings
.CHILD_COMM
).getValue();
296 // assert ( parentProcessName.equals(childProcessName) );
298 Integer parentTid
= ((Long
) content
.getField(LttngStrings
.PARENT_TID
).getValue()).intValue();
299 Integer childTid
= ((Long
) content
.getField(LttngStrings
.CHILD_TID
).getValue()).intValue();
301 Integer parentTidNode
= ss
.getQuarkRelativeAndAdd(threadsNode
, parentTid
.toString());
302 Integer childTidNode
= ss
.getQuarkRelativeAndAdd(threadsNode
, childTid
.toString());
304 /* Assign the PPID to the new process */
305 quark
= ss
.getQuarkRelativeAndAdd(childTidNode
, Attributes
.PPID
);
306 value
= TmfStateValue
.newValueInt(parentTid
);
307 ss
.modifyAttribute(ts
, value
, quark
);
309 /* Set the new process' exec_name */
310 quark
= ss
.getQuarkRelativeAndAdd(childTidNode
, Attributes
.EXEC_NAME
);
311 value
= TmfStateValue
.newValueString(childProcessName
);
312 ss
.modifyAttribute(ts
, value
, quark
);
314 /* Set the new process' status */
315 quark
= ss
.getQuarkRelativeAndAdd(childTidNode
, Attributes
.STATUS
);
316 value
= TmfStateValue
.newValueInt(StateValues
.PROCESS_STATUS_WAIT
);
317 ss
.modifyAttribute(ts
, value
, quark
);
319 /* Set the process' syscall name, to be the same as the parent's */
320 quark
= ss
.getQuarkRelativeAndAdd(parentTidNode
, Attributes
.SYSTEM_CALL
);
321 value
= ss
.queryOngoingState(quark
);
322 quark
= ss
.getQuarkRelativeAndAdd(childTidNode
, Attributes
.SYSTEM_CALL
);
323 ss
.modifyAttribute(ts
, value
, quark
);
327 case 9: // "sched_process_exit":
328 /* Fields: string comm, int32 tid, int32 prio */
331 case 10: // "sched_process_free":
332 /* Fields: string comm, int32 tid, int32 prio */
334 * A sched_process_free will always happen after the sched_switch
335 * that will remove the process from the cpu for the last time. So
336 * this is when we should delete everything wrt to the process.
339 Integer tid
= ((Long
) content
.getField(LttngStrings
.TID
).getValue()).intValue();
341 * Remove the process and all its sub-attributes from the
344 quark
= ss
.getQuarkRelativeAndAdd(threadsNode
, tid
.toString());
345 ss
.removeAttribute(ts
, quark
);
349 case 11: // "lttng_statedump_process_state":
351 * int32 type, int32 mode, int32 pid, int32 submode, int32 vpid,
352 * int32 ppid, int32 tid, string name, int32 status, int32 vtid */
354 Integer tid
= ((Long
) content
.getField(LttngStrings
.TID
).getValue()).intValue();
355 int ppid
= ((Long
) content
.getField(LttngStrings
.PPID
).getValue()).intValue();
356 int status
= ((Long
) content
.getField(LttngStrings
.STATUS
).getValue()).intValue();
357 String name
= (String
) content
.getField(LttngStrings
.NAME
).getValue();
359 * "mode" could be interesting too, but it doesn't seem to be
360 * populated with anything relevant for now.
363 int curThreadNode
= ss
.getQuarkRelativeAndAdd(threadsNode
, tid
.toString());
365 /* Set the process' name */
366 quark
= ss
.getQuarkRelativeAndAdd(curThreadNode
, Attributes
.EXEC_NAME
);
367 if (ss
.queryOngoingState(quark
).isNull()) {
368 /* If the value didn't exist previously, set it */
369 value
= TmfStateValue
.newValueString(name
);
370 ss
.modifyAttribute(ts
, value
, quark
);
373 /* Set the process' PPID */
374 quark
= ss
.getQuarkRelativeAndAdd(curThreadNode
, Attributes
.PPID
);
375 if (ss
.queryOngoingState(quark
).isNull()) {
376 value
= TmfStateValue
.newValueInt(ppid
);
377 ss
.modifyAttribute(ts
, value
, quark
);
380 /* Set the process' status */
381 quark
= ss
.getQuarkRelativeAndAdd(curThreadNode
, Attributes
.STATUS
);
382 if (ss
.queryOngoingState(quark
).isNull()) {
383 /*"5" here means "LTTNG_WAIT" in the LTTng kernel tracer */
385 value
= TmfStateValue
.newValueInt(StateValues
.PROCESS_STATUS_WAIT
);
387 value
= TmfStateValue
.newValueInt(StateValues
.PROCESS_STATUS_UNKNOWN
);
389 ss
.modifyAttribute(ts
, value
, quark
);
395 /* Other event types not covered by the main switch */
397 if (eventName
.startsWith(LttngStrings
.SYSCALL_PREFIX
)
398 || eventName
.startsWith(LttngStrings
.COMPAT_SYSCALL_PREFIX
)) {
400 * This is a replacement for the old sys_enter event. Now
401 * syscall names are listed into the event type
404 /* Assign the new system call to the process */
405 quark
= ss
.getQuarkRelativeAndAdd(currentThreadNode
, Attributes
.SYSTEM_CALL
);
406 value
= TmfStateValue
.newValueString(eventName
);
407 ss
.modifyAttribute(ts
, value
, quark
);
409 /* Put the process in system call mode */
410 quark
= ss
.getQuarkRelativeAndAdd(currentThreadNode
, Attributes
.STATUS
);
411 value
= TmfStateValue
.newValueInt(StateValues
.PROCESS_STATUS_RUN_SYSCALL
);
412 ss
.modifyAttribute(ts
, value
, quark
);
414 /* Put the CPU in system call (kernel) mode */
415 quark
= ss
.getQuarkRelativeAndAdd(currentCPUNode
, Attributes
.STATUS
);
416 value
= TmfStateValue
.newValueInt(StateValues
.CPU_STATUS_RUN_SYSCALL
);
417 ss
.modifyAttribute(ts
, value
, quark
);
421 } // End of big switch
427 /* Number of events of each type, globally */
428 // quark = ss.getQuarkAbsoluteAndAdd(Attributes.STATISTICS,
429 // Attributes.EVENT_TYPES, eventName);
430 // ss.incrementAttribute(ts, quark);
432 /* Number of events per CPU */
433 // quark = ss.getQuarkRelativeAndAdd(currentCPUNode,
434 // Attributes.STATISTICS, Attributes.EVENT_TYPES, eventName);
435 // ss.incrementAttribute(ts, quark);
437 /* Number of events per process */
438 // quark = ss.getQuarkRelativeAndAdd(currentThreadNode,
439 // Attributes.STATISTICS, Attributes.EVENT_TYPES, eventName);
440 // ss.incrementAttribute(ts, quark);
442 } catch (AttributeNotFoundException ae
) {
444 * This would indicate a problem with the logic of the manager here,
445 * so it shouldn't happen.
447 ae
.printStackTrace();
449 } catch (TimeRangeException tre
) {
451 * This would happen if the events in the trace aren't ordered
452 * chronologically, which should never be the case ...
454 System
.err
.println("TimeRangeExcpetion caught in the state system's event manager."); //$NON-NLS-1$
455 System
.err
.println("Are the events in the trace correctly ordered?"); //$NON-NLS-1$
456 tre
.printStackTrace();
458 } catch (StateValueTypeException sve
) {
460 * This would happen if we were trying to push/pop attributes not of
461 * type integer. Which, once again, should never happen.
463 sve
.printStackTrace();
467 private void setupCommonLocations() {
468 cpusNode
= ss
.getQuarkAbsoluteAndAdd(Attributes
.CPUS
);
469 threadsNode
= ss
.getQuarkAbsoluteAndAdd(Attributes
.THREADS
);
470 irqsNode
= ss
.getQuarkAbsoluteAndAdd(Attributes
.RESOURCES
, Attributes
.IRQS
);
471 softIrqsNode
= ss
.getQuarkAbsoluteAndAdd(Attributes
.RESOURCES
, Attributes
.SOFT_IRQS
);
474 private static HashMap
<String
, Integer
> fillEventNames() {
476 * TODO Replace with straight strings in the switch/case once we move to
479 HashMap
<String
, Integer
> map
= new HashMap
<String
, Integer
>();
481 map
.put(LttngStrings
.EXIT_SYSCALL
, 1);
482 map
.put(LttngStrings
.IRQ_HANDLER_ENTRY
, 2);
483 map
.put(LttngStrings
.IRQ_HANDLER_EXIT
, 3);
484 map
.put(LttngStrings
.SOFTIRQ_ENTRY
, 4);
485 map
.put(LttngStrings
.SOFTIRQ_EXIT
, 5);
486 map
.put(LttngStrings
.SOFTIRQ_RAISE
, 6);
487 map
.put(LttngStrings
.SCHED_SWITCH
, 7);
488 map
.put(LttngStrings
.SCHED_PROCESS_FORK
, 8);
489 map
.put(LttngStrings
.SCHED_PROCESS_EXIT
, 9);
490 map
.put(LttngStrings
.SCHED_PROCESS_FREE
, 10);
491 map
.put(LttngStrings
.STATEDUMP_PROCESS_STATE
, 11);
496 private int getEventIndex(String eventName
) {
497 Integer ret
= knownEventNames
.get(eventName
);
498 return (ret
!= null) ? ret
: -1;
502 * When we want to set a process back to a "running" state, first check
503 * its current System_call attribute. If there is a system call active, we
504 * put the process back in the syscall state. If not, we put it back in
507 private void setProcessToRunning(long ts
, int currentThreadNode
)
508 throws AttributeNotFoundException
, TimeRangeException
,
509 StateValueTypeException
{
511 ITmfStateValue value
;
513 quark
= ss
.getQuarkRelativeAndAdd(currentThreadNode
, Attributes
.SYSTEM_CALL
);
514 if (ss
.queryOngoingState(quark
).isNull()) {
515 /* We were in user mode before the interruption */
516 value
= TmfStateValue
.newValueInt(StateValues
.PROCESS_STATUS_RUN_USERMODE
);
518 /* We were previously in kernel mode */
519 value
= TmfStateValue
.newValueInt(StateValues
.PROCESS_STATUS_RUN_SYSCALL
);
521 quark
= ss
.getQuarkRelativeAndAdd(currentThreadNode
, Attributes
.STATUS
);
522 ss
.modifyAttribute(ts
, value
, quark
);
526 * Similar logic as above, but to set the CPU's status when it's coming out
527 * of an interruption.
529 private void cpuExitInterrupt(long ts
, int currentCpuNode
, int currentThreadNode
)
530 throws StateValueTypeException
, AttributeNotFoundException
,
533 ITmfStateValue value
;
535 quark
= ss
.getQuarkRelativeAndAdd(currentCpuNode
, Attributes
.CURRENT_THREAD
);
536 if (ss
.queryOngoingState(quark
).unboxInt() > 0) {
537 /* There was a process on the CPU */
538 quark
= ss
.getQuarkRelative(currentThreadNode
, Attributes
.SYSTEM_CALL
);
539 if (ss
.queryOngoingState(quark
).isNull()) {
540 /* That process was in user mode */
541 value
= TmfStateValue
.newValueInt(StateValues
.CPU_STATUS_RUN_USERMODE
);
543 /* That process was in a system call */
544 value
= TmfStateValue
.newValueInt(StateValues
.CPU_STATUS_RUN_SYSCALL
);
547 /* There was no real process scheduled, CPU was idle */
548 value
= TmfStateValue
.newValueInt(StateValues
.CPU_STATUS_IDLE
);
550 quark
= ss
.getQuarkRelativeAndAdd(currentCpuNode
, Attributes
.STATUS
);
551 ss
.modifyAttribute(ts
, value
, quark
);