[rtems commit] Delete _Region_Debug_Walk()
Sebastian Huber
sebh at rtems.org
Mon Dec 7 12:13:42 UTC 2015
Module: rtems
Branch: master
Commit: a06201439acddeda8c9dc2109fb1e72d85bd779c
Changeset: http://git.rtems.org/rtems/commit/?id=a06201439acddeda8c9dc2109fb1e72d85bd779c
Author: Sebastian Huber <sebastian.huber at embedded-brains.de>
Date: Thu Nov 26 14:11:19 2015 +0100
Delete _Region_Debug_Walk()
The expensive heap walks are superfluous due to the heap protection
enabled via RTEMS_DEBUG.
Update #2477.
---
cpukit/rtems/include/rtems/rtems/regionimpl.h | 20 --------------------
cpukit/rtems/src/regiondelete.c | 1 -
cpukit/rtems/src/regiongetsegment.c | 4 ----
cpukit/rtems/src/regionresizesegment.c | 5 -----
cpukit/rtems/src/regionreturnsegment.c | 5 -----
5 files changed, 35 deletions(-)
diff --git a/cpukit/rtems/include/rtems/rtems/regionimpl.h b/cpukit/rtems/include/rtems/rtems/regionimpl.h
index ae1a50d..078cf44 100644
--- a/cpukit/rtems/include/rtems/rtems/regionimpl.h
+++ b/cpukit/rtems/include/rtems/rtems/regionimpl.h
@@ -146,26 +146,6 @@ RTEMS_INLINE_ROUTINE bool _Region_Free_segment (
*/
extern void _Region_Process_queue(Region_Control *the_region);
-/**
- * @brief _Region_Debug_Walk
- *
- * This routine is invoked to verify the integrity of a heap associated
- * with the_region.
- */
-#ifdef RTEMS_DEBUG
-
-#define _Region_Debug_Walk( _the_region, _source ) \
- do { \
- if ( rtems_debug_is_enabled( RTEMS_DEBUG_REGION ) ) \
- _Heap_Walk( &(_the_region)->Memory, _source, false ); \
- } while ( 0 )
-
-#else
-
-#define _Region_Debug_Walk( _the_region, _source )
-
-#endif
-
/**@}*/
#ifdef __cplusplus
diff --git a/cpukit/rtems/src/regiondelete.c b/cpukit/rtems/src/regiondelete.c
index b5209da..bf6e461 100644
--- a/cpukit/rtems/src/regiondelete.c
+++ b/cpukit/rtems/src/regiondelete.c
@@ -40,7 +40,6 @@ rtems_status_code rtems_region_delete(
switch ( location ) {
case OBJECTS_LOCAL:
- _Region_Debug_Walk( the_region, 5 );
if ( the_region->number_of_used_blocks != 0 )
return_status = RTEMS_RESOURCE_IN_USE;
else {
diff --git a/cpukit/rtems/src/regiongetsegment.c b/cpukit/rtems/src/regiongetsegment.c
index 26437b5..864bd00 100644
--- a/cpukit/rtems/src/regiongetsegment.c
+++ b/cpukit/rtems/src/regiongetsegment.c
@@ -57,12 +57,8 @@ rtems_status_code rtems_region_get_segment(
return_status = RTEMS_INVALID_SIZE;
else {
- _Region_Debug_Walk( the_region, 1 );
-
the_segment = _Region_Allocate_segment( the_region, size );
- _Region_Debug_Walk( the_region, 2 );
-
if ( the_segment ) {
the_region->number_of_used_blocks += 1;
*segment = the_segment;
diff --git a/cpukit/rtems/src/regionresizesegment.c b/cpukit/rtems/src/regionresizesegment.c
index b1d9482..86d8a77 100644
--- a/cpukit/rtems/src/regionresizesegment.c
+++ b/cpukit/rtems/src/regionresizesegment.c
@@ -49,9 +49,6 @@ rtems_status_code rtems_region_resize_segment(
switch ( location ) {
case OBJECTS_LOCAL:
-
- _Region_Debug_Walk( the_region, 7 );
-
status = _Heap_Resize_block(
&the_region->Memory,
segment,
@@ -61,8 +58,6 @@ rtems_status_code rtems_region_resize_segment(
);
*old_size = (uint32_t) osize;
- _Region_Debug_Walk( the_region, 8 );
-
if ( status == HEAP_RESIZE_SUCCESSFUL )
/* unlocks allocator */
_Region_Process_queue( the_region );
diff --git a/cpukit/rtems/src/regionreturnsegment.c b/cpukit/rtems/src/regionreturnsegment.c
index 98f2240..1af54f2 100644
--- a/cpukit/rtems/src/regionreturnsegment.c
+++ b/cpukit/rtems/src/regionreturnsegment.c
@@ -53,9 +53,6 @@ rtems_status_code rtems_region_return_segment(
switch ( location ) {
case OBJECTS_LOCAL:
-
- _Region_Debug_Walk( the_region, 3 );
-
#ifdef RTEMS_REGION_FREE_SHRED_PATTERN
if ( !_Heap_Size_of_alloc_area( &the_region->Memory, segment, &size ) )
return_status = RTEMS_INVALID_ADDRESS;
@@ -64,8 +61,6 @@ rtems_status_code rtems_region_return_segment(
#endif
status = _Region_Free_segment( the_region, segment );
- _Region_Debug_Walk( the_region, 4 );
-
if ( !status )
return_status = RTEMS_INVALID_ADDRESS;
else {
More information about the vc
mailing list