/home/hillier_g/checkout/most4linux/most-kernel/most-measurements.h File Reference

Functionality that was added for measurements. More...

Go to the source code of this file.

Data Structures

struct  measuring_schedlat_data

Defines

#define MEASUREMENT_MAGIC_START_HIGH   0x90520000
#define MEASUREMENT_MAGIC_END_HIGH   0x52900000
#define MEASUREMENT_MAGIC_START_REC_ISR   (0x243A | MEASUREMENT_MAGIC_START_HIGH)
#define MEASUREMENT_MAGIC_END_REC_ISR   (0x3A24 | MEASUREMENT_MAGIC_END_HIGH)
#define MEASUREMENT_INT_CONSTANT   MOST_PCI_RESERVED_5
#define MOST_LH(low, high)   ((((high) & 0xFFFF) << 16) | ((low) & 0xFFFF))
#define MOST_LOW(value)   ((value) & 0xFFFF)
#define MOST_HIGH(value)   (((value) & 0xFFFF0000) > 16)
#define measuring_int_begin()
#define measuring_int_end()
#define measuring_int_error_sharing()   rtnrt_warn("IRQ sharing is not supported with measurements\n")

Functions

static void measuring_receive_isr_start (struct rx_buffer *buffer)
static void measuring_receive_isr_wakeup (void)
static void print_measuring_warning (void)

Variables

measuring_schedlat_data packed
static struct rx_buffer rxbuf_copy


Detailed Description

Functionality that was added for measurements.

Functionality that was added for measurements. The first group are memory accessed that do nothing in reality but that were added to enable the PCI tracing.

Definition in file most-measurements.h.


Define Documentation

#define MEASUREMENT_MAGIC_START_HIGH   0x90520000

High 16 bit word of the magic number that is used to identify the start of data that is needed for measurements.

See also:
MEASUREMENT_MAGIC_START_REC_ISR

Definition at line 53 of file most-measurements.h.

#define MEASUREMENT_MAGIC_END_HIGH   0x52900000

High 16 bit word of the magic number that is used to identify the end of data that is needed for measurements.

See also:
MEASUREMENT_MAGIC_END_REC_ISR

Definition at line 61 of file most-measurements.h.

#define MEASUREMENT_MAGIC_START_REC_ISR   (0x243A | MEASUREMENT_MAGIC_START_HIGH)

Magic number that is used to determine the start of the time stamp which is added in the receive interrupt service routine. It's needed to measure the scheduling latency.

Definition at line 68 of file most-measurements.h.

Referenced by measuring_receive_isr_wakeup().

#define MEASUREMENT_MAGIC_END_REC_ISR   (0x3A24 | MEASUREMENT_MAGIC_END_HIGH)

Magic number that is used to determine the end of the time stamp which is added in the receive interrupt service routine. It's needed to measure the scheduling latency.

Definition at line 76 of file most-measurements.h.

Referenced by measuring_receive_isr_wakeup().

#define MEASUREMENT_INT_CONSTANT   MOST_PCI_RESERVED_5

The constant that is used for measuring the interrupt latency. This differs for RT and NRT because of compatibility reasons.

Definition at line 87 of file most-measurements.h.

#define MOST_LH ( low,
high   )     ((((high) & 0xFFFF) << 16) | ((low) & 0xFFFF))

Macro to combine a low and a high byte value

Definition at line 97 of file most-measurements.h.

#define MOST_LOW ( value   )     ((value) & 0xFFFF)

Macro to get the low value.

Definition at line 103 of file most-measurements.h.

#define MOST_HIGH ( value   )     (((value) & 0xFFFF0000) > 16)

Macro to get the high value

Definition at line 109 of file most-measurements.h.

 
#define measuring_int_begin (  ) 

Value:

do {                                                                \
            readreg_int(dev, MEASUREMENT_INT_CONSTANT);                     \
        } while (0)
Accesses the MOST_PCI_RESERVED_4 (NRT) or MOST_PCI_RESERVED_5 (RT) register at the begin of a real-time interrupt service routine if MEASURING_PCI is turned on.

Definition at line 121 of file most-measurements.h.

Referenced by handle_interrupt().

 
#define measuring_int_end (  ) 

Value:

do {                                                                \
            udelay(1);                                                      \
            readreg_int(dev, MOST_PCI_RESERVED_6);                          \
        } while (0)
Accesses the MOST_PCI_RESERVED_6 register at the end of the ISR if MEASURING_PCI is turned on.

Definition at line 130 of file most-measurements.h.

Referenced by handle_interrupt().

 
#define measuring_int_error_sharing (  )     rtnrt_warn("IRQ sharing is not supported with measurements\n")

Prints an error message in case MEASURING_PCI was defined. This is used if the ISR detects that it is not responsible for the specific interrupt. IRQ sharing doesn't work with the measuring method.

Definition at line 141 of file most-measurements.h.

Referenced by handle_interrupt().


Function Documentation

static void measuring_receive_isr_start ( struct rx_buffer buffer  )  [inline, static]

Must be called before modifying the buffer in the ISR of the MOST synchronous driver. It simply copies the write pointer of the buffer so that the time stamp can be added after the modification taked place.

Parameters:
[in] buffer a pointer to the receive buffer which is modified afterwards

Definition at line 187 of file most-measurements.h.

References rx_buffer::buffer, and rxbuf_copy.

Referenced by most_sync_int_handler(), and most_sync_rt_interrupt_handler().

static void measuring_receive_isr_wakeup ( void   )  [inline, static]

Adds the timestamp to the receive interrupt service routine. This function expands to nothing if MEASURING_SCHED is not defined. See also the diploma thesis, chapter "Evaluation" and the README of measuring/3_sched_latency.

Definition at line 198 of file most-measurements.h.

References measuring_schedlat_data::counter, measuring_schedlat_data::magic_end, measuring_schedlat_data::magic_start, MEASUREMENT_MAGIC_END_REC_ISR, MEASUREMENT_MAGIC_START_REC_ISR, rxbuf_copy, rxbuf_put(), and measuring_schedlat_data::tsc.

Referenced by most_sync_int_handler(), and most_sync_rt_interrupt_handler().

static void print_measuring_warning ( void   )  [inline, static]

Prints a warning if the module is loaded (i.e. the function is called) if the driver was compiled with measurings turned on. Does nothing otherwise.

Definition at line 223 of file most-measurements.h.

References rtnrt_warn.

Referenced by most_sync_init(), and most_sync_rt_init().


Variable Documentation

struct measuring_schedlat_data packed

Data structure which represents the field that is inserted when measuring the scheduling latency in the interrupt service routine.

struct rx_buffer rxbuf_copy [static]

Copy of the receive buffer.

See also:
measuring_receive_isr_start()

Definition at line 177 of file most-measurements.h.

Referenced by measuring_receive_isr_start(), and measuring_receive_isr_wakeup().


Generated on Fri Mar 9 14:48:58 2007 for MOST Linux Drivers (Linux and RTAI) by  doxygen 1.5.0