[PATCH 2/2] record: Add more system events
Sebastian Huber
sebastian.huber at embedded-brains.de
Wed Aug 28 14:05:23 UTC 2019
Reduce the system dependencies to allow tracing of very low level
functions, the interrupt disable/enable.
Introduce a general purpose RTEMS_RECORD_STRING event, e.g. for object
names.
Update #3665.
---
cpukit/Makefile.am | 1 +
cpukit/include/rtems/record.h | 84 ++++++++++++++--
cpukit/include/rtems/recorddata.h | 130 ++++++++++++-------------
cpukit/libtrace/record/record-server.c | 2 +-
cpukit/libtrace/record/record-text.c | 128 ++++++++++++------------
cpukit/libtrace/record/record-userext.c | 2 +-
cpukit/libtrace/record/record-util.c | 112 +++++++++++++++++++++
testsuites/libtests/record01/init.c | 8 +-
testsuites/libtests/record02/init.c | 8 ++
testsuites/libtests/record02/record02.scn | 156 ++++++++++++++++--------------
10 files changed, 415 insertions(+), 216 deletions(-)
create mode 100644 cpukit/libtrace/record/record-util.c
diff --git a/cpukit/Makefile.am b/cpukit/Makefile.am
index 3522916d8f..01ee40980f 100644
--- a/cpukit/Makefile.am
+++ b/cpukit/Makefile.am
@@ -477,6 +477,7 @@ librtemscpu_a_SOURCES += libtrace/record/record-server.c
librtemscpu_a_SOURCES += libtrace/record/record-sysinit.c
librtemscpu_a_SOURCES += libtrace/record/record-text.c
librtemscpu_a_SOURCES += libtrace/record/record-userext.c
+librtemscpu_a_SOURCES += libtrace/record/record-util.c
librtemscpu_a_SOURCES += posix/src/adjtime.c
librtemscpu_a_SOURCES += posix/src/aio_suspend.c
librtemscpu_a_SOURCES += posix/src/barrierattrdestroy.c
diff --git a/cpukit/include/rtems/record.h b/cpukit/include/rtems/record.h
index 0446c2ae69..4dce92e3fa 100644
--- a/cpukit/include/rtems/record.h
+++ b/cpukit/include/rtems/record.h
@@ -34,7 +34,6 @@
#include <rtems/score/cpu.h>
#include <rtems/score/percpu.h>
#include <rtems/score/watchdog.h>
-#include <rtems/rtems/intr.h>
#include <rtems/counter.h>
#ifdef __cplusplus
@@ -57,10 +56,10 @@ typedef struct {
} Record_Configuration;
typedef struct {
- Record_Control *control;
- unsigned int head;
- uint32_t now;
- rtems_interrupt_level level;
+ Record_Control *control;
+ unsigned int head;
+ uint32_t now;
+ uint32_t level;
} rtems_record_context;
extern const Record_Configuration _Record_Configuration;
@@ -165,6 +164,8 @@ typedef struct RTEMS_PACKED {
void _Record_Stream_header_initialize( Record_Stream_header *header );
+void _Record_Caller( void *return_address );
+
/**
* @addtogroup RTEMSRecord
*
@@ -212,12 +213,13 @@ RTEMS_INLINE_ROUTINE void rtems_record_prepare_critical(
*/
RTEMS_INLINE_ROUTINE void rtems_record_prepare( rtems_record_context *context )
{
- rtems_interrupt_level level;
+ uint32_t level;
const Per_CPU_Control *cpu_self;
Record_Control *control;
unsigned int head;
- rtems_interrupt_local_disable( level );
+ _CPU_ISR_Disable( level );
+ RTEMS_COMPILER_MEMORY_BARRIER();
context->now = RTEMS_RECORD_TIME_EVENT( _Record_Now(), 0 );
context->level = level;
cpu_self = _Per_CPU_Get();
@@ -277,7 +279,8 @@ RTEMS_INLINE_ROUTINE void rtems_record_commit_critical( rtems_record_context *co
RTEMS_INLINE_ROUTINE void rtems_record_commit( rtems_record_context *context )
{
rtems_record_commit_critical( context );
- rtems_interrupt_local_enable( context->level );
+ RTEMS_COMPILER_MEMORY_BARRIER();
+ _CPU_ISR_Enable( context->level );
}
/**
@@ -314,6 +317,71 @@ void rtems_record_produce_n(
size_t n
);
+/**
+ * @brief Generates an RTEMS_RECORD_LINE event.
+ *
+ * The event data is the address of the call to this function.
+ */
+void rtems_record_line( void );
+
+/**
+ * @brief Generates an RTEMS_RECORD_LINE event and an extra event.
+ *
+ * The event data is the address of the call to this function.
+ *
+ * @param event The record event without a time stamp for the second item.
+ * @param data The record data for the second item.
+ */
+void rtems_record_line_2(
+ rtems_record_event event,
+ rtems_record_data data
+);
+
+/**
+ * @brief Generates an RTEMS_RECORD_LINE event and two extra events.
+ *
+ * The event data is the address of the call to this function.
+ *
+ * @param event_0 The record event without a time stamp for the second item.
+ * @param data_0 The record data for the second item.
+ * @param event_1 The record event without a time stamp for the third item.
+ * @param data_1 The record data for the third item.
+ */
+void rtems_record_line_3(
+ rtems_record_event event_0,
+ rtems_record_data data_0,
+ rtems_record_event event_1,
+ rtems_record_data data_1
+);
+
+/**
+ * @brief Generates an RTEMS_RECORD_CALLER and an RTEMS_RECORD_LINE event.
+ *
+ * The RTEMS_RECORD_CALLER event data is the address of the return address of
+ * the function calling rtems_record_caller().
+ *
+ * The RTEMS_RECORD_LINE event data is the address of the call to
+ * rtems_record_caller().
+ */
+#define rtems_record_caller() \
+ do { _Record_Caller( RTEMS_RETURN_ADDRESS() ); } while ( 0 )
+
+/**
+ * @brief Disables interrupts and generates an RTEMS_RECORD_ISR_DISABLE event.
+ *
+ * @return The previous interrupt level.
+ */
+uint32_t rtems_record_interrupt_disable( void );
+
+/**
+ * @brief Restores the previous interrupt level and generates an
+ * RTEMS_RECORD_ISR_ENABLE event.
+ *
+ * @param level The previous interrupt level. Must be the return value of the
+ * corresponding rtems_record_interrupt_disable().
+ */
+void rtems_record_interrupt_enable( uint32_t level );
+
typedef void ( *rtems_record_drain_visitor )(
const rtems_record_item *items,
size_t count,
diff --git a/cpukit/include/rtems/recorddata.h b/cpukit/include/rtems/recorddata.h
index 607955c596..a67c8a2051 100644
--- a/cpukit/include/rtems/recorddata.h
+++ b/cpukit/include/rtems/recorddata.h
@@ -55,7 +55,7 @@ extern "C" {
* The record version reflects the record event definitions. It is reported by
* the RTEMS_RECORD_VERSION event.
*/
-#define RTEMS_RECORD_THE_VERSION 5
+#define RTEMS_RECORD_THE_VERSION 6
/**
* @brief The items are in 32-bit little-endian format.
@@ -98,9 +98,21 @@ typedef enum {
*/
RTEMS_RECORD_ACCEPT_ENTRY,
RTEMS_RECORD_ACCEPT_EXIT,
+ RTEMS_RECORD_ADDRESS,
+ RTEMS_RECORD_ARG_0,
+ RTEMS_RECORD_ARG_1,
+ RTEMS_RECORD_ARG_2,
+ RTEMS_RECORD_ARG_3,
+ RTEMS_RECORD_ARG_4,
+ RTEMS_RECORD_ARG_5,
+ RTEMS_RECORD_ARG_6,
+ RTEMS_RECORD_ARG_7,
+ RTEMS_RECORD_ARG_8,
+ RTEMS_RECORD_ARG_9,
RTEMS_RECORD_BIND_ENTRY,
RTEMS_RECORD_BIND_EXIT,
RTEMS_RECORD_BUFFER,
+ RTEMS_RECORD_CALLER,
RTEMS_RECORD_CHOWN_ENTRY,
RTEMS_RECORD_CHOWN_EXIT,
RTEMS_RECORD_CLOSE_ENTRY,
@@ -129,6 +141,7 @@ typedef enum {
RTEMS_RECORD_HEAP_FREE,
RTEMS_RECORD_HEAP_SIZE,
RTEMS_RECORD_HEAP_USAGE,
+ RTEMS_RECORD_INTEGER,
RTEMS_RECORD_INTERRUPT_ENTRY,
RTEMS_RECORD_INTERRUPT_EXIT,
RTEMS_RECORD_INTERRUPT_INSTALL,
@@ -145,11 +158,20 @@ typedef enum {
RTEMS_RECORD_IP6_OUTPUT,
RTEMS_RECORD_IP_INPUT,
RTEMS_RECORD_IP_OUTPUT,
+ RTEMS_RECORD_ISR_DISABLE,
+ RTEMS_RECORD_ISR_ENABLE,
+ RTEMS_RECORD_ISR_LOCK_ACQUIRE_ENTRY,
+ RTEMS_RECORD_ISR_LOCK_ACQUIRE_EXIT,
+ RTEMS_RECORD_ISR_LOCK_ADDRESS,
+ RTEMS_RECORD_ISR_LOCK_DESTROY,
+ RTEMS_RECORD_ISR_LOCK_INITIALIZE,
+ RTEMS_RECORD_ISR_LOCK_RELEASE,
RTEMS_RECORD_KEVENT_ENTRY,
RTEMS_RECORD_KEVENT_EXIT,
RTEMS_RECORD_KQUEUE_ENTRY,
RTEMS_RECORD_KQUEUE_EXIT,
RTEMS_RECORD_LENGTH,
+ RTEMS_RECORD_LINE,
RTEMS_RECORD_LINK_ENTRY,
RTEMS_RECORD_LINK_EXIT,
RTEMS_RECORD_LISTEN_ENTRY,
@@ -228,6 +250,25 @@ typedef enum {
RTEMS_RECORD_SBWAIT_EXIT,
RTEMS_RECORD_SBWAKEUP_ENTRY,
RTEMS_RECORD_SBWAKEUP_EXIT,
+ RTEMS_RECORD_SCHEDULER_ADD_PROCESSOR,
+ RTEMS_RECORD_SCHEDULER_ASK_FOR_HELP,
+ RTEMS_RECORD_SCHEDULER_BLOCK,
+ RTEMS_RECORD_SCHEDULER_CANCEL_JOB,
+ RTEMS_RECORD_SCHEDULER_ID,
+ RTEMS_RECORD_SCHEDULER_MAP_PRIORITY,
+ RTEMS_RECORD_SCHEDULER_PIN,
+ RTEMS_RECORD_SCHEDULER_RECONSIDER_HELP_REQUEST,
+ RTEMS_RECORD_SCHEDULER_RELEASE_JOB,
+ RTEMS_RECORD_SCHEDULER_REMOVE_PROCESSOR,
+ RTEMS_RECORD_SCHEDULER_SCHEDULE,
+ RTEMS_RECORD_SCHEDULER_SET_AFFINITY,
+ RTEMS_RECORD_SCHEDULER_TICK,
+ RTEMS_RECORD_SCHEDULER_UNBLOCK,
+ RTEMS_RECORD_SCHEDULER_UNMAP_PRIORITY,
+ RTEMS_RECORD_SCHEDULER_UNPIN,
+ RTEMS_RECORD_SCHEDULER_UPDATE_PRIORITY,
+ RTEMS_RECORD_SCHEDULER_WITHDRAW_NODE,
+ RTEMS_RECORD_SCHEDULER_YIELD,
RTEMS_RECORD_SELECT_ENTRY,
RTEMS_RECORD_SELECT_EXIT,
RTEMS_RECORD_SEND_ENTRY,
@@ -280,25 +321,33 @@ typedef enum {
RTEMS_RECORD_SOSHUTDOWN_EXIT,
RTEMS_RECORD_STATVFS_ENTRY,
RTEMS_RECORD_STATVFS_EXIT,
+ RTEMS_RECORD_STRING,
RTEMS_RECORD_SYMLINK_ENTRY,
RTEMS_RECORD_SYMLINK_EXIT,
RTEMS_RECORD_TCP_CLOSE,
RTEMS_RECORD_TCP_INPUT,
RTEMS_RECORD_TCP_OUTPUT,
RTEMS_RECORD_THREAD_BEGIN,
+ RTEMS_RECORD_THREAD_CONTINUE_ENTRY,
+ RTEMS_RECORD_THREAD_CONTINUE_EXIT,
RTEMS_RECORD_THREAD_CREATE,
RTEMS_RECORD_THREAD_DELETE,
+ RTEMS_RECORD_THREAD_DISPATCH_DISABLE,
+ RTEMS_RECORD_THREAD_DISPATCH_ENABLE,
RTEMS_RECORD_THREAD_EXIT,
RTEMS_RECORD_THREAD_EXITTED,
RTEMS_RECORD_THREAD_ID,
- RTEMS_RECORD_THREAD_NAME,
RTEMS_RECORD_THREAD_PRIO_CURRENT_HIGH,
RTEMS_RECORD_THREAD_PRIO_CURRENT_LOW,
RTEMS_RECORD_THREAD_PRIO_REAL_HIGH,
RTEMS_RECORD_THREAD_PRIO_REAL_LOW,
+ RTEMS_RECORD_THREAD_QUEUE_ADDRESS,
+ RTEMS_RECORD_THREAD_QUEUE_DESTROY,
RTEMS_RECORD_THREAD_QUEUE_ENQUEUE,
RTEMS_RECORD_THREAD_QUEUE_ENQUEUE_STICKY,
RTEMS_RECORD_THREAD_QUEUE_EXTRACT,
+ RTEMS_RECORD_THREAD_QUEUE_ID,
+ RTEMS_RECORD_THREAD_QUEUE_INITIALIZE,
RTEMS_RECORD_THREAD_QUEUE_SURRENDER,
RTEMS_RECORD_THREAD_QUEUE_SURRENDER_STICKY,
RTEMS_RECORD_THREAD_RESOURCE_OBTAIN,
@@ -313,6 +362,10 @@ typedef enum {
RTEMS_RECORD_THREAD_SWITCH_IN,
RTEMS_RECORD_THREAD_SWITCH_OUT,
RTEMS_RECORD_THREAD_TERMINATE,
+ RTEMS_RECORD_THREAD_TIMER_INSERT_MONOTONIC,
+ RTEMS_RECORD_THREAD_TIMER_INSERT_REALTIME,
+ RTEMS_RECORD_THREAD_TIMER_INSERT_TICKS,
+ RTEMS_RECORD_THREAD_TIMER_REMOVE,
RTEMS_RECORD_UDP_INPUT,
RTEMS_RECORD_UDP_OUTPUT,
RTEMS_RECORD_UMA_ALLOC_PTR,
@@ -323,8 +376,17 @@ typedef enum {
RTEMS_RECORD_UNLINK_EXIT,
RTEMS_RECORD_UNMOUNT_ENTRY,
RTEMS_RECORD_UNMOUNT_EXIT,
+ RTEMS_RECORD_UNSIGNED,
RTEMS_RECORD_UPTIME_HIGH,
RTEMS_RECORD_UPTIME_LOW,
+ RTEMS_RECORD_WATCHDOG_ADDRESS,
+ RTEMS_RECORD_WATCHDOG_CPU,
+ RTEMS_RECORD_WATCHDOG_INITIALIZE,
+ RTEMS_RECORD_WATCHDOG_INSERT,
+ RTEMS_RECORD_WATCHDOG_PREINITIALIZE,
+ RTEMS_RECORD_WATCHDOG_REMOVE,
+ RTEMS_RECORD_WATCHDOG_ROUTINE,
+ RTEMS_RECORD_WATCHDOG_STATE,
RTEMS_RECORD_WORKSPACE_ALLOC,
RTEMS_RECORD_WORKSPACE_FREE,
RTEMS_RECORD_WORKSPACE_SIZE,
@@ -335,69 +397,6 @@ typedef enum {
RTEMS_RECORD_WRITEV_EXIT,
/* Unused system events */
- RTEMS_RECORD_SYSTEM_238,
- RTEMS_RECORD_SYSTEM_239,
- RTEMS_RECORD_SYSTEM_240,
- RTEMS_RECORD_SYSTEM_241,
- RTEMS_RECORD_SYSTEM_242,
- RTEMS_RECORD_SYSTEM_243,
- RTEMS_RECORD_SYSTEM_244,
- RTEMS_RECORD_SYSTEM_245,
- RTEMS_RECORD_SYSTEM_246,
- RTEMS_RECORD_SYSTEM_247,
- RTEMS_RECORD_SYSTEM_248,
- RTEMS_RECORD_SYSTEM_249,
- RTEMS_RECORD_SYSTEM_250,
- RTEMS_RECORD_SYSTEM_251,
- RTEMS_RECORD_SYSTEM_252,
- RTEMS_RECORD_SYSTEM_253,
- RTEMS_RECORD_SYSTEM_254,
- RTEMS_RECORD_SYSTEM_255,
- RTEMS_RECORD_SYSTEM_256,
- RTEMS_RECORD_SYSTEM_257,
- RTEMS_RECORD_SYSTEM_258,
- RTEMS_RECORD_SYSTEM_259,
- RTEMS_RECORD_SYSTEM_260,
- RTEMS_RECORD_SYSTEM_261,
- RTEMS_RECORD_SYSTEM_262,
- RTEMS_RECORD_SYSTEM_263,
- RTEMS_RECORD_SYSTEM_264,
- RTEMS_RECORD_SYSTEM_265,
- RTEMS_RECORD_SYSTEM_266,
- RTEMS_RECORD_SYSTEM_267,
- RTEMS_RECORD_SYSTEM_268,
- RTEMS_RECORD_SYSTEM_269,
- RTEMS_RECORD_SYSTEM_270,
- RTEMS_RECORD_SYSTEM_271,
- RTEMS_RECORD_SYSTEM_272,
- RTEMS_RECORD_SYSTEM_273,
- RTEMS_RECORD_SYSTEM_274,
- RTEMS_RECORD_SYSTEM_275,
- RTEMS_RECORD_SYSTEM_276,
- RTEMS_RECORD_SYSTEM_277,
- RTEMS_RECORD_SYSTEM_278,
- RTEMS_RECORD_SYSTEM_279,
- RTEMS_RECORD_SYSTEM_280,
- RTEMS_RECORD_SYSTEM_281,
- RTEMS_RECORD_SYSTEM_282,
- RTEMS_RECORD_SYSTEM_283,
- RTEMS_RECORD_SYSTEM_284,
- RTEMS_RECORD_SYSTEM_285,
- RTEMS_RECORD_SYSTEM_286,
- RTEMS_RECORD_SYSTEM_287,
- RTEMS_RECORD_SYSTEM_288,
- RTEMS_RECORD_SYSTEM_289,
- RTEMS_RECORD_SYSTEM_290,
- RTEMS_RECORD_SYSTEM_291,
- RTEMS_RECORD_SYSTEM_292,
- RTEMS_RECORD_SYSTEM_293,
- RTEMS_RECORD_SYSTEM_294,
- RTEMS_RECORD_SYSTEM_295,
- RTEMS_RECORD_SYSTEM_296,
- RTEMS_RECORD_SYSTEM_297,
- RTEMS_RECORD_SYSTEM_298,
- RTEMS_RECORD_SYSTEM_299,
- RTEMS_RECORD_SYSTEM_300,
RTEMS_RECORD_SYSTEM_301,
RTEMS_RECORD_SYSTEM_302,
RTEMS_RECORD_SYSTEM_303,
@@ -608,6 +607,7 @@ typedef enum {
RTEMS_RECORD_SYSTEM_508,
RTEMS_RECORD_SYSTEM_509,
RTEMS_RECORD_SYSTEM_510,
+ RTEMS_RECORD_SYSTEM_511,
/* There are 512 events reserved for the user */
RTEMS_RECORD_USER_0,
diff --git a/cpukit/libtrace/record/record-server.c b/cpukit/libtrace/record/record-server.c
index e19f889d8d..0b3cd4423b 100644
--- a/cpukit/libtrace/record/record-server.c
+++ b/cpukit/libtrace/record/record-server.c
@@ -219,7 +219,7 @@ static bool thread_names_visitor( rtems_tcb *tcb, void *arg )
++i;
}
- thread_names_produce( ctx, RTEMS_RECORD_THREAD_NAME, data );
+ thread_names_produce( ctx, RTEMS_RECORD_STRING, data );
}
return false;
diff --git a/cpukit/libtrace/record/record-text.c b/cpukit/libtrace/record/record-text.c
index 5652ab051c..a518cd52e1 100644
--- a/cpukit/libtrace/record/record-text.c
+++ b/cpukit/libtrace/record/record-text.c
@@ -43,9 +43,21 @@ static const char * const event_text[] = {
[ RTEMS_RECORD_VERSION ] = "VERSION",
[ RTEMS_RECORD_ACCEPT_ENTRY ] = "ACCEPT_ENTRY",
[ RTEMS_RECORD_ACCEPT_EXIT ] = "ACCEPT_EXIT",
+ [ RTEMS_RECORD_ADDRESS ] = "ADDRESS",
+ [ RTEMS_RECORD_ARG_0 ] = "ARG_0",
+ [ RTEMS_RECORD_ARG_1 ] = "ARG_1",
+ [ RTEMS_RECORD_ARG_2 ] = "ARG_2",
+ [ RTEMS_RECORD_ARG_3 ] = "ARG_3",
+ [ RTEMS_RECORD_ARG_4 ] = "ARG_4",
+ [ RTEMS_RECORD_ARG_5 ] = "ARG_5",
+ [ RTEMS_RECORD_ARG_6 ] = "ARG_6",
+ [ RTEMS_RECORD_ARG_7 ] = "ARG_7",
+ [ RTEMS_RECORD_ARG_8 ] = "ARG_8",
+ [ RTEMS_RECORD_ARG_9 ] = "ARG_9",
[ RTEMS_RECORD_BIND_ENTRY ] = "BIND_ENTRY",
[ RTEMS_RECORD_BIND_EXIT ] = "BIND_EXIT",
[ RTEMS_RECORD_BUFFER ] = "BUFFER",
+ [ RTEMS_RECORD_CALLER ] = "CALLER",
[ RTEMS_RECORD_CHOWN_ENTRY ] = "CHOWN_ENTRY",
[ RTEMS_RECORD_CHOWN_EXIT ] = "CHOWN_EXIT",
[ RTEMS_RECORD_CLOSE_ENTRY ] = "CLOSE_ENTRY",
@@ -74,6 +86,7 @@ static const char * const event_text[] = {
[ RTEMS_RECORD_HEAP_FREE ] = "HEAP_FREE",
[ RTEMS_RECORD_HEAP_SIZE ] = "HEAP_SIZE",
[ RTEMS_RECORD_HEAP_USAGE ] = "HEAP_USAGE",
+ [ RTEMS_RECORD_INTEGER ] = "INTEGER",
[ RTEMS_RECORD_INTERRUPT_ENTRY ] = "INTERRUPT_ENTRY",
[ RTEMS_RECORD_INTERRUPT_EXIT ] = "INTERRUPT_EXIT",
[ RTEMS_RECORD_INTERRUPT_INSTALL ] = "INTERRUPT_INSTALL",
@@ -90,11 +103,20 @@ static const char * const event_text[] = {
[ RTEMS_RECORD_IP6_OUTPUT ] = "IP6_OUTPUT",
[ RTEMS_RECORD_IP_INPUT ] = "IP_INPUT",
[ RTEMS_RECORD_IP_OUTPUT ] = "IP_OUTPUT",
+ [ RTEMS_RECORD_ISR_DISABLE ] = "ISR_DISABLE",
+ [ RTEMS_RECORD_ISR_ENABLE ] = "ISR_ENABLE",
+ [ RTEMS_RECORD_ISR_LOCK_ACQUIRE_ENTRY ] = "ISR_LOCK_ACQUIRE_ENTRY",
+ [ RTEMS_RECORD_ISR_LOCK_ACQUIRE_EXIT ] = "ISR_LOCK_ACQUIRE_EXIT",
+ [ RTEMS_RECORD_ISR_LOCK_ADDRESS ] = "ISR_LOCK_ADDRESS",
+ [ RTEMS_RECORD_ISR_LOCK_DESTROY ] = "ISR_LOCK_DESTROY",
+ [ RTEMS_RECORD_ISR_LOCK_INITIALIZE ] = "ISR_LOCK_INITIALIZE",
+ [ RTEMS_RECORD_ISR_LOCK_RELEASE ] = "ISR_LOCK_RELEASE",
[ RTEMS_RECORD_KEVENT_ENTRY ] = "KEVENT_ENTRY",
[ RTEMS_RECORD_KEVENT_EXIT ] = "KEVENT_EXIT",
[ RTEMS_RECORD_KQUEUE_ENTRY ] = "KQUEUE_ENTRY",
[ RTEMS_RECORD_KQUEUE_EXIT ] = "KQUEUE_EXIT",
[ RTEMS_RECORD_LENGTH ] = "LENGTH",
+ [ RTEMS_RECORD_LINE ] = "LINE",
[ RTEMS_RECORD_LINK_ENTRY ] = "LINK_ENTRY",
[ RTEMS_RECORD_LINK_EXIT ] = "LINK_EXIT",
[ RTEMS_RECORD_LISTEN_ENTRY ] = "LISTEN_ENTRY",
@@ -173,6 +195,25 @@ static const char * const event_text[] = {
[ RTEMS_RECORD_SBWAIT_EXIT ] = "SBWAIT_EXIT",
[ RTEMS_RECORD_SBWAKEUP_ENTRY ] = "SBWAKEUP_ENTRY",
[ RTEMS_RECORD_SBWAKEUP_EXIT ] = "SBWAKEUP_EXIT",
+ [ RTEMS_RECORD_SCHEDULER_ADD_PROCESSOR ] = "SCHEDULER_ADD_PROCESSOR",
+ [ RTEMS_RECORD_SCHEDULER_ASK_FOR_HELP ] = "SCHEDULER_ASK_FOR_HELP",
+ [ RTEMS_RECORD_SCHEDULER_BLOCK ] = "SCHEDULER_BLOCK",
+ [ RTEMS_RECORD_SCHEDULER_CANCEL_JOB ] = "SCHEDULER_CANCEL_JOB",
+ [ RTEMS_RECORD_SCHEDULER_ID ] = "SCHEDULER_ID",
+ [ RTEMS_RECORD_SCHEDULER_MAP_PRIORITY ] = "SCHEDULER_MAP_PRIORITY",
+ [ RTEMS_RECORD_SCHEDULER_PIN ] = "SCHEDULER_PIN",
+ [ RTEMS_RECORD_SCHEDULER_RECONSIDER_HELP_REQUEST ] = "SCHEDULER_RECONSIDER_HELP_REQUEST",
+ [ RTEMS_RECORD_SCHEDULER_RELEASE_JOB ] = "SCHEDULER_RELEASE_JOB",
+ [ RTEMS_RECORD_SCHEDULER_REMOVE_PROCESSOR ] = "SCHEDULER_REMOVE_PROCESSOR",
+ [ RTEMS_RECORD_SCHEDULER_SCHEDULE ] = "SCHEDULER_SCHEDULE",
+ [ RTEMS_RECORD_SCHEDULER_SET_AFFINITY ] = "SCHEDULER_SET_AFFINITY",
+ [ RTEMS_RECORD_SCHEDULER_TICK ] = "SCHEDULER_TICK",
+ [ RTEMS_RECORD_SCHEDULER_UNBLOCK ] = "SCHEDULER_UNBLOCK",
+ [ RTEMS_RECORD_SCHEDULER_UNMAP_PRIORITY ] = "SCHEDULER_UNMAP_PRIORITY",
+ [ RTEMS_RECORD_SCHEDULER_UNPIN ] = "SCHEDULER_UNPIN",
+ [ RTEMS_RECORD_SCHEDULER_UPDATE_PRIORITY ] = "SCHEDULER_UPDATE_PRIORITY",
+ [ RTEMS_RECORD_SCHEDULER_WITHDRAW_NODE ] = "SCHEDULER_WITHDRAW_NODE",
+ [ RTEMS_RECORD_SCHEDULER_YIELD ] = "SCHEDULER_YIELD",
[ RTEMS_RECORD_SELECT_ENTRY ] = "SELECT_ENTRY",
[ RTEMS_RECORD_SELECT_EXIT ] = "SELECT_EXIT",
[ RTEMS_RECORD_SEND_ENTRY ] = "SEND_ENTRY",
@@ -225,25 +266,33 @@ static const char * const event_text[] = {
[ RTEMS_RECORD_SOSHUTDOWN_EXIT ] = "SOSHUTDOWN_EXIT",
[ RTEMS_RECORD_STATVFS_ENTRY ] = "STATVFS_ENTRY",
[ RTEMS_RECORD_STATVFS_EXIT ] = "STATVFS_EXIT",
+ [ RTEMS_RECORD_STRING ] = "STRING",
[ RTEMS_RECORD_SYMLINK_ENTRY ] = "SYMLINK_ENTRY",
[ RTEMS_RECORD_SYMLINK_EXIT ] = "SYMLINK_EXIT",
[ RTEMS_RECORD_TCP_CLOSE ] = "TCP_CLOSE",
[ RTEMS_RECORD_TCP_INPUT ] = "TCP_INPUT",
[ RTEMS_RECORD_TCP_OUTPUT ] = "TCP_OUTPUT",
[ RTEMS_RECORD_THREAD_BEGIN ] = "THREAD_BEGIN",
+ [ RTEMS_RECORD_THREAD_CONTINUE_ENTRY ] = "THREAD_CONTINUE_ENTRY",
+ [ RTEMS_RECORD_THREAD_CONTINUE_EXIT ] = "THREAD_CONTINUE_EXIT",
[ RTEMS_RECORD_THREAD_CREATE ] = "THREAD_CREATE",
[ RTEMS_RECORD_THREAD_DELETE ] = "THREAD_DELETE",
+ [ RTEMS_RECORD_THREAD_DISPATCH_DISABLE ] = "THREAD_DISPATCH_DISABLE",
+ [ RTEMS_RECORD_THREAD_DISPATCH_ENABLE ] = "THREAD_DISPATCH_ENABLE",
[ RTEMS_RECORD_THREAD_EXIT ] = "THREAD_EXIT",
[ RTEMS_RECORD_THREAD_EXITTED ] = "THREAD_EXITTED",
[ RTEMS_RECORD_THREAD_ID ] = "THREAD_ID",
- [ RTEMS_RECORD_THREAD_NAME ] = "THREAD_NAME",
[ RTEMS_RECORD_THREAD_PRIO_CURRENT_HIGH ] = "THREAD_PRIO_CURRENT_HIGH",
[ RTEMS_RECORD_THREAD_PRIO_CURRENT_LOW ] = "THREAD_PRIO_CURRENT_LOW",
[ RTEMS_RECORD_THREAD_PRIO_REAL_HIGH ] = "THREAD_PRIO_REAL_HIGH",
[ RTEMS_RECORD_THREAD_PRIO_REAL_LOW ] = "THREAD_PRIO_REAL_LOW",
+ [ RTEMS_RECORD_THREAD_QUEUE_ADDRESS ] = "THREAD_QUEUE_ADDRESS",
+ [ RTEMS_RECORD_THREAD_QUEUE_DESTROY ] = "THREAD_QUEUE_DESTROY",
[ RTEMS_RECORD_THREAD_QUEUE_ENQUEUE ] = "THREAD_QUEUE_ENQUEUE",
[ RTEMS_RECORD_THREAD_QUEUE_ENQUEUE_STICKY ] = "THREAD_QUEUE_ENQUEUE_STICKY",
[ RTEMS_RECORD_THREAD_QUEUE_EXTRACT ] = "THREAD_QUEUE_EXTRACT",
+ [ RTEMS_RECORD_THREAD_QUEUE_ID ] = "THREAD_QUEUE_ID",
+ [ RTEMS_RECORD_THREAD_QUEUE_INITIALIZE ] = "THREAD_QUEUE_INITIALIZE",
[ RTEMS_RECORD_THREAD_QUEUE_SURRENDER ] = "THREAD_QUEUE_SURRENDER",
[ RTEMS_RECORD_THREAD_QUEUE_SURRENDER_STICKY ] = "THREAD_QUEUE_SURRENDER_STICKY",
[ RTEMS_RECORD_THREAD_RESOURCE_OBTAIN ] = "THREAD_RESOURCE_OBTAIN",
@@ -258,6 +307,10 @@ static const char * const event_text[] = {
[ RTEMS_RECORD_THREAD_SWITCH_IN ] = "THREAD_SWITCH_IN",
[ RTEMS_RECORD_THREAD_SWITCH_OUT ] = "THREAD_SWITCH_OUT",
[ RTEMS_RECORD_THREAD_TERMINATE ] = "THREAD_TERMINATE",
+ [ RTEMS_RECORD_THREAD_TIMER_INSERT_MONOTONIC ] = "THREAD_TIMER_INSERT_MONOTONIC",
+ [ RTEMS_RECORD_THREAD_TIMER_INSERT_REALTIME ] = "THREAD_TIMER_INSERT_REALTIME",
+ [ RTEMS_RECORD_THREAD_TIMER_INSERT_TICKS ] = "THREAD_TIMER_INSERT_TICKS",
+ [ RTEMS_RECORD_THREAD_TIMER_REMOVE ] = "THREAD_TIMER_REMOVE",
[ RTEMS_RECORD_UDP_INPUT ] = "UDP_INPUT",
[ RTEMS_RECORD_UDP_OUTPUT ] = "UDP_OUTPUT",
[ RTEMS_RECORD_UMA_ALLOC_PTR ] = "UMA_ALLOC_PTR",
@@ -268,8 +321,17 @@ static const char * const event_text[] = {
[ RTEMS_RECORD_UNLINK_EXIT ] = "UNLINK_EXIT",
[ RTEMS_RECORD_UNMOUNT_ENTRY ] = "UNMOUNT_ENTRY",
[ RTEMS_RECORD_UNMOUNT_EXIT ] = "UNMOUNT_EXIT",
+ [ RTEMS_RECORD_UNSIGNED ] = "UNSIGNED",
[ RTEMS_RECORD_UPTIME_HIGH ] = "UPTIME_HIGH",
[ RTEMS_RECORD_UPTIME_LOW ] = "UPTIME_LOW",
+ [ RTEMS_RECORD_WATCHDOG_ADDRESS ] = "WATCHDOG_ADDRESS",
+ [ RTEMS_RECORD_WATCHDOG_CPU ] = "WATCHDOG_CPU",
+ [ RTEMS_RECORD_WATCHDOG_INITIALIZE ] = "WATCHDOG_INITIALIZE",
+ [ RTEMS_RECORD_WATCHDOG_INSERT ] = "WATCHDOG_INSERT",
+ [ RTEMS_RECORD_WATCHDOG_PREINITIALIZE ] = "WATCHDOG_PREINITIALIZE",
+ [ RTEMS_RECORD_WATCHDOG_REMOVE ] = "WATCHDOG_REMOVE",
+ [ RTEMS_RECORD_WATCHDOG_ROUTINE ] = "WATCHDOG_ROUTINE",
+ [ RTEMS_RECORD_WATCHDOG_STATE ] = "WATCHDOG_STATE",
[ RTEMS_RECORD_WORKSPACE_ALLOC ] = "WORKSPACE_ALLOC",
[ RTEMS_RECORD_WORKSPACE_FREE ] = "WORKSPACE_FREE",
[ RTEMS_RECORD_WORKSPACE_SIZE ] = "WORKSPACE_SIZE",
@@ -278,69 +340,6 @@ static const char * const event_text[] = {
[ RTEMS_RECORD_WRITE_EXIT ] = "WRITE_EXIT",
[ RTEMS_RECORD_WRITEV_ENTRY ] = "WRITEV_ENTRY",
[ RTEMS_RECORD_WRITEV_EXIT ] = "WRITEV_EXIT",
- [ RTEMS_RECORD_SYSTEM_238 ] = "SYSTEM_238",
- [ RTEMS_RECORD_SYSTEM_239 ] = "SYSTEM_239",
- [ RTEMS_RECORD_SYSTEM_240 ] = "SYSTEM_240",
- [ RTEMS_RECORD_SYSTEM_241 ] = "SYSTEM_241",
- [ RTEMS_RECORD_SYSTEM_242 ] = "SYSTEM_242",
- [ RTEMS_RECORD_SYSTEM_243 ] = "SYSTEM_243",
- [ RTEMS_RECORD_SYSTEM_244 ] = "SYSTEM_244",
- [ RTEMS_RECORD_SYSTEM_245 ] = "SYSTEM_245",
- [ RTEMS_RECORD_SYSTEM_246 ] = "SYSTEM_246",
- [ RTEMS_RECORD_SYSTEM_247 ] = "SYSTEM_247",
- [ RTEMS_RECORD_SYSTEM_248 ] = "SYSTEM_248",
- [ RTEMS_RECORD_SYSTEM_249 ] = "SYSTEM_249",
- [ RTEMS_RECORD_SYSTEM_250 ] = "SYSTEM_250",
- [ RTEMS_RECORD_SYSTEM_251 ] = "SYSTEM_251",
- [ RTEMS_RECORD_SYSTEM_252 ] = "SYSTEM_252",
- [ RTEMS_RECORD_SYSTEM_253 ] = "SYSTEM_253",
- [ RTEMS_RECORD_SYSTEM_254 ] = "SYSTEM_254",
- [ RTEMS_RECORD_SYSTEM_255 ] = "SYSTEM_255",
- [ RTEMS_RECORD_SYSTEM_256 ] = "SYSTEM_256",
- [ RTEMS_RECORD_SYSTEM_257 ] = "SYSTEM_257",
- [ RTEMS_RECORD_SYSTEM_258 ] = "SYSTEM_258",
- [ RTEMS_RECORD_SYSTEM_259 ] = "SYSTEM_259",
- [ RTEMS_RECORD_SYSTEM_260 ] = "SYSTEM_260",
- [ RTEMS_RECORD_SYSTEM_261 ] = "SYSTEM_261",
- [ RTEMS_RECORD_SYSTEM_262 ] = "SYSTEM_262",
- [ RTEMS_RECORD_SYSTEM_263 ] = "SYSTEM_263",
- [ RTEMS_RECORD_SYSTEM_264 ] = "SYSTEM_264",
- [ RTEMS_RECORD_SYSTEM_265 ] = "SYSTEM_265",
- [ RTEMS_RECORD_SYSTEM_266 ] = "SYSTEM_266",
- [ RTEMS_RECORD_SYSTEM_267 ] = "SYSTEM_267",
- [ RTEMS_RECORD_SYSTEM_268 ] = "SYSTEM_268",
- [ RTEMS_RECORD_SYSTEM_269 ] = "SYSTEM_269",
- [ RTEMS_RECORD_SYSTEM_270 ] = "SYSTEM_270",
- [ RTEMS_RECORD_SYSTEM_271 ] = "SYSTEM_271",
- [ RTEMS_RECORD_SYSTEM_272 ] = "SYSTEM_272",
- [ RTEMS_RECORD_SYSTEM_273 ] = "SYSTEM_273",
- [ RTEMS_RECORD_SYSTEM_274 ] = "SYSTEM_274",
- [ RTEMS_RECORD_SYSTEM_275 ] = "SYSTEM_275",
- [ RTEMS_RECORD_SYSTEM_276 ] = "SYSTEM_276",
- [ RTEMS_RECORD_SYSTEM_277 ] = "SYSTEM_277",
- [ RTEMS_RECORD_SYSTEM_278 ] = "SYSTEM_278",
- [ RTEMS_RECORD_SYSTEM_279 ] = "SYSTEM_279",
- [ RTEMS_RECORD_SYSTEM_280 ] = "SYSTEM_280",
- [ RTEMS_RECORD_SYSTEM_281 ] = "SYSTEM_281",
- [ RTEMS_RECORD_SYSTEM_282 ] = "SYSTEM_282",
- [ RTEMS_RECORD_SYSTEM_283 ] = "SYSTEM_283",
- [ RTEMS_RECORD_SYSTEM_284 ] = "SYSTEM_284",
- [ RTEMS_RECORD_SYSTEM_285 ] = "SYSTEM_285",
- [ RTEMS_RECORD_SYSTEM_286 ] = "SYSTEM_286",
- [ RTEMS_RECORD_SYSTEM_287 ] = "SYSTEM_287",
- [ RTEMS_RECORD_SYSTEM_288 ] = "SYSTEM_288",
- [ RTEMS_RECORD_SYSTEM_289 ] = "SYSTEM_289",
- [ RTEMS_RECORD_SYSTEM_290 ] = "SYSTEM_290",
- [ RTEMS_RECORD_SYSTEM_291 ] = "SYSTEM_291",
- [ RTEMS_RECORD_SYSTEM_292 ] = "SYSTEM_292",
- [ RTEMS_RECORD_SYSTEM_293 ] = "SYSTEM_293",
- [ RTEMS_RECORD_SYSTEM_294 ] = "SYSTEM_294",
- [ RTEMS_RECORD_SYSTEM_295 ] = "SYSTEM_295",
- [ RTEMS_RECORD_SYSTEM_296 ] = "SYSTEM_296",
- [ RTEMS_RECORD_SYSTEM_297 ] = "SYSTEM_297",
- [ RTEMS_RECORD_SYSTEM_298 ] = "SYSTEM_298",
- [ RTEMS_RECORD_SYSTEM_299 ] = "SYSTEM_299",
- [ RTEMS_RECORD_SYSTEM_300 ] = "SYSTEM_300",
[ RTEMS_RECORD_SYSTEM_301 ] = "SYSTEM_301",
[ RTEMS_RECORD_SYSTEM_302 ] = "SYSTEM_302",
[ RTEMS_RECORD_SYSTEM_303 ] = "SYSTEM_303",
@@ -551,6 +550,7 @@ static const char * const event_text[] = {
[ RTEMS_RECORD_SYSTEM_508 ] = "SYSTEM_508",
[ RTEMS_RECORD_SYSTEM_509 ] = "SYSTEM_509",
[ RTEMS_RECORD_SYSTEM_510 ] = "SYSTEM_510",
+ [ RTEMS_RECORD_SYSTEM_511 ] = "SYSTEM_511",
[ RTEMS_RECORD_USER_0 ] = "USER_0",
[ RTEMS_RECORD_USER_1 ] = "USER_1",
[ RTEMS_RECORD_USER_2 ] = "USER_2",
diff --git a/cpukit/libtrace/record/record-userext.c b/cpukit/libtrace/record/record-userext.c
index e03866f207..40fc4a8482 100644
--- a/cpukit/libtrace/record/record-userext.c
+++ b/cpukit/libtrace/record/record-userext.c
@@ -65,7 +65,7 @@ bool _Record_Thread_create(
}
++i;
- items[ i ].event = RTEMS_RECORD_THREAD_NAME;
+ items[ i ].event = RTEMS_RECORD_STRING;
items[ i ].data = data;
}
diff --git a/cpukit/libtrace/record/record-util.c b/cpukit/libtrace/record/record-util.c
new file mode 100644
index 0000000000..626cf5feca
--- /dev/null
+++ b/cpukit/libtrace/record/record-util.c
@@ -0,0 +1,112 @@
+/*
+ * SPDX-License-Identifier: BSD-2-Clause
+ *
+ * Copyright (C) 2018, 2019 embedded brains GmbH
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#if HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <rtems/record.h>
+
+void rtems_record_line( void )
+{
+ rtems_record_produce(
+ RTEMS_RECORD_LINE,
+ (rtems_record_data) RTEMS_RETURN_ADDRESS()
+ );
+}
+
+void rtems_record_line_2(
+ rtems_record_event event,
+ rtems_record_data data
+)
+{
+ rtems_record_produce_2(
+ RTEMS_RECORD_LINE,
+ (rtems_record_data) RTEMS_RETURN_ADDRESS(),
+ event,
+ data
+ );
+}
+
+void rtems_record_line_3(
+ rtems_record_event event_0,
+ rtems_record_data data_0,
+ rtems_record_event event_1,
+ rtems_record_data data_1
+)
+{
+ rtems_record_item items[ 3] ;
+
+ items[ 0 ].event = RTEMS_RECORD_LINE;
+ items[ 0 ].data = (rtems_record_data) RTEMS_RETURN_ADDRESS();
+ items[ 1 ].event = event_0;
+ items[ 1 ].data = data_0;
+ items[ 2 ].event = event_1;
+ items[ 2 ].data = data_1;
+ rtems_record_produce_n( items, RTEMS_ARRAY_SIZE( items ) );
+}
+
+void _Record_Caller( void *return_address )
+{
+ rtems_record_produce_2(
+ RTEMS_RECORD_CALLER,
+ (rtems_record_data) return_address,
+ RTEMS_RECORD_LINE,
+ (rtems_record_data) RTEMS_RETURN_ADDRESS()
+ );
+}
+
+uint32_t rtems_record_interrupt_disable( void )
+{
+ uint32_t level;
+ rtems_record_context context;
+
+ _CPU_ISR_Disable( level );
+ rtems_record_prepare_critical( &context, _Per_CPU_Get() );
+ rtems_record_add(
+ &context,
+ RTEMS_RECORD_ISR_DISABLE,
+ (rtems_record_data) RTEMS_RETURN_ADDRESS()
+ );
+ rtems_record_commit_critical( &context );
+
+ return level;
+}
+
+void rtems_record_interrupt_enable( uint32_t level )
+{
+ rtems_record_context context;
+
+ rtems_record_prepare_critical( &context, _Per_CPU_Get() );
+ rtems_record_add(
+ &context,
+ RTEMS_RECORD_ISR_ENABLE,
+ (rtems_record_data) RTEMS_RETURN_ADDRESS()
+ );
+ rtems_record_commit_critical( &context );
+ _CPU_ISR_Enable( level );
+}
diff --git a/testsuites/libtests/record01/init.c b/testsuites/libtests/record01/init.c
index 1789d41f84..a8d3cb5b96 100644
--- a/testsuites/libtests/record01/init.c
+++ b/testsuites/libtests/record01/init.c
@@ -158,22 +158,22 @@ static const rtems_record_item expected_items_12[] = {
static const rtems_record_item expected_items_13[] = {
{ .event = TE(0, RTEMS_RECORD_THREAD_ID), .data = 0x9010001 },
{
- .event = TE(0, RTEMS_RECORD_THREAD_NAME),
+ .event = TE(0, RTEMS_RECORD_STRING),
.data = rtems_build_name('E', 'L', 'D', 'I')
},
{ .event = TE(0, RTEMS_RECORD_THREAD_ID), .data = 0xa010001 },
{
- .event = TE(0, RTEMS_RECORD_THREAD_NAME),
+ .event = TE(0, RTEMS_RECORD_STRING),
.data = rtems_build_name(' ', '1', 'I', 'U')
},
{ .event = TE(0, RTEMS_RECORD_THREAD_ID), .data = 0xa010002 },
{
- .event = TE(0, RTEMS_RECORD_THREAD_NAME),
+ .event = TE(0, RTEMS_RECORD_STRING),
.data = rtems_build_name('k', 'w', 't', 'n')
},
{ .event = TE(0, RTEMS_RECORD_THREAD_ID), .data = 0xa010003 },
{
- .event = TE(0, RTEMS_RECORD_THREAD_NAME),
+ .event = TE(0, RTEMS_RECORD_STRING),
.data = rtems_build_name('D', 'R', 'C', 'R')
}
};
diff --git a/testsuites/libtests/record02/init.c b/testsuites/libtests/record02/init.c
index 5979b5b445..78d198b459 100644
--- a/testsuites/libtests/record02/init.c
+++ b/testsuites/libtests/record02/init.c
@@ -100,6 +100,7 @@ static void Init(rtems_task_argument arg)
Record_Stream_header header;
rtems_record_client_status cs;
int i;
+ uint32_t level;
TEST_BEGIN();
ctx = &test_instance;
@@ -108,6 +109,13 @@ static void Init(rtems_task_argument arg)
rtems_task_wake_after(1);
}
+ rtems_record_line();
+ rtems_record_line_2(RTEMS_RECORD_ARG_0, 1);
+ rtems_record_line_3(RTEMS_RECORD_ARG_1, 2, RTEMS_RECORD_ARG_2, 3);
+ rtems_record_caller();
+ level = rtems_record_interrupt_disable();
+ rtems_record_interrupt_enable(level);
+
rtems_record_client_init(&ctx->client, client_handler, NULL);
_Record_Stream_header_initialize(&header);
cs = rtems_record_client_run(&ctx->client, &header, sizeof(header));
diff --git a/testsuites/libtests/record02/record02.scn b/testsuites/libtests/record02/record02.scn
index 4535cbbdca..d9a98a4478 100644
--- a/testsuites/libtests/record02/record02.scn
+++ b/testsuites/libtests/record02/record02.scn
@@ -1,84 +1,94 @@
*** BEGIN OF TEST RECORD 2 ***
-*** TEST VERSION: 5.0.0.b2c060a507712f6043d7c7f0cf7b50661f25d8c3
+*** TEST VERSION: 5.0.0.956a2ef78d4fa5da162833f884fe72eba8f6184f
*** TEST STATE: EXPECTED-PASS
*** TEST BUILD: RTEMS_NETWORKING RTEMS_POSIX_API
-*** TEST TOOLS: 7.4.1 20190514 (RTEMS 5, RSB 639eed3c77c830a2ac9f36baca21919f8b7bf1be, Newlib 5c2a3661c)
-*:0:VERSION:5
+*** TEST TOOLS: 7.4.1 20190514 (RTEMS 5, RSB e047d64adf806d37393eb12d02a7ce26633d2eba, Newlib 5c2a3661c)
+*:0:VERSION:6
*:0:PROCESSOR_MAXIMUM:0
*:0:PER_CPU_COUNT:80
*:0:FREQUENCY:f4240
*:0:PROCESSOR:0
*:0:PER_CPU_TAIL:0
-*:0:PER_CPU_HEAD:46
-*:0:THREAD_CREATE:9010001
-*:0:THREAD_NAME:49494949
-*:0:THREAD_START:9010001
-*:0:UPTIME_LOW:852b4
+*:0:PER_CPU_HEAD:50
+0.994328000:0:THREAD_CREATE:9010001
+0.994328000:0:STRING:49494949
+0.994514999:0:THREAD_START:9010001
+*:0:UPTIME_LOW:9b307
*:0:UPTIME_HIGH:1
-1.000436999:0:THREAD_CREATE:a010001
-1.000436999:0:THREAD_NAME:55555555
-1.000627999:0:THREAD_START:a010001
-1.001891999:0:THREAD_BEGIN:a010001
-1.003466999:0:THREAD_SWITCH_OUT:a010001
-1.003466999:0:THREAD_STACK_CURRENT:d78
-1.003466999:0:THREAD_SWITCH_IN:9010001
-1.003533999:0:THREAD_BEGIN:9010001
-1.005078999:0:THREAD_SWITCH_OUT:9010001
-1.005078999:0:THREAD_STACK_CURRENT:d68
-1.005078999:0:THREAD_SWITCH_IN:a010001
-1.005218999:0:THREAD_SWITCH_OUT:a010001
-1.005218999:0:THREAD_STACK_CURRENT:d78
-1.005218999:0:THREAD_SWITCH_IN:9010001
-1.015067999:0:THREAD_SWITCH_OUT:9010001
-1.015067999:0:THREAD_STACK_CURRENT:d68
-1.015067999:0:THREAD_SWITCH_IN:a010001
-1.015207999:0:THREAD_SWITCH_OUT:a010001
-1.015207999:0:THREAD_STACK_CURRENT:d78
-1.015207999:0:THREAD_SWITCH_IN:9010001
-1.025067999:0:THREAD_SWITCH_OUT:9010001
-1.025067999:0:THREAD_STACK_CURRENT:d68
-1.025067999:0:THREAD_SWITCH_IN:a010001
-1.025207999:0:THREAD_SWITCH_OUT:a010001
-1.025207999:0:THREAD_STACK_CURRENT:d78
-1.025207999:0:THREAD_SWITCH_IN:9010001
-1.035067999:0:THREAD_SWITCH_OUT:9010001
-1.035067999:0:THREAD_STACK_CURRENT:d68
-1.035067999:0:THREAD_SWITCH_IN:a010001
-1.035207999:0:THREAD_SWITCH_OUT:a010001
-1.035207999:0:THREAD_STACK_CURRENT:d78
-1.035207999:0:THREAD_SWITCH_IN:9010001
-1.045067999:0:THREAD_SWITCH_OUT:9010001
-1.045067999:0:THREAD_STACK_CURRENT:d68
-1.045067999:0:THREAD_SWITCH_IN:a010001
-1.045207999:0:THREAD_SWITCH_OUT:a010001
-1.045207999:0:THREAD_STACK_CURRENT:d78
-1.045207999:0:THREAD_SWITCH_IN:9010001
-1.055067999:0:THREAD_SWITCH_OUT:9010001
-1.055067999:0:THREAD_STACK_CURRENT:d68
-1.055067999:0:THREAD_SWITCH_IN:a010001
-1.055207999:0:THREAD_SWITCH_OUT:a010001
-1.055207999:0:THREAD_STACK_CURRENT:d78
-1.055207999:0:THREAD_SWITCH_IN:9010001
-1.065067999:0:THREAD_SWITCH_OUT:9010001
-1.065067999:0:THREAD_STACK_CURRENT:d68
-1.065067999:0:THREAD_SWITCH_IN:a010001
-1.065207999:0:THREAD_SWITCH_OUT:a010001
-1.065207999:0:THREAD_STACK_CURRENT:d78
-1.065207999:0:THREAD_SWITCH_IN:9010001
-1.075067999:0:THREAD_SWITCH_OUT:9010001
-1.075067999:0:THREAD_STACK_CURRENT:d68
-1.075067999:0:THREAD_SWITCH_IN:a010001
-1.075207999:0:THREAD_SWITCH_OUT:a010001
-1.075207999:0:THREAD_STACK_CURRENT:d78
-1.075207999:0:THREAD_SWITCH_IN:9010001
-1.085067999:0:THREAD_SWITCH_OUT:9010001
-1.085067999:0:THREAD_STACK_CURRENT:d68
-1.085067999:0:THREAD_SWITCH_IN:a010001
-1.085207999:0:THREAD_SWITCH_OUT:a010001
-1.085207999:0:THREAD_STACK_CURRENT:d78
-1.085207999:0:THREAD_SWITCH_IN:9010001
-1.095067999:0:THREAD_SWITCH_OUT:9010001
-1.095067999:0:THREAD_STACK_CURRENT:d68
-1.095067999:0:THREAD_SWITCH_IN:a010001
+1.000563999:0:THREAD_CREATE:a010001
+1.000563999:0:STRING:55555555
+1.000876999:0:THREAD_START:a010001
+1.003730999:0:THREAD_BEGIN:a010001
+1.005493999:0:THREAD_SWITCH_OUT:a010001
+1.005493999:0:THREAD_STACK_CURRENT:d50
+1.005493999:0:THREAD_SWITCH_IN:9010001
+1.005597999:0:THREAD_BEGIN:9010001
+1.013811999:0:THREAD_SWITCH_OUT:9010001
+1.013811999:0:THREAD_STACK_CURRENT:d40
+1.013811999:0:THREAD_SWITCH_IN:a010001
+1.014068999:0:THREAD_SWITCH_OUT:a010001
+1.014068999:0:THREAD_STACK_CURRENT:d50
+1.014068999:0:THREAD_SWITCH_IN:9010001
+1.023800999:0:THREAD_SWITCH_OUT:9010001
+1.023800999:0:THREAD_STACK_CURRENT:d40
+1.023800999:0:THREAD_SWITCH_IN:a010001
+1.024057999:0:THREAD_SWITCH_OUT:a010001
+1.024057999:0:THREAD_STACK_CURRENT:d50
+1.024057999:0:THREAD_SWITCH_IN:9010001
+1.033800999:0:THREAD_SWITCH_OUT:9010001
+1.033800999:0:THREAD_STACK_CURRENT:d40
+1.033800999:0:THREAD_SWITCH_IN:a010001
+1.034057999:0:THREAD_SWITCH_OUT:a010001
+1.034057999:0:THREAD_STACK_CURRENT:d50
+1.034057999:0:THREAD_SWITCH_IN:9010001
+1.043800999:0:THREAD_SWITCH_OUT:9010001
+1.043800999:0:THREAD_STACK_CURRENT:d40
+1.043800999:0:THREAD_SWITCH_IN:a010001
+1.044057999:0:THREAD_SWITCH_OUT:a010001
+1.044057999:0:THREAD_STACK_CURRENT:d50
+1.044057999:0:THREAD_SWITCH_IN:9010001
+1.053800999:0:THREAD_SWITCH_OUT:9010001
+1.053800999:0:THREAD_STACK_CURRENT:d40
+1.053800999:0:THREAD_SWITCH_IN:a010001
+1.054057999:0:THREAD_SWITCH_OUT:a010001
+1.054057999:0:THREAD_STACK_CURRENT:d50
+1.054057999:0:THREAD_SWITCH_IN:9010001
+1.063800999:0:THREAD_SWITCH_OUT:9010001
+1.063800999:0:THREAD_STACK_CURRENT:d40
+1.063800999:0:THREAD_SWITCH_IN:a010001
+1.064057999:0:THREAD_SWITCH_OUT:a010001
+1.064057999:0:THREAD_STACK_CURRENT:d50
+1.064057999:0:THREAD_SWITCH_IN:9010001
+1.073800999:0:THREAD_SWITCH_OUT:9010001
+1.073800999:0:THREAD_STACK_CURRENT:d40
+1.073800999:0:THREAD_SWITCH_IN:a010001
+1.074057999:0:THREAD_SWITCH_OUT:a010001
+1.074057999:0:THREAD_STACK_CURRENT:d50
+1.074057999:0:THREAD_SWITCH_IN:9010001
+1.083800999:0:THREAD_SWITCH_OUT:9010001
+1.083800999:0:THREAD_STACK_CURRENT:d40
+1.083800999:0:THREAD_SWITCH_IN:a010001
+1.084057999:0:THREAD_SWITCH_OUT:a010001
+1.084057999:0:THREAD_STACK_CURRENT:d50
+1.084057999:0:THREAD_SWITCH_IN:9010001
+1.093800999:0:THREAD_SWITCH_OUT:9010001
+1.093800999:0:THREAD_STACK_CURRENT:d40
+1.093800999:0:THREAD_SWITCH_IN:a010001
+1.094057999:0:THREAD_SWITCH_OUT:a010001
+1.094057999:0:THREAD_STACK_CURRENT:d50
+1.094057999:0:THREAD_SWITCH_IN:9010001
+1.103800999:0:THREAD_SWITCH_OUT:9010001
+1.103800999:0:THREAD_STACK_CURRENT:d40
+1.103800999:0:THREAD_SWITCH_IN:a010001
+1.103883999:0:LINE:2001290
+1.103897999:0:LINE:200129c
+1.103897999:0:ARG_0:1
+1.103914999:0:LINE:20012b0
+1.103914999:0:ARG_1:2
+1.103914999:0:ARG_2:3
+1.103940999:0:CALLER:200c080
+1.103940999:0:LINE:20012b8
+1.103956999:0:ISR_DISABLE:20012c0
+1.103966999:0:ISR_ENABLE:20012c8
*** END OF TEST RECORD 2 ***
--
2.16.4
More information about the devel
mailing list