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
.ITmfStateSystemBuilder
;
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
) {
60 super(trace
, CtfTmfEvent
.class, "LTTng Kernel"); //$NON-NLS-1$
61 knownEventNames
= fillEventNames();
65 public void assignTargetStateSystem(ITmfStateSystemBuilder ssb
) {
66 /* We can only set up the locations once the state system is assigned */
67 super.assignTargetStateSystem(ssb
);
68 setupCommonLocations();
72 protected void eventHandle(ITmfEvent ev
) {
74 * AbstractStateChangeInput should have already checked for the correct
77 CtfTmfEvent event
= (CtfTmfEvent
) ev
;
82 final ITmfEventField content
= event
.getContent();
83 final String eventName
= event
.getEventName();
84 final long ts
= event
.getTimestamp().getValue();
87 /* Shortcut for the "current CPU" attribute node */
88 final Integer currentCPUNode
= ss
.getQuarkRelativeAndAdd(cpusNode
, String
.valueOf(event
.getCPU()));
91 * Shortcut for the "current thread" attribute node. It requires
92 * querying the current CPU's current thread.
94 quark
= ss
.getQuarkRelativeAndAdd(currentCPUNode
, Attributes
.CURRENT_THREAD
);
95 value
= ss
.queryOngoingState(quark
);
96 int thread
= value
.unboxInt();
97 final Integer currentThreadNode
= ss
.getQuarkRelativeAndAdd(threadsNode
, String
.valueOf(thread
));
100 * Feed event to the history system if it's known to cause a state
103 switch (getEventIndex(eventName
)) {
105 case 1: // "exit_syscall":
106 /* Fields: int64 ret */
108 /* Clear the current system call on the process */
109 quark
= ss
.getQuarkRelativeAndAdd(currentThreadNode
, Attributes
.SYSTEM_CALL
);
110 value
= TmfStateValue
.nullValue();
111 ss
.modifyAttribute(ts
, value
, quark
);
113 /* Put the process' status back to user mode */
114 quark
= ss
.getQuarkRelativeAndAdd(currentThreadNode
, Attributes
.STATUS
);
115 value
= TmfStateValue
.newValueInt(StateValues
.PROCESS_STATUS_RUN_USERMODE
);
116 ss
.modifyAttribute(ts
, value
, quark
);
118 /* Put the CPU's status back to user mode */
119 quark
= ss
.getQuarkRelativeAndAdd(currentCPUNode
, Attributes
.STATUS
);
120 value
= TmfStateValue
.newValueInt(StateValues
.CPU_STATUS_RUN_USERMODE
);
121 ss
.modifyAttribute(ts
, value
, quark
);
125 case 2: // "irq_handler_entry":
126 /* Fields: int32 irq, string name */
128 Integer irqId
= ((Long
) content
.getField(LttngStrings
.IRQ
).getValue()).intValue();
130 /* Mark this IRQ as active in the resource tree.
131 * The state value = the CPU on which this IRQ is sitting */
132 quark
= ss
.getQuarkRelativeAndAdd(irqsNode
, irqId
.toString());
133 value
= TmfStateValue
.newValueInt(event
.getCPU());
134 ss
.modifyAttribute(ts
, value
, quark
);
136 /* Change the status of the running process to interrupted */
137 quark
= ss
.getQuarkRelativeAndAdd(currentThreadNode
, Attributes
.STATUS
);
138 value
= TmfStateValue
.newValueInt(StateValues
.PROCESS_STATUS_INTERRUPTED
);
139 ss
.modifyAttribute(ts
, value
, quark
);
141 /* Change the status of the CPU to interrupted */
142 quark
= ss
.getQuarkRelativeAndAdd(currentCPUNode
, Attributes
.STATUS
);
143 value
= TmfStateValue
.newValueInt(StateValues
.CPU_STATUS_IRQ
);
144 ss
.modifyAttribute(ts
, value
, quark
);
148 case 3: // "irq_handler_exit":
149 /* Fields: int32 irq, int32 ret */
151 Integer irqId
= ((Long
) content
.getField(LttngStrings
.IRQ
).getValue()).intValue();
153 /* Put this IRQ back to inactive in the resource tree */
154 quark
= ss
.getQuarkRelativeAndAdd(irqsNode
, irqId
.toString());
155 value
= TmfStateValue
.nullValue();
156 ss
.modifyAttribute(ts
, value
, quark
);
158 /* Set the previous process back to running */
159 setProcessToRunning(ts
, currentThreadNode
);
161 /* Set the CPU status back to running or "idle" */
162 cpuExitInterrupt(ts
, currentCPUNode
, currentThreadNode
);
166 case 4: // "softirq_entry":
167 /* Fields: int32 vec */
169 Integer softIrqId
= ((Long
) content
.getField(LttngStrings
.VEC
).getValue()).intValue();
171 /* Mark this SoftIRQ as active in the resource tree.
172 * The state value = the CPU on which this SoftIRQ is processed */
173 quark
= ss
.getQuarkRelativeAndAdd(softIrqsNode
, softIrqId
.toString());
174 value
= TmfStateValue
.newValueInt(event
.getCPU());
175 ss
.modifyAttribute(ts
, value
, quark
);
177 /* Change the status of the running process to interrupted */
178 quark
= ss
.getQuarkRelativeAndAdd(currentThreadNode
, Attributes
.STATUS
);
179 value
= TmfStateValue
.newValueInt(StateValues
.PROCESS_STATUS_INTERRUPTED
);
180 ss
.modifyAttribute(ts
, value
, quark
);
182 /* Change the status of the CPU to interrupted */
183 quark
= ss
.getQuarkRelativeAndAdd(currentCPUNode
, Attributes
.STATUS
);
184 value
= TmfStateValue
.newValueInt(StateValues
.CPU_STATUS_SOFTIRQ
);
185 ss
.modifyAttribute(ts
, value
, quark
);
189 case 5: // "softirq_exit":
190 /* Fields: int32 vec */
192 Integer softIrqId
= ((Long
) content
.getField(LttngStrings
.VEC
).getValue()).intValue();
194 /* Put this SoftIRQ back to inactive (= -1) in the resource tree */
195 quark
= ss
.getQuarkRelativeAndAdd(softIrqsNode
, softIrqId
.toString());
196 value
= TmfStateValue
.nullValue();
197 ss
.modifyAttribute(ts
, value
, quark
);
199 /* Set the previous process back to running */
200 setProcessToRunning(ts
, currentThreadNode
);
202 /* Set the CPU status back to "busy" or "idle" */
203 cpuExitInterrupt(ts
, currentCPUNode
, currentThreadNode
);
207 case 6: // "softirq_raise":
208 /* Fields: int32 vec */
210 Integer softIrqId
= ((Long
) content
.getField(LttngStrings
.VEC
).getValue()).intValue();
212 /* Mark this SoftIRQ as *raised* in the resource tree.
213 * State value = -2 */
214 quark
= ss
.getQuarkRelativeAndAdd(softIrqsNode
, softIrqId
.toString());
215 value
= TmfStateValue
.newValueInt(StateValues
.SOFT_IRQ_RAISED
);
216 ss
.modifyAttribute(ts
, value
, quark
);
220 case 7: // "sched_switch":
222 * Fields: string prev_comm, int32 prev_tid, int32 prev_prio, int64 prev_state,
223 * string next_comm, int32 next_tid, int32 next_prio
226 Integer prevTid
= ((Long
) content
.getField(LttngStrings
.PREV_TID
).getValue()).intValue();
227 //Long prevState = (Long) content.getField(LttngStrings.PREV_STATE).getValue();
228 String nextProcessName
= (String
) content
.getField(LttngStrings
.NEXT_COMM
).getValue();
229 Integer nextTid
= ((Long
) content
.getField(LttngStrings
.NEXT_TID
).getValue()).intValue();
231 Integer formerThreadNode
= ss
.getQuarkRelativeAndAdd(threadsNode
, prevTid
.toString());
232 Integer newCurrentThreadNode
= ss
.getQuarkRelativeAndAdd(threadsNode
, nextTid
.toString());
234 /* Set the status of the process that got scheduled out. */
235 quark
= ss
.getQuarkRelativeAndAdd(formerThreadNode
, Attributes
.STATUS
);
236 value
= TmfStateValue
.newValueInt(StateValues
.PROCESS_STATUS_WAIT
);
237 ss
.modifyAttribute(ts
, value
, quark
);
239 /* Set the status of the new scheduled process */
240 setProcessToRunning(ts
, newCurrentThreadNode
);
242 /* Set the exec name of the new process */
243 quark
= ss
.getQuarkRelativeAndAdd(newCurrentThreadNode
, Attributes
.EXEC_NAME
);
244 value
= TmfStateValue
.newValueString(nextProcessName
);
245 ss
.modifyAttribute(ts
, value
, quark
);
248 * Check if we need to set the syscall state and the PPID of
249 * the new process (in case we haven't seen this process before)
251 quark
= ss
.getQuarkRelativeAndAdd(newCurrentThreadNode
, Attributes
.SYSTEM_CALL
);
252 if (ss
.isLastAttribute(quark
)) { /* Did we just add this attribute? */
253 value
= TmfStateValue
.nullValue();
254 ss
.modifyAttribute(ts
, value
, quark
);
256 quark
= ss
.getQuarkRelativeAndAdd(newCurrentThreadNode
, Attributes
.PPID
);
257 if (ss
.isLastAttribute(quark
)) {
258 value
= TmfStateValue
.nullValue();
259 ss
.modifyAttribute(ts
, value
, quark
);
262 /* Set the current scheduled process on the relevant CPU */
263 quark
= ss
.getQuarkRelativeAndAdd(currentCPUNode
, Attributes
.CURRENT_THREAD
);
264 value
= TmfStateValue
.newValueInt(nextTid
);
265 ss
.modifyAttribute(ts
, value
, quark
);
267 /* Set the status of the CPU itself */
269 /* Check if the entering process is in kernel or user mode */
270 quark
= ss
.getQuarkRelativeAndAdd(newCurrentThreadNode
, Attributes
.SYSTEM_CALL
);
271 if (ss
.queryOngoingState(quark
).isNull()) {
272 value
= TmfStateValue
.newValueInt(StateValues
.CPU_STATUS_RUN_USERMODE
);
274 value
= TmfStateValue
.newValueInt(StateValues
.CPU_STATUS_RUN_SYSCALL
);
277 value
= TmfStateValue
.newValueInt(StateValues
.CPU_STATUS_IDLE
);
279 quark
= ss
.getQuarkRelativeAndAdd(currentCPUNode
, Attributes
.STATUS
);
280 ss
.modifyAttribute(ts
, value
, quark
);
284 case 8: // "sched_process_fork":
285 /* Fields: string parent_comm, int32 parent_tid,
286 * string child_comm, int32 child_tid */
288 // String parentProcessName = (String) event.getFieldValue("parent_comm");
289 String childProcessName
= (String
) content
.getField(LttngStrings
.CHILD_COMM
).getValue();
290 // assert ( parentProcessName.equals(childProcessName) );
292 Integer parentTid
= ((Long
) content
.getField(LttngStrings
.PARENT_TID
).getValue()).intValue();
293 Integer childTid
= ((Long
) content
.getField(LttngStrings
.CHILD_TID
).getValue()).intValue();
295 Integer parentTidNode
= ss
.getQuarkRelativeAndAdd(threadsNode
, parentTid
.toString());
296 Integer childTidNode
= ss
.getQuarkRelativeAndAdd(threadsNode
, childTid
.toString());
298 /* Assign the PPID to the new process */
299 quark
= ss
.getQuarkRelativeAndAdd(childTidNode
, Attributes
.PPID
);
300 value
= TmfStateValue
.newValueInt(parentTid
);
301 ss
.modifyAttribute(ts
, value
, quark
);
303 /* Set the new process' exec_name */
304 quark
= ss
.getQuarkRelativeAndAdd(childTidNode
, Attributes
.EXEC_NAME
);
305 value
= TmfStateValue
.newValueString(childProcessName
);
306 ss
.modifyAttribute(ts
, value
, quark
);
308 /* Set the new process' status */
309 quark
= ss
.getQuarkRelativeAndAdd(childTidNode
, Attributes
.STATUS
);
310 value
= TmfStateValue
.newValueInt(StateValues
.PROCESS_STATUS_WAIT
);
311 ss
.modifyAttribute(ts
, value
, quark
);
313 /* Set the process' syscall name, to be the same as the parent's */
314 quark
= ss
.getQuarkRelativeAndAdd(parentTidNode
, Attributes
.SYSTEM_CALL
);
315 value
= ss
.queryOngoingState(quark
);
316 quark
= ss
.getQuarkRelativeAndAdd(childTidNode
, Attributes
.SYSTEM_CALL
);
317 ss
.modifyAttribute(ts
, value
, quark
);
321 case 9: // "sched_process_exit":
322 /* Fields: string comm, int32 tid, int32 prio */
325 case 10: // "sched_process_free":
326 /* Fields: string comm, int32 tid, int32 prio */
328 * A sched_process_free will always happen after the sched_switch
329 * that will remove the process from the cpu for the last time. So
330 * this is when we should delete everything wrt to the process.
333 Integer tid
= ((Long
) content
.getField(LttngStrings
.TID
).getValue()).intValue();
335 * Remove the process and all its sub-attributes from the
338 quark
= ss
.getQuarkRelativeAndAdd(threadsNode
, tid
.toString());
339 ss
.removeAttribute(ts
, quark
);
343 case 11: // "lttng_statedump_process_state":
345 * int32 type, int32 mode, int32 pid, int32 submode, int32 vpid,
346 * int32 ppid, int32 tid, string name, int32 status, int32 vtid */
348 Integer tid
= ((Long
) content
.getField(LttngStrings
.TID
).getValue()).intValue();
349 int ppid
= ((Long
) content
.getField(LttngStrings
.PPID
).getValue()).intValue();
350 int status
= ((Long
) content
.getField(LttngStrings
.STATUS
).getValue()).intValue();
351 String name
= (String
) content
.getField(LttngStrings
.NAME
).getValue();
353 * "mode" could be interesting too, but it doesn't seem to be
354 * populated with anything relevant for now.
357 int curThreadNode
= ss
.getQuarkRelativeAndAdd(threadsNode
, tid
.toString());
359 /* Set the process' name */
360 quark
= ss
.getQuarkRelativeAndAdd(curThreadNode
, Attributes
.EXEC_NAME
);
361 if (ss
.queryOngoingState(quark
).isNull()) {
362 /* If the value didn't exist previously, set it */
363 value
= TmfStateValue
.newValueString(name
);
364 ss
.modifyAttribute(ts
, value
, quark
);
367 /* Set the process' PPID */
368 quark
= ss
.getQuarkRelativeAndAdd(curThreadNode
, Attributes
.PPID
);
369 if (ss
.queryOngoingState(quark
).isNull()) {
370 value
= TmfStateValue
.newValueInt(ppid
);
371 ss
.modifyAttribute(ts
, value
, quark
);
374 /* Set the process' status */
375 quark
= ss
.getQuarkRelativeAndAdd(curThreadNode
, Attributes
.STATUS
);
376 if (ss
.queryOngoingState(quark
).isNull()) {
377 /*"5" here means "LTTNG_WAIT" in the LTTng kernel tracer */
379 value
= TmfStateValue
.newValueInt(StateValues
.PROCESS_STATUS_WAIT
);
381 value
= TmfStateValue
.newValueInt(StateValues
.PROCESS_STATUS_UNKNOWN
);
383 ss
.modifyAttribute(ts
, value
, quark
);
389 /* Other event types not covered by the main switch */
391 if (eventName
.startsWith(LttngStrings
.SYSCALL_PREFIX
)
392 || eventName
.startsWith(LttngStrings
.COMPAT_SYSCALL_PREFIX
)) {
394 * This is a replacement for the old sys_enter event. Now
395 * syscall names are listed into the event type
398 /* Assign the new system call to the process */
399 quark
= ss
.getQuarkRelativeAndAdd(currentThreadNode
, Attributes
.SYSTEM_CALL
);
400 value
= TmfStateValue
.newValueString(eventName
);
401 ss
.modifyAttribute(ts
, value
, quark
);
403 /* Put the process in system call mode */
404 quark
= ss
.getQuarkRelativeAndAdd(currentThreadNode
, Attributes
.STATUS
);
405 value
= TmfStateValue
.newValueInt(StateValues
.PROCESS_STATUS_RUN_SYSCALL
);
406 ss
.modifyAttribute(ts
, value
, quark
);
408 /* Put the CPU in system call (kernel) mode */
409 quark
= ss
.getQuarkRelativeAndAdd(currentCPUNode
, Attributes
.STATUS
);
410 value
= TmfStateValue
.newValueInt(StateValues
.CPU_STATUS_RUN_SYSCALL
);
411 ss
.modifyAttribute(ts
, value
, quark
);
415 } // End of big switch
421 /* Number of events of each type, globally */
422 // quark = ss.getQuarkAbsoluteAndAdd(Attributes.STATISTICS,
423 // Attributes.EVENT_TYPES, eventName);
424 // ss.incrementAttribute(ts, quark);
426 /* Number of events per CPU */
427 // quark = ss.getQuarkRelativeAndAdd(currentCPUNode,
428 // Attributes.STATISTICS, Attributes.EVENT_TYPES, eventName);
429 // ss.incrementAttribute(ts, quark);
431 /* Number of events per process */
432 // quark = ss.getQuarkRelativeAndAdd(currentThreadNode,
433 // Attributes.STATISTICS, Attributes.EVENT_TYPES, eventName);
434 // ss.incrementAttribute(ts, quark);
436 } catch (AttributeNotFoundException ae
) {
438 * This would indicate a problem with the logic of the manager here,
439 * so it shouldn't happen.
441 ae
.printStackTrace();
443 } catch (TimeRangeException tre
) {
445 * This would happen if the events in the trace aren't ordered
446 * chronologically, which should never be the case ...
448 System
.err
.println("TimeRangeExcpetion caught in the state system's event manager."); //$NON-NLS-1$
449 System
.err
.println("Are the events in the trace correctly ordered?"); //$NON-NLS-1$
450 tre
.printStackTrace();
452 } catch (StateValueTypeException sve
) {
454 * This would happen if we were trying to push/pop attributes not of
455 * type integer. Which, once again, should never happen.
457 sve
.printStackTrace();
461 private void setupCommonLocations() {
462 cpusNode
= ss
.getQuarkAbsoluteAndAdd(Attributes
.CPUS
);
463 threadsNode
= ss
.getQuarkAbsoluteAndAdd(Attributes
.THREADS
);
464 irqsNode
= ss
.getQuarkAbsoluteAndAdd(Attributes
.RESOURCES
, Attributes
.IRQS
);
465 softIrqsNode
= ss
.getQuarkAbsoluteAndAdd(Attributes
.RESOURCES
, Attributes
.SOFT_IRQS
);
468 private static HashMap
<String
, Integer
> fillEventNames() {
470 * TODO Replace with straight strings in the switch/case once we move to
473 HashMap
<String
, Integer
> map
= new HashMap
<String
, Integer
>();
475 map
.put(LttngStrings
.EXIT_SYSCALL
, 1);
476 map
.put(LttngStrings
.IRQ_HANDLER_ENTRY
, 2);
477 map
.put(LttngStrings
.IRQ_HANDLER_EXIT
, 3);
478 map
.put(LttngStrings
.SOFTIRQ_ENTRY
, 4);
479 map
.put(LttngStrings
.SOFTIRQ_EXIT
, 5);
480 map
.put(LttngStrings
.SOFTIRQ_RAISE
, 6);
481 map
.put(LttngStrings
.SCHED_SWITCH
, 7);
482 map
.put(LttngStrings
.SCHED_PROCESS_FORK
, 8);
483 map
.put(LttngStrings
.SCHED_PROCESS_EXIT
, 9);
484 map
.put(LttngStrings
.SCHED_PROCESS_FREE
, 10);
485 map
.put(LttngStrings
.STATEDUMP_PROCESS_STATE
, 11);
490 private int getEventIndex(String eventName
) {
491 Integer ret
= knownEventNames
.get(eventName
);
492 return (ret
!= null) ? ret
: -1;
496 * When we want to set a process back to a "running" state, first check
497 * its current System_call attribute. If there is a system call active, we
498 * put the process back in the syscall state. If not, we put it back in
501 private void setProcessToRunning(long ts
, int currentThreadNode
)
502 throws AttributeNotFoundException
, TimeRangeException
,
503 StateValueTypeException
{
505 ITmfStateValue value
;
507 quark
= ss
.getQuarkRelativeAndAdd(currentThreadNode
, Attributes
.SYSTEM_CALL
);
508 if (ss
.queryOngoingState(quark
).isNull()) {
509 /* We were in user mode before the interruption */
510 value
= TmfStateValue
.newValueInt(StateValues
.PROCESS_STATUS_RUN_USERMODE
);
512 /* We were previously in kernel mode */
513 value
= TmfStateValue
.newValueInt(StateValues
.PROCESS_STATUS_RUN_SYSCALL
);
515 quark
= ss
.getQuarkRelativeAndAdd(currentThreadNode
, Attributes
.STATUS
);
516 ss
.modifyAttribute(ts
, value
, quark
);
520 * Similar logic as above, but to set the CPU's status when it's coming out
521 * of an interruption.
523 private void cpuExitInterrupt(long ts
, int currentCpuNode
, int currentThreadNode
)
524 throws StateValueTypeException
, AttributeNotFoundException
,
527 ITmfStateValue value
;
529 quark
= ss
.getQuarkRelativeAndAdd(currentCpuNode
, Attributes
.CURRENT_THREAD
);
530 if (ss
.queryOngoingState(quark
).unboxInt() > 0) {
531 /* There was a process on the CPU */
532 quark
= ss
.getQuarkRelative(currentThreadNode
, Attributes
.SYSTEM_CALL
);
533 if (ss
.queryOngoingState(quark
).isNull()) {
534 /* That process was in user mode */
535 value
= TmfStateValue
.newValueInt(StateValues
.CPU_STATUS_RUN_USERMODE
);
537 /* That process was in a system call */
538 value
= TmfStateValue
.newValueInt(StateValues
.CPU_STATUS_RUN_SYSCALL
);
541 /* There was no real process scheduled, CPU was idle */
542 value
= TmfStateValue
.newValueInt(StateValues
.CPU_STATUS_IDLE
);
544 quark
= ss
.getQuarkRelativeAndAdd(currentCpuNode
, Attributes
.STATUS
);
545 ss
.modifyAttribute(ts
, value
, quark
);