#2477 closed enhancement (fixed)

Remove <rtems/debug.h>

Reported by: Sebastian Huber Owned by: Sebastian Huber <sebastian.huber@…>
Priority: normal Milestone: 5.1
Component: unspecified Version: 5
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description

RTEMS has an API for dynamic debug support in <rtems/debug.h>. This feature is sparely used:

cpukit/sapi/src/debug.c:  rtems_debug_disable( RTEMS_DEBUG_ALL_MASK );
cpukit/sapi/src/debug.c:void rtems_debug_enable (
cpukit/sapi/src/debug.c:  rtems_debug_control  to_be_enabled
cpukit/sapi/src/debug.c:void rtems_debug_disable (
cpukit/sapi/src/debug.c:  rtems_debug_control  to_be_disabled
cpukit/sapi/src/debug.c:bool rtems_debug_is_enabled(
cpukit/sapi/src/debug.c:  rtems_debug_control  level
cpukit/rtems/include/rtems/rtems/regionimpl.h:    if ( rtems_debug_is_enabled( RTEMS_DEBUG_REGION ) ) \
cpukit/score/include/rtems/debug.h:typedef uint32_t   rtems_debug_control;
cpukit/score/include/rtems/debug.h:SCORE_EXTERN rtems_debug_control _Debug_Level;
cpukit/score/include/rtems/debug.h:void rtems_debug_enable(
cpukit/score/include/rtems/debug.h:  rtems_debug_control  to_be_enabled
cpukit/score/include/rtems/debug.h:void rtems_debug_disable(
cpukit/score/include/rtems/debug.h:  rtems_debug_control  to_be_disabled
cpukit/score/include/rtems/debug.h:bool rtems_debug_is_enabled(
cpukit/score/include/rtems/debug.h:  rtems_debug_control  level
c/src/lib/libbsp/shared/bootcard.c: *        - rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
c/src/lib/libbsp/shared/bootcard.c:    rtems_debug_enable( RTEMS_DEBUG_ALL_MASK );
c/src/lib/libbsp/shared/include/bootcard.h: *   - rtems_debug_enable( RTEMS_DEBUG_ALL_MASK )
testsuites/sptests/spregion_err01/init.c:  puts( "TA1 - rtems_debug_disable - RTEMS_DEBUG_REGION" );
testsuites/sptests/spregion_err01/init.c:  rtems_debug_disable( RTEMS_DEBUG_REGION );
testsuites/sptests/spregion_err01/init.c:  puts( "TA1 - rtems_debug_enable - RTEMS_DEBUG_REGION" );
testsuites/sptests/spregion_err01/init.c:  rtems_debug_enable( RTEMS_DEBUG_REGION );
testsuites/sptests/sp10/init.c:  puts( "Init - rtems_debug_is_enabled - is 0x1 set? No" );
testsuites/sptests/sp10/init.c:  is_set = rtems_debug_is_enabled( 0x1 );
testsuites/sptests/sp10/init.c:  puts( "Init - rtems_debug_enable - set 0x1" );
testsuites/sptests/sp10/init.c:  rtems_debug_enable(0x1);
testsuites/sptests/sp10/init.c:  puts( "Init - rtems_debug_is_enabled - is 0x1 set? Yes" );
testsuites/sptests/sp10/init.c:  is_set = rtems_debug_is_enabled( 0x1 );
testsuites/sptests/sp10/init.c:  puts( "Init - rtems_debug_disable - clear 0x1" );
testsuites/sptests/sp10/init.c:  rtems_debug_disable(0x1);
testsuites/sptests/sp10/init.c:  puts( "Init - rtems_debug_is_enabled - is 0x1 set? No" );
testsuites/sptests/sp10/init.c:  is_set = rtems_debug_is_enabled( 0x1 );

The only user is the Classic Region and it is only active in case RTEMS_DEBUG is defined. Due to the heap protection support which is also available in case RTEMS_DEBUG is defined, the expensive heap walks are superfluous.

We should remove this API entirely to simplify the code base.

Change History (4)

comment:1 Changed on Dec 7, 2015 at 12:13:47 PM by Sebastian Huber <sebastian.huber@…>

Owner: set to Sebastian Huber <sebastian.huber@…>
Resolution: fixed
Status: newclosed

In 8054b1c7181b7c36e413ce15b686f99d06f4a7d2/rtems:

Remove <rtems/debug.h>

Close #2477.

comment:2 Changed on Dec 7, 2015 at 1:43:47 PM by Sebastian Huber <sebastian.huber@…>

In 452eec433b3aa2fba464cee54f7d3c92726e4e0e/rtems:

doc: Remove reference to debug mask

Update #2477.

comment:3 Changed on May 11, 2017 at 7:31:02 AM by Sebastian Huber

Milestone: 4.124.12.0

comment:4 Changed on Nov 9, 2017 at 6:27:14 AM by Sebastian Huber

Milestone: 4.12.05.1

Milestone renamed

Note: See TracTickets for help on using tickets.