Subversion Repositories shark

Rev

Rev 1027 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
352 giacomo 1
/*
2
 
3
  Events List File, from York University and F.I.R.S.T project
4
 
5
*/
6
 
7
 
8
#ifndef __FTrace__
9
#define __FTrace__
10
 
11
 
12
// List of events, these are 8 bit constants, the
13
// the low 4 bits, indicates its class,
14
// the high 4 bits indicate the type of event in the class.
15
// (This allows an easy mechanisms for filtering events)
16
 
1027 tullio 17
/* Tool : used for the filter masking*/
18
#define FTrace_family_mask   0x0F
19
 
352 giacomo 20
// general trace events
560 giacomo 21
#define FTrace_EVT_empty	      0x00
781 giacomo 22
#define FTrace_EVT_cycles_per_msec    0x10 // Par1 [empty] Par2 [clk/msec]
23
#define FTrace_EVT_trace_start        0x20 // Par1 [empty] Par2 [empty]
24
#define FTrace_EVT_trace_stop         0x30 // Par1 [empty] Par2 [empty]
352 giacomo 25
#define FTrace_EVT_blackout_start     0x40
26
#define FTrace_EVT_blackout_end       0x50
781 giacomo 27
#define FTrace_EVT_id                 0x60 // Par1 [ctx] Par2 [pid]
352 giacomo 28
#define FTrace_EVT_numeevents         0x70
29
 
30
// lightweight tracing events
781 giacomo 31
#define FTrace_EVT_ipoint             0x01 // Par1 [number] Par2 [empty]
352 giacomo 32
 
33
// Task related events
781 giacomo 34
#define FTrace_EVT_task_create        0x02 // Par1 [ctx] Par2 [pid]
35
#define FTrace_EVT_task_activate      0x12 // Par1 [ctx] Par2 [empty]
352 giacomo 36
#define FTrace_EVT_task_dispatch      0x22
37
#define FTrace_EVT_task_epilogue      0x32
781 giacomo 38
#define FTrace_EVT_task_end           0x42 // Par1 [ctx] Par2 [pid]
352 giacomo 39
#define FTrace_EVT_task_begin_cycle   0x52
781 giacomo 40
#define FTrace_EVT_task_end_cycle     0x62 // Par1 [ctx] Par2 [level]
352 giacomo 41
#define FTrace_EVT_task_sleep         0x72
781 giacomo 42
#define FTrace_EVT_task_schedule      0x82 // Par1 [exec_shadow.ctx] Par2 [exec.ctx]
43
#define FTrace_EVT_task_timer         0x92 // Par1 [ctx] Par2 [level]
44
#define FTrace_EVT_task_disable       0xA2
45
#define FTrace_EVT_task_deadline_miss 0xB2 // Par1 [ctx] Par2 [empty]
46
#define FTrace_EVT_task_wcet_violation 0xC2 // Par1 [ctx] Par2 [empty]
352 giacomo 47
 
48
// interrupt events, even more lightweight than ipoints
781 giacomo 49
#define FTrace_EVT_interrupt_start    0x03 // Par1 [int] Par2 [empty]
50
#define FTrace_EVT_interrupt_end      0x13 // Par1 [int] Par2 [empty]
352 giacomo 51
#define FTrace_EVT_interrupt_hit      0x23 // instant where interrupt was hit (no end)
52
#define FTrace_EVT_interrupt_count    0x33 // number of interrupts raised since last interrupt_count
53
 
54
// other CPU specific events
55
#define FTrace_EVT_to_real_mode       0x04
56
#define FTrace_EVT_to_protected_mode  0x14
57
#define FTrace_EVT_CLI                0x24
58
#define FTrace_EVT_STI                0x34
59
 
60
// Changes on task attributes and state
61
#define FTrace_EVT_set_priority       0x05
781 giacomo 62
#define FTrace_EVT_context_switch     0x15 // Par1 [ctx]
63
#define FTrace_EVT_inheritance        0x25 // Par1 [exec_shadow.ctx] Par2 [exec.ctx]
386 giacomo 64
 
352 giacomo 65
// mutex events
66
#define FTrace_EVT_set_mutex_create   0x06
781 giacomo 67
#define FTrace_EVT_set_mutex_lock     0x16 // Par1 [ctx] Par2 [mutex]
352 giacomo 68
#define FTrace_EVT_set_mutex_inherit  0x26
781 giacomo 69
#define FTrace_EVT_set_mutex_unlock   0x36 // Par1 [ctx] Par2 [mutex]
70
#define FTrace_EVT_set_mutex_wait     0x46 // Par1 [ctx] Par2 [mutex]
1042 tullio 71
#define FTrace_EVT_set_mutex_post     0x56 // Par1 [ctx] Par2 [mutex]
352 giacomo 72
 
73
// signal events
74
#define FTrace_EVT_signal             0x07
75
// more here (MarteOS)
76
 
77
// specific server events
781 giacomo 78
#define FTrace_EVT_server_create      0x08 // Par1 [empty] Par2 [server]
79
#define FTrace_EVT_server_replenish   0x18 // Par1 [empty] Par2 [server]
80
#define FTrace_EVT_server_exhaust     0x28 // Par1 [empty] Par2 [server]
81
#define FTrace_EVT_server_reclaiming  0x38 // Par1 [empty] Par2 [server]
82
#define FTrace_EVT_server_remove      0x48 // Par1 [empty] Par2 [server]
83
#define FTrace_EVT_server_active      0x58 // Par1 [empty] Par2 [server]
84
#define FTrace_EVT_server_using_rec   0x68 // Par1 [reclaiming] Par2 [server]
352 giacomo 85
 
86
// user defined events
87
#define FTrace_EVT_user_event_0       0x09
88
#define FTrace_EVT_user_event_1       0x19
89
#define FTrace_EVT_user_event_2       0x29
90
#define FTrace_EVT_user_event_3       0x39
91
#define FTrace_EVT_user_event_4       0x49
92
#define FTrace_EVT_user_event_5       0x59
93
#define FTrace_EVT_user_event_6       0x69
94
#define FTrace_EVT_user_event_7       0x79
95
#define FTrace_EVT_user_event_8       0x89
96
#define FTrace_EVT_user_event_9       0x99
97
#define FTrace_EVT_user_event_10      0xA9
98
#define FTrace_EVT_user_event_11      0xB9
99
#define FTrace_EVT_user_event_12      0xC9
100
#define FTrace_EVT_user_event_13      0xD9
101
#define FTrace_EVT_user_event_14      0xE9
1027 tullio 102
//#define FTrace_EVT_user_event_15      0xF9  // Tool: removed
352 giacomo 103
 
104
// Timer Events
781 giacomo 105
#define FTrace_EVT_timer_post         0x0B // Par 1 [empty] Par2 [empty]
106
#define FTrace_EVT_timer_delete       0x1B // Par 1 [empty] Par2 [empty]
107
#define FTrace_EVT_timer_wakeup_start 0x2B // Par 1 [empty] Par2 [empty]
108
#define FTrace_EVT_timer_wakeup_end   0x3B // Par 1 [ctx] Par2 [empty]
352 giacomo 109
 
110
// generic data events
111
#define FTrace_EVT_data_pointer       0x1A // holds a pointer of data from
112
// previous event
113
 
501 giacomo 114
#define FTrace_EVT_next_chunk	      0xFF
115
 
352 giacomo 116
// types of the data pointer
117
#define FTrace_DATA_int		      1
118
#define FTrace_DATA_char              2
119
 
120
// filter definitions
121
#define FTrace_filter_trace_Events    0xF0
122
#define FTrace_filter_ipoint          0xF1
123
#define FTrace_filter_task            0xF2
124
#define FTrace_filter_interrupt       0xF3
125
#define FTrace_filter_CPU             0xF4
126
#define FTrace_filter_priority        0xF5
127
#define FTrace_filter_mutex           0xF6
128
#define FTrace_filter_signal          0xF7
129
#define FTrace_filter_server          0xF8
130
#define FTrace_filter_user            0xF9
131
#define FTrace_filter_data            0xFA
132
#define FTrace_filter_timer	      0xFB
133
 
134
#endif