summaryrefslogtreecommitdiffstats
path: root/cpukit/libtrace
diff options
context:
space:
mode:
authorSebastian Huber <sebastian.huber@embedded-brains.de>2019-08-27 15:39:43 +0200
committerSebastian Huber <sebastian.huber@embedded-brains.de>2019-08-28 08:58:14 +0200
commita2684c2b8d4cd1336052cc541cce31cc342bae2e (patch)
tree0abeef7d522a53b558f7c453bfef4bbdacfc8eef /cpukit/libtrace
parentrecord: Add data size to client (diff)
downloadrtems-a2684c2b8d4cd1336052cc541cce31cc342bae2e.tar.bz2
record: Use BSS section instead of per-CPU data
The .rtemsrwset section is used for the per-CPU data. This section has loadable content. Place the ring buffers in the BSS section to avoid large executable image sizes. Not using the per-CPU data makes it possible to initialize the record support earlier. Update #3665.
Diffstat (limited to 'cpukit/libtrace')
-rw-r--r--cpukit/libtrace/record/record-server.c2
-rw-r--r--cpukit/libtrace/record/record-sysinit.c14
2 files changed, 8 insertions, 8 deletions
diff --git a/cpukit/libtrace/record/record-server.c b/cpukit/libtrace/record/record-server.c
index 991aef2fb4..d1f299dbdb 100644
--- a/cpukit/libtrace/record/record-server.c
+++ b/cpukit/libtrace/record/record-server.c
@@ -151,7 +151,7 @@ void _Record_Stream_header_initialize( Record_Stream_header *header )
header->Processor_maximum.data = rtems_scheduler_get_processor_maximum() - 1;
header->Count.event = RTEMS_RECORD_TIME_EVENT( 0, RTEMS_RECORD_PER_CPU_COUNT );
- header->Count.data = _Record_Item_count;
+ header->Count.data = _Record_Configuration.item_count;
header->Frequency.event =
RTEMS_RECORD_TIME_EVENT( 0, RTEMS_RECORD_FREQUENCY );
diff --git a/cpukit/libtrace/record/record-sysinit.c b/cpukit/libtrace/record/record-sysinit.c
index 59bd97346f..afb887cd2f 100644
--- a/cpukit/libtrace/record/record-sysinit.c
+++ b/cpukit/libtrace/record/record-sysinit.c
@@ -39,21 +39,21 @@ static Watchdog_Interval _Record_Tick_interval;
void _Record_Initialize( void )
{
- uint32_t cpu_max;
- uint32_t cpu_index;
- uintptr_t offset;
+ Record_Control *control;
+ uint32_t cpu_max;
+ uint32_t cpu_index;
+ control = _Record_Configuration.controls;
cpu_max = rtems_configuration_get_maximum_processors();
- offset = PER_CPU_DATA_OFFSET( _Record_Per_CPU );
for ( cpu_index = 0; cpu_index < cpu_max; ++cpu_index ) {
Per_CPU_Control *cpu;
- Record_Control *control;
cpu = _Per_CPU_Get_by_index( cpu_index );
- control = PER_CPU_DATA_GET_BY_OFFSET( cpu, Record_Control, offset );
- control->mask = _Record_Item_count - 1U;
+ control->mask = _Record_Configuration.item_count - 1U;
cpu->record = control;
+ control = (Record_Control *)
+ ( (char *) control + _Record_Configuration.control_size );
}
}