Subversion Repositories shark

Rev

Rev 352 | Rev 362 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | RSS feed

/*

  Events List File, from York University and F.I.R.S.T project

*/



#ifndef __FTrace__
#define __FTrace__


// List of events, these are 8 bit constants, the
// the low 4 bits, indicates its class,
// the high 4 bits indicate the type of event in the class.
// (This allows an easy mechanisms for filtering events)

// general trace events
#define FTrace_EVT_ticks_per_sec      0x00
#define FTrace_EVT_cycles_per_tick    0x10
#define FTrace_EVT_trace_start        0x20
#define FTrace_EVT_trace_stop         0x30
#define FTrace_EVT_blackout_start     0x40
#define FTrace_EVT_blackout_end       0x50
#define FTrace_EVT_id                 0x60 //??
#define FTrace_EVT_numeevents         0x70

// lightweight tracing events
#define FTrace_EVT_ipoint             0x01

// Task related events
#define FTrace_EVT_task_create        0x02
#define FTrace_EVT_task_activate      0x12
#define FTrace_EVT_task_dispatch      0x22
#define FTrace_EVT_task_epilogue      0x32
#define FTrace_EVT_task_end           0x42
#define FTrace_EVT_task_begin_cycle   0x52
#define FTrace_EVT_task_end_cycle     0x62
#define FTrace_EVT_task_sleep         0x72
#define FTrace_EVT_task_schedule      0x82
#define FTrace_EVT_task_timer         0x92
#define FTrace_EVT_task_disable       0xA2

// interrupt events, even more lightweight than ipoints
#define FTrace_EVT_interrupt_start    0x03
#define FTrace_EVT_interrupt_end      0x13
#define FTrace_EVT_interrupt_hit      0x23 // instant where interrupt was hit (no end)
#define FTrace_EVT_interrupt_count    0x33 // number of interrupts raised since last interrupt_count

// other CPU specific events
#define FTrace_EVT_to_real_mode       0x04
#define FTrace_EVT_to_protected_mode  0x14
#define FTrace_EVT_CLI                0x24
#define FTrace_EVT_STI                0x34

// Changes on task attributes and state
#define FTrace_EVT_set_priority       0x05
#define FTrace_EVT_context_switch     0x15
// mutex events
#define FTrace_EVT_set_mutex_create   0x06
#define FTrace_EVT_set_mutex_lock     0x16
#define FTrace_EVT_set_mutex_inherit  0x26
#define FTrace_EVT_set_mutex_unlock   0x36
#define FTrace_EVT_set_mutex_wait     0x46

// signal events
#define FTrace_EVT_signal             0x07
// more here (MarteOS)

// specific server events
#define FTrace_EVT_server_create      0x08
#define FTrace_EVT_server_replenish   0x18
#define FTrace_EVT_server_exhaust     0x28

// user defined events
#define FTrace_EVT_user_event_0       0x09
#define FTrace_EVT_user_event_1       0x19
#define FTrace_EVT_user_event_2       0x29
#define FTrace_EVT_user_event_3       0x39
#define FTrace_EVT_user_event_4       0x49
#define FTrace_EVT_user_event_5       0x59
#define FTrace_EVT_user_event_6       0x69
#define FTrace_EVT_user_event_7       0x79
#define FTrace_EVT_user_event_8       0x89
#define FTrace_EVT_user_event_9       0x99
#define FTrace_EVT_user_event_10      0xA9
#define FTrace_EVT_user_event_11      0xB9
#define FTrace_EVT_user_event_12      0xC9
#define FTrace_EVT_user_event_13      0xD9
#define FTrace_EVT_user_event_14      0xE9
#define FTrace_EVT_user_event_15      0xF9

// Timer Events
#define FTrace_EVT_timer_post         0x0B
#define FTrace_EVT_timer_delete       0x1B
#define FTrace_EVT_timer_wakeup_start 0x2B
#define FTrace_EVT_timer_wakeup_end   0x3B

// generic data events
#define FTrace_EVT_data_pointer       0x1A // holds a pointer of data from
// previous event

// types of the data pointer
#define FTrace_DATA_int               1
#define FTrace_DATA_char              2

// filter definitions
#define FTrace_filter_trace_Events    0xF0
#define FTrace_filter_ipoint          0xF1
#define FTrace_filter_task            0xF2
#define FTrace_filter_interrupt       0xF3
#define FTrace_filter_CPU             0xF4
#define FTrace_filter_priority        0xF5
#define FTrace_filter_mutex           0xF6
#define FTrace_filter_signal          0xF7
#define FTrace_filter_server          0xF8
#define FTrace_filter_user            0xF9
#define FTrace_filter_data            0xFA
#define FTrace_filter_timer           0xFB

#endif