Re: _Configuration_Scheduler_priority_dflt
OK Sebastian, Thank you very much! On Thu, Jul 10, 2014 at 11:53 AM, Sebastian Huber sebastian.hu...@embedded-brains.de wrote: On 2014-07-10 16:43, Gabriel Ibarra wrote: Hello, I'm working with a board with a few amount of RAM (lpc1768- 32k), I recently updated the last version of RTEMS and now I have more overhead, I found that the responsible of this new overhead is an object in the bss section: _Configuration_Scheduler_priority_dflt; So, I want to know what is that, is there some documentation of it?, Can I disable it? With respect to this item there is no overhead. Only the memory location moved from the workspace to the BSS section. You can configure fewer priority levels to save space or use the simple priority scheduler. -- Sebastian Huber, embedded brains GmbH Address : Dornierstr. 4, D-82178 Puchheim, Germany Phone : +49 89 189 47 41-16 Fax : +49 89 189 47 41-09 E-Mail : sebastian.hu...@embedded-brains.de PGP : Public key available on request. Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG. ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel -- Gabriel Alejandro Ibarra Software Engineer San Lorenzo 47, 3rd Floor, Office 5 Córdoba, Argentina Phone: +54 351 4217888 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
Re: _Configuration_Scheduler_priority_dflt
On 7/10/2014 9:53 AM, Sebastian Huber wrote: On 2014-07-10 16:43, Gabriel Ibarra wrote: Hello, I'm working with a board with a few amount of RAM (lpc1768- 32k), I recently updated the last version of RTEMS and now I have more overhead, I found that the responsible of this new overhead is an object in the bss section: _Configuration_Scheduler_priority_dflt; So, I want to know what is that, is there some documentation of it?, Can I disable it? With respect to this item there is no overhead. Only the memory location moved from the workspace to the BSS section. You can configure fewer priority levels to save space or use the simple priority scheduler. Can you see if there are new symbols in the new executable which we might be surprised to see? It is possible a new dependency was accidentally introduced. Did any existing methods get much larger? Another option is to turn on per function and data sections and see if that helps. The SPARC BSPs did this. It is a little tricky not not a lot to do. Then the linker can drop out unreferenced variables and methods. -- Joel Sherrill, Ph.D. Director of Research Development joel.sherr...@oarcorp.comOn-Line Applications Research Ask me about RTEMS: a free RTOS Huntsville AL 35805 Support Available(256) 722-9985 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
TEST EMAIL -- IGNORE
From: Joel Sherrill joel.sherr...@oarcorp.com --- IGNORE ME -- 1.7.1 ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel
[PATCH 3/4] capture: Remove nested rtems_interrupt_lock_acquire calls.
Use of the cenable command was resulting in a lock in rtems_interrupt_lock_acquire due to nesting. --- cpukit/libmisc/capture/capture.c | 39 ++- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/cpukit/libmisc/capture/capture.c b/cpukit/libmisc/capture/capture.c index ec5e408..3ce8d8d 100644 --- a/cpukit/libmisc/capture/capture.c +++ b/cpukit/libmisc/capture/capture.c @@ -379,7 +379,7 @@ rtems_capture_create_control (rtems_name name, rtems_id id) * This function create the task control. */ static inline rtems_capture_task_t* -rtems_capture_create_capture_task (rtems_tcb* new_task) +rtems_capture_create_capture_task (rtems_tcb* new_task, bool protect) { rtems_interrupt_lock_context lock_context; rtems_capture_task_t*task; @@ -428,7 +428,8 @@ rtems_capture_create_capture_task (rtems_tcb* new_task) task-stack_size = new_task-Start.Initial_stack.size; task-stack_clean= task-stack_size; - rtems_interrupt_lock_acquire (capture_lock, lock_context); + if (protect) +rtems_interrupt_lock_acquire (capture_lock, lock_context); task-forw= capture_tasks; if (task-forw) @@ -436,7 +437,8 @@ rtems_capture_create_capture_task (rtems_tcb* new_task) task-back= NULL; capture_tasks = task; - rtems_interrupt_lock_release (capture_lock, lock_context); + if (protect) +rtems_interrupt_lock_release (capture_lock, lock_context); /* * We need to scan the default control list to initialise @@ -633,12 +635,12 @@ rtems_capture_create_task (rtems_tcb* current_task, */ if (ct == NULL) -ct = rtems_capture_create_capture_task (current_task); +ct = rtems_capture_create_capture_task (current_task, true); /* * Create the new task's capture control block. */ - nt = rtems_capture_create_capture_task (new_task); + nt = rtems_capture_create_capture_task (new_task, true); if (rtems_capture_trigger (ct, nt, RTEMS_CAPTURE_CREATE)) { @@ -672,10 +674,10 @@ rtems_capture_start_task (rtems_tcb* current_task, */ if (ct == NULL) -ct = rtems_capture_create_capture_task (current_task); +ct = rtems_capture_create_capture_task (current_task, true); if (st == NULL) -st = rtems_capture_create_capture_task (started_task); +st = rtems_capture_create_capture_task (started_task, true); if (rtems_capture_trigger (ct, st, RTEMS_CAPTURE_START)) { @@ -709,10 +711,10 @@ rtems_capture_restart_task (rtems_tcb* current_task, */ if (ct == NULL) -ct = rtems_capture_create_capture_task (current_task); +ct = rtems_capture_create_capture_task (current_task, true); if (rt == NULL) -rt = rtems_capture_create_capture_task (restarted_task); +rt = rtems_capture_create_capture_task (restarted_task, true); if (rtems_capture_trigger (ct, rt, RTEMS_CAPTURE_RESTART)) { @@ -747,10 +749,10 @@ rtems_capture_delete_task (rtems_tcb* current_task, dt = deleted_task-extensions[capture_extension_index]; if (ct == NULL) -ct = rtems_capture_create_capture_task (current_task); +ct = rtems_capture_create_capture_task (current_task, true); if (dt == NULL) -dt = rtems_capture_create_capture_task (deleted_task); +dt = rtems_capture_create_capture_task (deleted_task, true); if (rtems_capture_trigger (ct, dt, RTEMS_CAPTURE_DELETE)) { @@ -789,7 +791,7 @@ rtems_capture_begin_task (rtems_tcb* begin_task) */ if (bt == NULL) -bt = rtems_capture_create_capture_task (begin_task); +bt = rtems_capture_create_capture_task (begin_task, true); if (rtems_capture_trigger (NULL, bt, RTEMS_CAPTURE_BEGIN)) rtems_capture_record (bt, RTEMS_CAPTURE_BEGIN_EVENT); @@ -816,7 +818,7 @@ rtems_capture_exitted_task (rtems_tcb* exitted_task) */ if (et == NULL) -et = rtems_capture_create_capture_task (exitted_task); +et = rtems_capture_create_capture_task (exitted_task, true); if (rtems_capture_trigger (NULL, et, RTEMS_CAPTURE_EXITTED)) rtems_capture_record (et, RTEMS_CAPTURE_EXITTED_EVENT); @@ -844,7 +846,7 @@ rtems_capture_terminated_task (rtems_tcb* terminated_task) */ if (tt == NULL) -tt = rtems_capture_create_capture_task (terminated_task); +tt = rtems_capture_create_capture_task (terminated_task, true); if (rtems_capture_trigger (NULL, tt, RTEMS_CAPTURE_TERMINATED)) rtems_capture_record (tt, RTEMS_CAPTURE_TERMINATED_EVENT); @@ -890,13 +892,13 @@ rtems_capture_switch_task (rtems_tcb* current_task, ct = current_task-extensions[capture_extension_index]; if (ct == NULL) -ct = rtems_capture_create_capture_task (current_task); +ct = rtems_capture_create_capture_task (current_task, true); } ht = heir_task-extensions[capture_extension_index]; if (ht == NULL) - ht = rtems_capture_create_capture_task (heir_task); + ht = rtems_capture_create_capture_task (heir_task, true); /* * Update the execution time.
[PATCH 4/4] capture01: New non-interactive test for capture engine.
--- testsuites/libtests/Makefile.am | 1 + testsuites/libtests/capture01/Makefile.am | 20 +++ testsuites/libtests/capture01/capture01.doc | 19 +++ testsuites/libtests/capture01/capture01.scn | 35 testsuites/libtests/capture01/init.c| 253 testsuites/libtests/capture01/system.h | 42 + testsuites/libtests/capture01/test1.c | 250 +++ testsuites/libtests/configure.ac| 1 + 8 files changed, 621 insertions(+) create mode 100644 testsuites/libtests/capture01/Makefile.am create mode 100644 testsuites/libtests/capture01/capture01.doc create mode 100644 testsuites/libtests/capture01/capture01.scn create mode 100644 testsuites/libtests/capture01/init.c create mode 100644 testsuites/libtests/capture01/system.h create mode 100644 testsuites/libtests/capture01/test1.c diff --git a/testsuites/libtests/Makefile.am b/testsuites/libtests/Makefile.am index f3987b3..f6a2778 100644 --- a/testsuites/libtests/Makefile.am +++ b/testsuites/libtests/Makefile.am @@ -14,6 +14,7 @@ _SUBDIRS += block14 _SUBDIRS += block13 _SUBDIRS += rbheap01 _SUBDIRS += flashdisk01 +_SUBDIRS += capture01 _SUBDIRS += bspcmdline01 cpuuse devfs01 devfs02 devfs03 devfs04 \ deviceio01 devnullfatal01 dumpbuf01 gxx01 \ diff --git a/testsuites/libtests/capture01/Makefile.am b/testsuites/libtests/capture01/Makefile.am new file mode 100644 index 000..6c0d80a --- /dev/null +++ b/testsuites/libtests/capture01/Makefile.am @@ -0,0 +1,20 @@ + +rtems_tests_PROGRAMS = capture01 +capture01_SOURCES = init.c test1.c system.h + +dist_rtems_tests_DATA = capture01.scn +dist_rtems_tests_DATA += capture01.doc + +include $(RTEMS_ROOT)/make/custom/@RTEMS_BSP@.cfg +include $(top_srcdir)/../automake/compile.am +include $(top_srcdir)/../automake/leaf.am + + +LINK_OBJS = $(capture01_OBJECTS) +LINK_LIBS = $(capture01_LDLIBS) + +capture01$(EXEEXT): $(capture01_OBJECTS) $(capture01_DEPENDENCIES) + @rm -f capture01$(EXEEXT) + $(make-exe) + +include $(top_srcdir)/../automake/local.am diff --git a/testsuites/libtests/capture01/capture01.doc b/testsuites/libtests/capture01/capture01.doc new file mode 100644 index 000..c3d2e56 --- /dev/null +++ b/testsuites/libtests/capture01/capture01.doc @@ -0,0 +1,19 @@ +# COPYRIGHT (c) 1989-1999. +# On-Line Applications Research Corporation (OAR). +# +# The license and distribution terms for this file may be +# found in the file LICENSE in this distribution or at +# http://www.rtems.org/license/LICENSE. +# + +This is a non-ineractive test of the capture engine. This test is based +on the methods that would be called through the monitor capture commands: + + copen 1 + cwceil 98 + cwfloor 105 + cwglob on + ctset RMON + cwlist + cenable + ctrace diff --git a/testsuites/libtests/capture01/capture01.scn b/testsuites/libtests/capture01/capture01.scn new file mode 100644 index 000..e6d9cb1 --- /dev/null +++ b/testsuites/libtests/capture01/capture01.scn @@ -0,0 +1,35 @@ +*** BEGIN OF TEST CAPTURE ENGINE *** +watch priority ceiling is 100 +watch priority floor is 102 +global watch is enabled +total 1 + g- T:S-- F:- +0a010002 CT1a 102 102 SWITCHED_OUT +0a010003 CT1b 101 101 CREATED +0a010003 CT1b 101 101 STARTED +0a010003 CT1b 101 101 SWITCHED_IN +0a010003 CT1b 101 101 BEGIN +0a010003 CT1b 101 101 SWITCHED_OUT +0a010004 CT1c 100 100 CREATED +0a010004 CT1c 100 100 STARTED +0a010004 CT1c 100 100 SWITCHED_IN +0a010004 CT1c 100 100 BEGIN +0a010004 CT1c 100 100 SWITCHED_OUT +0a010003 CT1b 101 101 SWITCHED_IN +0a010003 CT1b 101 101 SWITCHED_OUT +0a010002 CT1a 102 100 SWITCHED_IN +0a010002 CT1a 102 102 SWITCHED_OUT +0a010004 CT1c 100 100 SWITCHED_IN +0a010004 CT1c 100 100 SWITCHED_OUT +0a010003 CT1b 101 101 SWITCHED_IN +0a010003 CT1b 101 101 SWITCHED_OUT +0a010004 CT1c 100 100 SWITCHED_IN +0a010004 CT1c 100 100 TERMINATED +0a010004 CT1c 100 100 SWITCHED_OUT +0a010003 CT1b 101 101 SWITCHED_IN +0a010003 CT1b 101 101 TERMINATED +0a010003 CT1b 101 101 SWITCHED_OUT +0a010002 CT1a 102 102 SWITCHED_IN +0a010002 CT1a 102 102 TERMINATED +0a010002 CT1a 102 102 SWITCHED_OUT +*** END OF TEST CAPTURE ENGINE *** diff --git a/testsuites/libtests/capture01/init.c b/testsuites/libtests/capture01/init.c new file mode 100644 index 000..dcffc4c --- /dev/null +++ b/testsuites/libtests/capture01/init.c @@ -0,0 +1,253 @@ +/* + * COPYRIGHT (c) 1989-2012. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may in + * the file LICENSE in this distribution or at + * http://www.rtems.org/license/LICENSE. + */ + +#define CONFIGURE_INIT + +#ifdef HAVE_CONFIG_H +#include config.h +#endif + +#include system.h +#include ctype.h +#include stdlib.h +#include stdio.h +#include string.h +#include inttypes.h + +#include rtems.h +#include rtems/capture-cli.h +#include rtems/monitor.h +#include rtems/shell.h + +#define ASSERT_SC(sc)
Re: Adding capture support to score
On 10/07/2014 6:09 pm, Sebastian Huber wrote: Hello Jennifer, I am about to go on vacation so I can only give some short comments. Have fun. This patch looks a bit like approach of the Timeline Tool from Edisoft: http://lists.rtems.org/pipermail/users/2007-October/017112.html I am more in favor of linker based versions like: http://www.rtems.org/wiki/index.php/RTEMS_Trace_Tool +1 What is missing is the context of the work being done. It would nice for Jennifer to update a wiki page with the requirements of the work, ie what functions need to be traced, SMP support etc. The trace tool approach documented in the wiki has 2 parts, the host side for generating the stubs and the target side for controlling, triggering and recording the events. The first part is complex and requires detailed analysis of the DWARF debug info to extract the function signature being wrapped [1]. The second part is a simpler and a more manageable task and I understand after a meeting with Joel and Jennifer this is the task being undertaken. The patch posted does not meet the trace tool end requirements and needs to be changed. It is too invasive. I am playing with a bit of C code locally to figure out a solution. I suspect it will be close to what is needed for the final solution however there maybe some extra defines in the RTEMS code to make it work. I am aiming for a 0 code change in the score however as stated I think this is not possible. The critical bit is the symbol name change for the function being traced, ie define a define. Another possible approach is to partially implement the host side based on a known list of function signatures. This would mean 0 changes to the score. This would be a nice solution. [1] I see this task being related to the RTL code base for the host tools. The host rtems-ld tool has a C++ framework for working with ELF files and it makes sense to add libdwarf support to this framework to support this work. http://en.wikipedia.org/wiki/DTrace This is describes the Linux approach: http://lwn.net/Articles/132196/ I have looked at both these are like them. Porting dtrace would be nice and Linux have nice frontends. I have played with dtrace but I have not being given the resources to fully look at this. The Illumos people would like to see us use it. No matter what we use in the end, I think its important that it can be disabled at compile-time (like profiling, debug, etc.). Fatal errors should result in _Terminate(). You can add a single trace point to this function. Logging the result can be done but then what. Everything has terminated and so there is no way we can extract the log with this event. Chris ___ devel mailing list devel@rtems.org http://lists.rtems.org/mailman/listinfo/devel