PR 1914/cpukit
	* rtems/score/cpu.h: Document CPU_TIMESTAMP_USE_STRUCT_TIMESPEC,
	CPU_TIMESTAMP_USE_INT64, and CPU_TIMESTAMP_USE_INT64_INLINE.
This commit is contained in:
Sebastian Huber
2011-09-22 07:16:06 +00:00
parent 82525a756d
commit f40139bb9b
2 changed files with 76 additions and 0 deletions

View File

@@ -1,3 +1,9 @@
2011-09-22 Sebastian Huber <sebastian.huber@embedded-brains.de>
PR 1914/cpukit
* rtems/score/cpu.h: Document CPU_TIMESTAMP_USE_STRUCT_TIMESPEC,
CPU_TIMESTAMP_USE_INT64, and CPU_TIMESTAMP_USE_INT64_INLINE.
2011-07-24 Joel Sherrill <joel.sherrill@oarcorp.com> 2011-07-24 Joel Sherrill <joel.sherrill@oarcorp.com>
* cpu.c: Remove /*PAGE markers which were interpreted by a long dead * cpu.c: Remove /*PAGE markers which were interpreted by a long dead

View File

@@ -355,6 +355,76 @@ extern "C" {
*/ */
#define CPU_STRUCTURE_ALIGNMENT #define CPU_STRUCTURE_ALIGNMENT
/**
* @defgroup CPUTimestamp Processor Dependent Timestamp Support
*
* This group assists in issues related to timestamp implementation.
*
* The port must choose exactly one of the following defines:
* - #define CPU_TIMESTAMP_USE_STRUCT_TIMESPEC TRUE
* - #define CPU_TIMESTAMP_USE_INT64 TRUE
* - #define CPU_TIMESTAMP_USE_INT64_INLINE TRUE
*
* Performance of int64_t versus struct timespec
* =============================================
*
* On PowerPC/psim, inlined int64_t saves ~50 instructions on each
* _Thread_Dispatch operation which results in a context switch.
* This works out to be about 10% faster dispatches and 7.5% faster
* blocking semaphore obtains. The following numbers are in instructions
* and from tm02 and tm26.
*
* timespec int64 inlined int64
* dispatch: 446 446 400
* blocking sem obtain: 627 626 581
*
* On SPARC/sis, inlined int64_t shows the same percentage gains.
* The following numbers are in microseconds and from tm02 and tm26.
*
* timespec int64 inlined int64
* dispatch: 59 61 53
* blocking sem obtain: 98 100 92
*
* Inlining appears to have a tendency to increase the size of
* some executables.
* Not inlining reduces the execution improvement but does not seem to
* be an improvement on the PowerPC and SPARC. The struct timespec
* and the executables with int64 not inlined are about the same size.
*/
/**
* @ingroup CPUTimestamp
*
* Selects the timestamp implementation using struct timespec.
*
* Port Specific Information:
*
* XXX document implementation including references if appropriate
*/
#define CPU_TIMESTAMP_USE_STRUCT_TIMESPEC TRUE
/**
* @ingroup CPUTimestamp
*
* Selects the timestamp implementation using int64_t and no inlined methods.
*
* Port Specific Information:
*
* XXX document implementation including references if appropriate
*/
#define CPU_TIMESTAMP_USE_INT64 TRUE
/**
* @ingroup CPUTimestamp
*
* Selects the timestamp implementation using int64_t and inlined methods.
*
* Port Specific Information:
*
* XXX document implementation including references if appropriate
*/
#define CPU_TIMESTAMP_USE_INT64_INLINE TRUE
/** /**
* @defgroup CPUEndian Processor Dependent Endianness Support * @defgroup CPUEndian Processor Dependent Endianness Support
* *