1 /*******************************************************************************
2 * Copyright (c) 2009 Ericsson
4 * All rights reserved. This program and the accompanying materials are
5 * made available under the terms of the Eclipse Public License v1.0 which
6 * accompanies this distribution, and is available at
7 * http://www.eclipse.org/legal/epl-v10.html
10 * Alvaro Sanchez-Leon (alvsan09@gmail.com) - Initial API and implementation
11 *******************************************************************************/
12 package org
.eclipse
.linuxtools
.lttng
.state
;
14 import java
.util
.HashMap
;
15 import java
.util
.HashSet
;
19 * Establishes relationships of state related strings, since the strings and
20 * relations are fixed, the elements are final i.e. just for reading.
25 public class StateStrings
{
27 // ========================================================================
29 // =======================================================================
30 private static StateStrings instance
= null;
31 public static final String LTTV_STATE_UNBRANDED
= "";
32 private final HashMap
<String
, Events
> eventStrMap
= new HashMap
<String
, Events
>();
33 private final HashMap
<String
, Events
> stateTransEventMap
= new HashMap
<String
, Events
>();
34 private final String
[] syscall_names
= new String
[256];;
35 private final String
[] trap_names
= new String
[256];
36 private final String
[] irq_names
= new String
[256];
37 private final String
[] soft_irq_names
= new String
[32];
39 private StateStrings() {
40 // Build a Hash map from string name to actual event structure
41 for (Events event
: Events
.values()) {
42 eventStrMap
.put(event
.inName
, event
);
43 if (event
.isStateTransition()) {
44 stateTransEventMap
.put(event
.inName
, event
);
48 // Build system call names
49 for (int i
= 0; i
< 256; i
++) {
50 syscall_names
[i
] = "syscall " + i
;
54 for (int i
= 0; i
< 256; i
++) {
55 trap_names
[i
] = "trap " + i
;
59 for (int i
= 0; i
< 256; i
++) {
60 irq_names
[i
] = "irq " + i
;
63 // Build softirq names
64 for (int i
= 0; i
< 32; i
++) {
65 soft_irq_names
[i
] = "softirq " + i
;
70 public static StateStrings
getInstance() {
71 // Singleton to provide string constant
72 if (instance
== null) {
73 instance
= new StateStrings();
78 public enum Channels
{
79 LTT_CHANNEL_FD_STATE("fd_state"), /* */
80 LTT_CHANNEL_GLOBAL_STATE("global_state"), /* */
81 LTT_CHANNEL_IRQ_STATE("irq_state"), /* */
82 LTT_CHANNEL_MODULE_STATE("module_state"), /* */
83 LTT_CHANNEL_NETIF_STATE("netif_state"), /* */
84 LTT_CHANNEL_SOFTIRQ_STATE("softirq_state"), /* */
85 LTT_CHANNEL_SWAP_STATE("swap_state"), /* */
86 LTT_CHANNEL_SYSCALL_STATE("syscall_state"), /* */
87 LTT_CHANNEL_TASK_STATE("task_state"), /* */
88 LTT_CHANNEL_VM_STATE("vm_state"), /* */
89 LTT_CHANNEL_KPROBE_STATE("kprobe_state"), /* */
90 LTT_CHANNEL_FS("fs"), /* */
91 LTT_CHANNEL_KERNEL("kernel"), /* */
92 LTT_CHANNEL_MM("mm"), /* */
93 LTT_CHANNEL_USERSPACE("userspace"), /* */
94 LTT_CHANNEL_BLOCK("block");
96 private final String inName
;
98 private Channels(String name
) {
102 public String
getInName() {
109 LTT_EVENT_SYSCALL_ENTRY("syscall_entry"), /* */
110 LTT_EVENT_SYSCALL_EXIT("syscall_exit"), /* */
111 LTT_EVENT_TRAP_ENTRY("trap_entry"), /* */
112 LTT_EVENT_TRAP_EXIT("trap_exit"), /* */
113 LTT_EVENT_PAGE_FAULT_ENTRY("page_fault_entry"), /* */
114 LTT_EVENT_PAGE_FAULT_EXIT("page_fault_exit"), /* */
115 LTT_EVENT_PAGE_FAULT_NOSEM_ENTRY("page_fault_nosem_entry"), /* */
116 LTT_EVENT_PAGE_FAULT_NOSEM_EXIT("page_fault_nosem_exit"), /* */
117 LTT_EVENT_IRQ_ENTRY("irq_entry"), /* */
118 LTT_EVENT_IRQ_EXIT("irq_exit"), /* */
119 LTT_EVENT_SOFT_IRQ_RAISE("softirq_raise"), /* */
120 LTT_EVENT_SOFT_IRQ_ENTRY("softirq_entry"), /* */
121 LTT_EVENT_SOFT_IRQ_EXIT("softirq_exit"), /* */
122 LTT_EVENT_SCHED_SCHEDULE("sched_schedule"), /* */
123 LTT_EVENT_PROCESS_FORK("process_fork"), /* */
124 LTT_EVENT_KTHREAD_CREATE("kthread_create"), /* */
125 LTT_EVENT_PROCESS_EXIT("process_exit"), /* */
126 LTT_EVENT_PROCESS_FREE("process_free"), /* */
127 LTT_EVENT_EXEC("exec"), /* */
128 LTT_EVENT_PROCESS_STATE("process_state"), /* */
129 LTT_EVENT_STATEDUMP_END("statedump_end"), /* */
130 LTT_EVENT_FUNCTION_ENTRY("function_entry"), /* */
131 LTT_EVENT_FUNCTION_EXIT("function_exit"), /* */
132 LTT_EVENT_THREAD_BRAND("thread_brand"), /* */
133 LTT_EVENT_REQUEST_ISSUE("_blk_request_issue"), /* */
134 LTT_EVENT_REQUEST_COMPLETE("_blk_request_complete"), /* */
135 LTT_EVENT_LIST_INTERRUPT("interrupt"), /* */
136 LTT_EVENT_SYS_CALL_TABLE("sys_call_table"), /* */
137 LTT_EVENT_SOFTIRQ_VEC("softirq_vec"), /* */
138 LTT_EVENT_KPROBE_TABLE("kprobe_table"), /* */
139 LTT_EVENT_KPROBE("kprobe"); /* */
141 private final String inName
;
142 private final HashSet
<Fields
> children
= new HashSet
<Fields
>();
143 private Channels parent
= null;
144 // Expected to cause a state transition default flag
145 private boolean stateTransition
= false;
151 private Events(String name
) {
155 public String
getInName() {
159 public Channels
getParent() {
163 public void setParent(Channels parent
) {
164 this.parent
= parent
;
167 public HashSet
<Fields
> getChildren() {
171 public boolean isStateTransition() {
172 return stateTransition
;
175 private static void associate() {
176 // SYSCALL, can receive ip, syscall_id
177 LTT_EVENT_SYSCALL_ENTRY
.setParent(Channels
.LTT_CHANNEL_KERNEL
);
178 LTT_EVENT_SYSCALL_ENTRY
.getChildren().add(
179 Fields
.LTT_FIELD_SYSCALL_ID
);
180 LTT_EVENT_SYSCALL_ENTRY
.stateTransition
= true;
182 LTT_EVENT_SYSCALL_EXIT
.setParent(Channels
.LTT_CHANNEL_KERNEL
);
183 LTT_EVENT_SYSCALL_EXIT
.stateTransition
= true;
186 LTT_EVENT_TRAP_ENTRY
.setParent(Channels
.LTT_CHANNEL_KERNEL
);
187 LTT_EVENT_TRAP_ENTRY
.getChildren().add(Fields
.LTT_FIELD_TRAP_ID
);
188 LTT_EVENT_TRAP_ENTRY
.stateTransition
= true;
190 LTT_EVENT_TRAP_EXIT
.setParent(Channels
.LTT_CHANNEL_KERNEL
);
191 LTT_EVENT_TRAP_EXIT
.stateTransition
= true;
194 LTT_EVENT_PAGE_FAULT_ENTRY
.setParent(Channels
.LTT_CHANNEL_KERNEL
);
195 LTT_EVENT_PAGE_FAULT_ENTRY
.getChildren().add(
196 Fields
.LTT_FIELD_TRAP_ID
);
197 LTT_EVENT_PAGE_FAULT_ENTRY
.stateTransition
= true;
199 LTT_EVENT_PAGE_FAULT_EXIT
.setParent(Channels
.LTT_CHANNEL_KERNEL
);
200 LTT_EVENT_PAGE_FAULT_EXIT
.stateTransition
= true;
203 LTT_EVENT_PAGE_FAULT_NOSEM_ENTRY
204 .setParent(Channels
.LTT_CHANNEL_KERNEL
);
205 LTT_EVENT_PAGE_FAULT_NOSEM_ENTRY
.getChildren().add(
206 Fields
.LTT_FIELD_TRAP_ID
);
207 LTT_EVENT_PAGE_FAULT_NOSEM_ENTRY
.stateTransition
= true;
209 LTT_EVENT_PAGE_FAULT_NOSEM_EXIT
.getChildren().add(
210 Fields
.LTT_FIELD_TRAP_ID
);
211 LTT_EVENT_PAGE_FAULT_NOSEM_EXIT
.stateTransition
= true;
213 // IRQ it also receives fields kernel_mode, ip and handler
214 LTT_EVENT_IRQ_ENTRY
.setParent(Channels
.LTT_CHANNEL_KERNEL
);
215 LTT_EVENT_IRQ_ENTRY
.getChildren().add(Fields
.LTT_FIELD_IRQ_ID
);
216 LTT_EVENT_IRQ_ENTRY
.stateTransition
= true;
218 LTT_EVENT_IRQ_EXIT
.setParent(Channels
.LTT_CHANNEL_KERNEL
);
219 LTT_EVENT_IRQ_EXIT
.stateTransition
= true;
222 LTT_EVENT_SOFT_IRQ_RAISE
.setParent(Channels
.LTT_CHANNEL_KERNEL
);
223 LTT_EVENT_SOFT_IRQ_RAISE
.getChildren().add(
224 Fields
.LTT_FIELD_SOFT_IRQ_ID
);
225 LTT_EVENT_SOFT_IRQ_RAISE
.stateTransition
= true;
228 LTT_EVENT_SOFT_IRQ_ENTRY
.setParent(Channels
.LTT_CHANNEL_KERNEL
);
229 LTT_EVENT_SOFT_IRQ_ENTRY
.getChildren().add(
230 Fields
.LTT_FIELD_SOFT_IRQ_ID
);
231 LTT_EVENT_SOFT_IRQ_ENTRY
.stateTransition
= true;
233 LTT_EVENT_SOFT_IRQ_EXIT
.setParent(Channels
.LTT_CHANNEL_KERNEL
);
234 LTT_EVENT_SOFT_IRQ_EXIT
.stateTransition
= true;
237 LTT_EVENT_SCHED_SCHEDULE
.setParent(Channels
.LTT_CHANNEL_KERNEL
);
238 LTT_EVENT_SCHED_SCHEDULE
.getChildren().add(
239 Fields
.LTT_FIELD_PREV_PID
);
240 LTT_EVENT_SCHED_SCHEDULE
.getChildren().add(
241 Fields
.LTT_FIELD_NEXT_PID
);
242 LTT_EVENT_SCHED_SCHEDULE
.getChildren().add(
243 Fields
.LTT_FIELD_PREV_STATE
);
244 LTT_EVENT_SCHED_SCHEDULE
.stateTransition
= true;
247 LTT_EVENT_PROCESS_FORK
.setParent(Channels
.LTT_CHANNEL_KERNEL
);
248 LTT_EVENT_PROCESS_FORK
.getChildren().add(
249 Fields
.LTT_FIELD_PARENT_PID
);
250 LTT_EVENT_PROCESS_FORK
.getChildren()
251 .add(Fields
.LTT_FIELD_CHILD_PID
);
252 LTT_EVENT_PROCESS_FORK
.getChildren().add(
253 Fields
.LTT_FIELD_CHILD_TGID
);
254 LTT_EVENT_PROCESS_FORK
.stateTransition
= true;
257 LTT_EVENT_KTHREAD_CREATE
.setParent(Channels
.LTT_CHANNEL_KERNEL
);
258 LTT_EVENT_KTHREAD_CREATE
.getChildren().add(Fields
.LTT_FIELD_PID
);
259 LTT_EVENT_KTHREAD_CREATE
.stateTransition
= true;
262 LTT_EVENT_PROCESS_EXIT
.setParent(Channels
.LTT_CHANNEL_KERNEL
);
263 LTT_EVENT_PROCESS_EXIT
.getChildren().add(Fields
.LTT_FIELD_PID
);
264 LTT_EVENT_PROCESS_EXIT
.stateTransition
= true;
267 LTT_EVENT_PROCESS_FREE
.setParent(Channels
.LTT_CHANNEL_KERNEL
);
268 LTT_EVENT_PROCESS_FREE
.getChildren().add(Fields
.LTT_FIELD_PID
);
269 LTT_EVENT_PROCESS_FREE
.stateTransition
= true;
272 LTT_EVENT_EXEC
.setParent(Channels
.LTT_CHANNEL_FS
);
273 LTT_EVENT_EXEC
.getChildren().add(Fields
.LTT_FIELD_FILENAME
);
274 LTT_EVENT_EXEC
.stateTransition
= true;
277 LTT_EVENT_THREAD_BRAND
.setParent(Channels
.LTT_CHANNEL_USERSPACE
);
278 LTT_EVENT_THREAD_BRAND
.getChildren().add(Fields
.LTT_FIELD_NAME
);
279 LTT_EVENT_THREAD_BRAND
.stateTransition
= true;
281 // EVENT PROCESS STATE
282 LTT_EVENT_PROCESS_STATE
.setParent(Channels
.LTT_CHANNEL_TASK_STATE
);
283 LTT_EVENT_PROCESS_STATE
.getChildren().add(Fields
.LTT_FIELD_PID
);
284 LTT_EVENT_PROCESS_STATE
.getChildren().add(
285 Fields
.LTT_FIELD_PARENT_PID
);
286 LTT_EVENT_PROCESS_STATE
.getChildren().add(Fields
.LTT_FIELD_NAME
);
287 LTT_EVENT_PROCESS_STATE
.getChildren().add(Fields
.LTT_FIELD_TYPE
);
288 LTT_EVENT_PROCESS_STATE
.getChildren().add(Fields
.LTT_FIELD_MODE
);
289 LTT_EVENT_PROCESS_STATE
.getChildren().add(Fields
.LTT_FIELD_SUBMODE
);
290 LTT_EVENT_PROCESS_STATE
.getChildren().add(Fields
.LTT_FIELD_STATUS
);
291 LTT_EVENT_PROCESS_STATE
.getChildren().add(Fields
.LTT_FIELD_TGID
);
292 LTT_EVENT_PROCESS_STATE
.stateTransition
= true;
294 // EVENT STATEDUMP END
295 LTT_EVENT_STATEDUMP_END
296 .setParent(Channels
.LTT_CHANNEL_GLOBAL_STATE
);
297 LTT_EVENT_STATEDUMP_END
.stateTransition
= true;
299 // LTT_EVENT_LIST_INTERRUPT
300 LTT_EVENT_LIST_INTERRUPT
.setParent(Channels
.LTT_CHANNEL_IRQ_STATE
);
301 LTT_EVENT_LIST_INTERRUPT
.getChildren().add(Fields
.LTT_FIELD_ACTION
);
302 LTT_EVENT_LIST_INTERRUPT
.getChildren().add(Fields
.LTT_FIELD_IRQ_ID
);
303 LTT_EVENT_LIST_INTERRUPT
.stateTransition
= true;
305 // LTT_EVENT_REQUEST_ISSUE
306 LTT_EVENT_REQUEST_ISSUE
.setParent(Channels
.LTT_CHANNEL_BLOCK
);
307 LTT_EVENT_REQUEST_ISSUE
.getChildren().add(Fields
.LTT_FIELD_MAJOR
);
308 LTT_EVENT_REQUEST_ISSUE
.getChildren().add(Fields
.LTT_FIELD_MINOR
);
309 LTT_EVENT_REQUEST_ISSUE
.getChildren().add(Fields
.LTT_FIELD_OPERATION
);
310 LTT_EVENT_REQUEST_ISSUE
.getChildren().add(
311 Fields
.LTT_FIELD_OPERATION
);
312 LTT_EVENT_REQUEST_ISSUE
.stateTransition
= true;
314 // LTT_EVENT_REQUEST_COMPLETE
315 LTT_EVENT_REQUEST_COMPLETE
.setParent(Channels
.LTT_CHANNEL_BLOCK
);
316 LTT_EVENT_REQUEST_COMPLETE
.getChildren()
317 .add(Fields
.LTT_FIELD_MAJOR
);
318 LTT_EVENT_REQUEST_COMPLETE
.getChildren()
319 .add(Fields
.LTT_FIELD_MINOR
);
320 LTT_EVENT_REQUEST_COMPLETE
.getChildren().add(
321 Fields
.LTT_FIELD_OPERATION
);
322 LTT_EVENT_REQUEST_COMPLETE
.stateTransition
= true;
324 // LTT_EVENT_FUNCTION_ENTRY
325 LTT_EVENT_FUNCTION_ENTRY
.setParent(Channels
.LTT_CHANNEL_USERSPACE
);
326 LTT_EVENT_FUNCTION_ENTRY
.getChildren()
327 .add(Fields
.LTT_FIELD_THIS_FN
);
328 LTT_EVENT_FUNCTION_ENTRY
.getChildren().add(
329 Fields
.LTT_FIELD_CALL_SITE
);
330 LTT_EVENT_FUNCTION_ENTRY
.stateTransition
= true;
332 // LTT_EVENT_FUNCTION_EXIT
333 LTT_EVENT_FUNCTION_EXIT
.setParent(Channels
.LTT_CHANNEL_USERSPACE
);
334 LTT_EVENT_FUNCTION_EXIT
.getChildren().add(Fields
.LTT_FIELD_THIS_FN
);
335 LTT_EVENT_FUNCTION_EXIT
.getChildren().add(
336 Fields
.LTT_FIELD_CALL_SITE
);
337 LTT_EVENT_FUNCTION_EXIT
.stateTransition
= true;
339 // LTT_EVENT_FUNCTION_EXIT
340 LTT_EVENT_FUNCTION_EXIT
.setParent(Channels
.LTT_CHANNEL_USERSPACE
);
341 LTT_EVENT_FUNCTION_EXIT
.getChildren().add(Fields
.LTT_FIELD_THIS_FN
);
342 LTT_EVENT_FUNCTION_EXIT
.getChildren().add(
343 Fields
.LTT_FIELD_CALL_SITE
);
344 LTT_EVENT_FUNCTION_EXIT
.stateTransition
= true;
346 // LTT_EVENT_SYS_CALL_TABLE
347 LTT_EVENT_SYS_CALL_TABLE
348 .setParent(Channels
.LTT_CHANNEL_SYSCALL_STATE
);
349 LTT_EVENT_SYS_CALL_TABLE
.getChildren().add(Fields
.LTT_FIELD_ID
);
350 LTT_EVENT_SYS_CALL_TABLE
.getChildren()
351 .add(Fields
.LTT_FIELD_ADDRESS
);
352 LTT_EVENT_SYS_CALL_TABLE
.getChildren().add(Fields
.LTT_FIELD_SYMBOL
);
353 LTT_EVENT_SYS_CALL_TABLE
.stateTransition
= true;
355 // LTT_EVENT_SYS_CALL_TABLE
356 LTT_EVENT_KPROBE_TABLE
.setParent(Channels
.LTT_CHANNEL_KPROBE_STATE
);
357 LTT_EVENT_KPROBE_TABLE
.getChildren().add(Fields
.LTT_FIELD_IP
);
358 LTT_EVENT_KPROBE_TABLE
.getChildren().add(Fields
.LTT_FIELD_SYMBOL
);
359 LTT_EVENT_KPROBE_TABLE
.stateTransition
= true;
361 // LTT_EVENT_SOFTIRQ_VEC
362 LTT_EVENT_SOFTIRQ_VEC
.setParent(Channels
.LTT_CHANNEL_SOFTIRQ_STATE
);
363 LTT_EVENT_SOFTIRQ_VEC
.getChildren().add(Fields
.LTT_FIELD_ID
);
364 LTT_EVENT_SOFTIRQ_VEC
.getChildren().add(Fields
.LTT_FIELD_ADDRESS
);
365 LTT_EVENT_SOFTIRQ_VEC
.getChildren().add(Fields
.LTT_FIELD_SYMBOL
);
366 LTT_EVENT_SOFTIRQ_VEC
.stateTransition
= true;
372 LTT_FIELD_SYSCALL_ID("syscall_id"), /* */
373 LTT_FIELD_TRAP_ID("trap_id"), /* */
374 LTT_FIELD_IRQ_ID("irq_id"), /* */
375 LTT_FIELD_SOFT_IRQ_ID("softirq_id"), /* */
376 LTT_FIELD_PREV_PID("prev_pid"), /* */
377 LTT_FIELD_NEXT_PID("next_pid"), /* */
378 LTT_FIELD_PREV_STATE("prev_state"), /* */
379 LTT_FIELD_PARENT_PID("parent_pid"), /* */
380 LTT_FIELD_CHILD_PID("child_pid"), /* */
381 LTT_FIELD_PID("pid"), /* */
382 LTT_FIELD_TGID("tgid"), /* */
383 LTT_FIELD_CHILD_TGID("child_tgid"), /* */
384 LTT_FIELD_FILENAME("filename"), /* */
385 LTT_FIELD_NAME("name"), /* */
386 LTT_FIELD_TYPE("type"), /* */
387 LTT_FIELD_MODE("mode"), /* */
388 LTT_FIELD_SUBMODE("submode"), /* */
389 LTT_FIELD_STATUS("status"), /* */
390 LTT_FIELD_THIS_FN("this_fn"), /* */
391 LTT_FIELD_CALL_SITE("call_site"), /* */
392 LTT_FIELD_MAJOR("major"), /* */
393 LTT_FIELD_MINOR("minor"), /* */
394 LTT_FIELD_OPERATION("direction"), /* */
395 LTT_FIELD_ACTION("action"), /* */
396 LTT_FIELD_ID("id"), /* */
397 LTT_FIELD_ADDRESS("address"), /* */
398 LTT_FIELD_SYMBOL("symbol"), /* */
399 LTT_FIELD_IP("ip"); /* */
401 private final String inName
;
403 private Fields(String name
) {
407 public String
getInName() {
412 public enum CpuMode
{
413 LTTV_CPU_UNKNOWN("unknown"), /* */
414 LTTV_CPU_IDLE("idle"), /* */
415 LTTV_CPU_BUSY("busy"), /* */
416 LTTV_CPU_IRQ("irq"), /* */
417 LTTV_CPU_SOFT_IRQ("softirq"), /* */
418 LTTV_CPU_TRAP("trap"); /* */
422 private CpuMode(String name
) {
426 public String
getInName() {
432 public enum IRQMode
{
433 LTTV_IRQ_UNKNOWN("unknown"), /* */
434 LTTV_IRQ_IDLE("idle"), /* */
435 LTTV_IRQ_BUSY("busy"); /* */
439 private IRQMode(String name
) {
443 public String
getInName() {
449 public enum SoftIRQMode
{
450 LTTV_SOFT_IRQ_UNKNOWN("unknown"), /* */
451 LTTV_SOFT_IRQ_IDLE("idle"), /* */
452 LTTV_SOFT_IRQ_PENDING("pending"), /* */
453 LTTV_SOFT_IRQ_BUSY("busy"); /* */
457 private SoftIRQMode(String name
) {
461 public String
getInName() {
467 public enum BdevMode
{
468 LTTV_BDEV_UNKNOWN("unknown"), /* */
469 LTTV_BDEV_IDLE("idle"), /* */
470 LTTV_BDEV_BUSY_READING("busy_reading"), /* */
471 LTTV_BDEV_BUSY_WRITING("busy_writing"); /* */
475 private BdevMode(String name
) {
479 public String
getInName() {
485 public enum TrapMode
{
486 LTTV_TRAP_UNKNOWN("unknown"), /* */
487 LTTV_TRAP_IDLE("idle"), /* */
488 LTTV_TRAP_BUSY("busy"); /* */
492 private TrapMode(String name
) {
496 public String
getInName() {
501 public enum ProcessType
{
502 LTTV_STATE_USER_THREAD("USER_THREAD"), /* */
503 LTTV_STATE_KERNEL_THREAD("KERNEL_THREAD"); /* */
507 private ProcessType(String name
) {
511 public String
getInName() {
517 public enum ProcessStatus
{
518 LTTV_STATE_UNNAMED("UNNAMED"), LTTV_STATE_WAIT_FORK("WAIT_FORK"), /* */
519 LTTV_STATE_WAIT_CPU("WAIT_CPU"), /* */
520 LTTV_STATE_EXIT("EXIT"), /* */
521 LTTV_STATE_ZOMBIE("ZOMBIE"), /* */
522 LTTV_STATE_WAIT("WAIT"), /* */
523 LTTV_STATE_RUN("RUN"), /* */
524 LTTV_STATE_DEAD("DEAD"); /* */
528 private ProcessStatus(String name
) {
532 public String
getInName() {
538 public enum ExecutionSubMode
{
539 LTTV_STATE_SUBMODE_UNKNOWN("UNKNOWN"), /* */
540 LTTV_STATE_SUBMODE_NONE("NONE"); /* */
544 private ExecutionSubMode(String name
) {
548 public String
getInName() {
554 public enum ExecutionMode
{
555 LTTV_STATE_MODE_UNKNOWN("MODE_UNKNOWN"), /* */
556 LTTV_STATE_USER_MODE("USER_MODE"), /* */
557 LTTV_STATE_SYSCALL("SYSCALL"), /* */
558 LTTV_STATE_TRAP("TRAP"), /* */
559 LTTV_STATE_IRQ("IRQ"), /* */
560 LTTV_STATE_SOFT_IRQ("SOFTIRQ"); /* */
564 private ExecutionMode(String name
) {
568 public String
getInName() {
574 public enum GenStates
{
575 LTTV_STATE_TRACEFILES("tracefiles"), /* */
576 LTTV_STATE_PROCESSES("processes"), /* */
577 LTTV_STATE_PROCESS("process"), /* */
578 LTTV_STATE_RUNNING_PROCESS("running_process"), /* */
579 LTTV_STATE_EVENT("event"), /* */
580 LTTV_STATE_SAVED_STATES("saved states"), /* */
581 LTTV_STATE_SAVED_STATES_TIME("saved states time"), /* */
582 LTTV_STATE_TIME("time"), /* */
583 LTTV_STATE_HOOKS("saved state hooks"), /* */
584 LTTV_STATE_NAME_TABLES("name tables"), /* */
585 LTTV_STATE_TRACE_STATE_USE_COUNT("trace_state_use_count"), /* */
586 LTTV_STATE_RESOURCE_CPUS("cpu count"), /* */
587 LTTV_STATE_RESOURCE_IRQS("irq resource states"), /* */
588 LTTV_STATE_RESOURCE_SOFT_IRQS("soft irq resource states"), /* */
589 LTTV_STATE_RESOURCE_TRAPS("trap resource states"), /* */
590 LTTV_STATE_RESOURCE_BLKDEVS("blkdevs resource states"); /* */
594 private GenStates(String name
) {
598 public String
getInName() {
604 // ========================================================================
606 // =======================================================================
608 * Return the string to any known event
610 * @return the eventstrmap
612 public HashMap
<String
, Events
> getEventStrmap() {
617 * Return the string to state transition events map
619 * @return the stateTransEventMap
621 public HashMap
<String
, Events
> getStateTransEventMap() {
622 return stateTransEventMap
;
626 * @return the mapping from int to system call names
628 public String
[] getSyscallNames() {
629 return syscall_names
;
633 * @return the mapping from int to trap names
635 public String
[] getTrapNames() {
640 * @return the mapping from int to irq names
642 public String
[] getIrqNames() {
647 * @return the mapping from int to softirq name
649 public String
[] getSoftIrqNames() {
650 return soft_irq_names
;