Changeset 47e1f6e in rtems-docs


Ignore:
Timestamp:
12/01/22 12:04:08 (2 months ago)
Author:
Sebastian Huber <sebastian.huber@…>
Branches:
master
Children:
8f5f371
Parents:
5a54847
git-author:
Sebastian Huber <sebastian.huber@…> (12/01/22 12:04:08)
git-committer:
Sebastian Huber <sebastian.huber@…> (12/02/22 09:27:30)
Message:

Document CONFIGURE_RECORD_INTERRUPTS_ENABLED

Close #4769.

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • c-user/config/event-record.rst

    r5a54847 r47e1f6e  
    11.. SPDX-License-Identifier: CC-BY-SA-4.0
    22
    3 .. Copyright (C) 2019, 2021 embedded brains GmbH (http://www.embedded-brains.de)
     3.. Copyright (C) 2019, 2022 embedded brains GmbH (http://www.embedded-brains.de)
    44
    55.. This file is part of the RTEMS quality process and was automatically
     
    151151to produce crash dumps.
    152152
     153.. Generated from spec:/acfg/if/record-interrupts-enabled
     154
     155.. raw:: latex
     156
     157    \clearpage
     158
     159.. index:: CONFIGURE_RECORD_INTERRUPTS_ENABLED
     160
     161.. _CONFIGURE_RECORD_INTERRUPTS_ENABLED:
     162
     163CONFIGURE_RECORD_INTERRUPTS_ENABLED
     164-----------------------------------
     165
     166.. rubric:: CONSTANT:
     167
     168``CONFIGURE_RECORD_INTERRUPTS_ENABLED``
     169
     170.. rubric:: OPTION TYPE:
     171
     172This configuration option is a boolean feature define.
     173
     174.. rubric:: DEFAULT CONFIGURATION:
     175
     176If this configuration option is undefined, then the described feature is not
     177enabled.
     178
     179.. rubric:: DESCRIPTION:
     180
     181In case
     182
     183* this configuration option is defined
     184
     185* and :ref:`CONFIGURE_RECORD_PER_PROCESSOR_ITEMS` is properly defined,
     186
     187then the interrupt event recording is enabled.
     188
     189.. rubric:: NOTES:
     190
     191The interrupt event recording generates interrupt entry and exit events when
     192interrupt entries are dispatched.
     193
    153194.. Generated from spec:/acfg/if/record-per-processor-items
    154195
  • user/tracing/eventrecording.rst

    r5a54847 r47e1f6e  
    4949option :c:macro:`CONFIGURE_RECORD_EXTENSIONS_ENABLED` enables the generation of
    5050thread create, start, restart, delete, switch, begin, exitted and terminate
    51 events.  Dumps of the event records in a fatal error handler can be enabled by
    52 the mutually exclusive :c:macro:`CONFIGURE_RECORD_FATAL_DUMP_BASE64` and
     51events.  The configuration option
     52:c:macro:`CONFIGURE_RECORD_INTERRUPTS_ENABLED` enables the generation of
     53interrupt entry and exit events.  Dumps of the event records in a fatal error
     54handler can be enabled by the mutually exclusive
     55:c:macro:`CONFIGURE_RECORD_FATAL_DUMP_BASE64` and
    5356:c:macro:`CONFIGURE_RECORD_FATAL_DUMP_BASE64_ZLIB` configuration options.
    5457
     
    98101     );
    99102   }
    100 
    101 To generate interrupt handler entry/exit events, the following patch can be
    102 used:
    103 
    104 .. code-block:: diff
    105 
    106     diff --git a/bsps/arm/shared/clock/clock-armv7m.c b/bsps/arm/shared/clock/clock-armv7m.c
    107     index 255de1ca42..0d37c63ac6 100644
    108     --- a/bsps/arm/shared/clock/clock-armv7m.c
    109     +++ b/bsps/arm/shared/clock/clock-armv7m.c
    110     @@ -29,6 +29,7 @@
    111      #include <bsp/clock-armv7m.h>
    112 
    113      #include <rtems.h>
    114     +#include <rtems/record.h>
    115      #include <rtems/sysinit.h>
    116 
    117      #ifdef ARM_MULTILIB_ARCH_V7M
    118     @@ -45,9 +46,11 @@ static uint32_t _ARMV7M_TC_get_timecount(struct timecounter *base)
    119 
    120      void _ARMV7M_Clock_handler(void)
    121      {
    122     +  rtems_record_produce(RTEMS_RECORD_INTERRUPT_ENTRY, ARMV7M_VECTOR_SYSTICK);
    123        _ARMV7M_Interrupt_service_enter();
    124        Clock_isr(NULL);
    125        _ARMV7M_Interrupt_service_leave();
    126     +  rtems_record_produce(RTEMS_RECORD_INTERRUPT_EXIT, ARMV7M_VECTOR_SYSTICK);
    127      }
    128 
    129      static void _ARMV7M_Clock_handler_install(void)
    130     diff --git a/bsps/include/bsp/irq-generic.h b/bsps/include/bsp/irq-generic.h
    131     index 31835d07ba..2ab2f78b65 100644
    132     --- a/bsps/include/bsp/irq-generic.h
    133     +++ b/bsps/include/bsp/irq-generic.h
    134     @@ -30,6 +30,7 @@
    135      #include <stdbool.h>
    136 
    137      #include <rtems/irq-extension.h>
    138     +#include <rtems/record.h>
    139      #include <rtems/score/assert.h>
    140 
    141      #ifdef RTEMS_SMP
    142     @@ -258,6 +259,7 @@ void bsp_interrupt_vector_disable(rtems_vector_number vector);
    143       */
    144      static inline void bsp_interrupt_handler_dispatch(rtems_vector_number vector)
    145      {
    146     +  rtems_record_produce(RTEMS_RECORD_INTERRUPT_ENTRY, vector);
    147        if (bsp_interrupt_is_valid_vector(vector)) {
    148          const bsp_interrupt_handler_entry *e =
    149            &bsp_interrupt_handler_table [bsp_interrupt_handler_index(vector)];
    150     @@ -276,6 +278,7 @@ static inline void bsp_interrupt_handler_dispatch(rtems_vector_number vector)
    151        } else {
    152          bsp_interrupt_handler_default(vector);
    153        }
    154     +  rtems_record_produce(RTEMS_RECORD_INTERRUPT_EXIT, vector);
    155      }
    156 
    157      /**
    158103
    159104Transfer of Event Records to the Host Computer
Note: See TracChangeset for help on using the changeset viewer.