summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc/cpuuse (follow)
Commit message (Collapse)AuthorAgeFilesLines
* doxygen: Switch @brief and @ingroupSebastian Huber2020-04-284-4/+8
| | | | This order change fixes the Latex documentation build via Doxygen.
* Canonicalize config.h includeSebastian Huber2020-04-161-2/+2
| | | | | | | | Use the following variant which was already used by most source files: #ifdef HAVE_CONFIG_H #include "config.h" #endif
* libmisc/top: Fix the idle time and priorities on SMPChris Johns2019-12-191-11/+27
| | | | | | | - This patch is based on the patch attached to #3552 submitted by jameszxj. Closes #3552
* score: Add and use _Thread_Get_unmapped_priority().Sebastian Huber2019-06-281-2/+2
| | | | Add and use _Thread_Get_unmapped_real_priority().
* rtems: Add rtems_scheduler_get_processor_maximum()Sebastian Huber2019-04-091-1/+1
| | | | | | | | | | | Add rtems_scheduler_get_processor_maximum() as a replacement for rtems_get_processor_count(). The rtems_get_processor_count() is a bit orphaned. Adopt it by the Scheduler Manager. The count is also misleading, since the processor set may have gaps and the actual count of online processors may be less than the value returned by rtems_get_processor_count(). Update #3732.
* libmisc: Fix swapped parameters and enable floating point usage.Maksim E. Kozlov2019-01-231-1/+1
|
* rtems: Deprecate region_information_blockSebastian Huber2018-11-091-1/+1
| | | | | | | The region_information_block typedef as no corresponding API. It has no proper namespace prefix. A user can do nothing with it. Close #3591.
* Use rtems_task_exit()Sebastian Huber2018-10-021-1/+1
| | | | | Update #3530. Update #3533.
* Remove make preinstallChris Johns2018-01-251-88/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A speciality of the RTEMS build system was the make preinstall step. It copied header files from arbitrary locations into the build tree. The header files were included via the -Bsome/build/tree/path GCC command line option. This has at least seven problems: * The make preinstall step itself needs time and disk space. * Errors in header files show up in the build tree copy. This makes it hard for editors to open the right file to fix the error. * There is no clear relationship between source and build tree header files. This makes an audit of the build process difficult. * The visibility of all header files in the build tree makes it difficult to enforce API barriers. For example it is discouraged to use BSP-specifics in the cpukit. * An introduction of a new build system is difficult. * Include paths specified by the -B option are system headers. This may suppress warnings. * The parallel build had sporadic failures on some hosts. This patch removes the make preinstall step. All installed header files are moved to dedicated include directories in the source tree. Let @RTEMS_CPU@ be the target architecture, e.g. arm, powerpc, sparc, etc. Let @RTEMS_BSP_FAMILIY@ be a BSP family base directory, e.g. erc32, imx, qoriq, etc. The new cpukit include directories are: * cpukit/include * cpukit/score/cpu/@RTEMS_CPU@/include * cpukit/libnetworking The new BSP include directories are: * bsps/include * bsps/@RTEMS_CPU@/include * bsps/@RTEMS_CPU@/@RTEMS_BSP_FAMILIY@/include There are build tree include directories for generated files. The include directory order favours the most general header file, e.g. it is not possible to override general header files via the include path order. The "bootstrap -p" option was removed. The new "bootstrap -H" option should be used to regenerate the "headers.am" files. Update #3254.
* heap: Fix integer typesSebastian Huber2017-08-221-4/+4
| | | | Update #3082.
* score: Add and use _Thread_Get_name()Sebastian Huber2017-01-131-2/+2
| | | | Update #2858.
* cpuuse: Call printer only onceSebastian Huber2017-01-121-14/+7
|
* score: Introduce Thread_Scheduler_control::homeSebastian Huber2016-11-021-1/+1
| | | | | | | | Replace Thread_Scheduler_control::control and Thread_Scheduler_control::own_control with new Thread_Scheduler_control::home. Update #2556.
* cpuuse: Use rtems_task_iterate()Sebastian Huber2016-11-021-58/+59
| | | | Update #2423.
* rtems: Add rtems_task_iterate()Sebastian Huber2016-11-022-44/+13
| | | | Update #2423.
* score: Rework thread priority managementSebastian Huber2016-09-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | Add priority nodes which contribute to the overall thread priority. The actual priority of a thread is now an aggregation of priority nodes. The thread priority aggregation for the home scheduler instance of a thread consists of at least one priority node, which is normally the real priority of the thread. The locking protocols (e.g. priority ceiling and priority inheritance), rate-monotonic period objects and the POSIX sporadic server add, change and remove priority nodes. A thread changes its priority now immediately, e.g. priority changes are not deferred until the thread releases its last resource. Replace the _Thread_Change_priority() function with * _Thread_Priority_perform_actions(), * _Thread_Priority_add(), * _Thread_Priority_remove(), * _Thread_Priority_change(), and * _Thread_Priority_update(). Update #2412. Update #2556.
* score: Introduce _Thread_Get_priority()Sebastian Huber2016-09-081-2/+6
| | | | Avoid direct access to thread internal data fields.
* Move printer initialization to separate headerSebastian Huber2016-06-222-0/+2
| | | | | | The RTEMS print user need to know nothing about a particular printer implementation. In particular get rid of the <stdio.h> include which would be visible via <rtems.h>.
* shell: Add CPUINFO commandSebastian Huber2016-05-312-0/+93
| | | | Update #2723.
* cpuuse: Hide implementation detailsSebastian Huber2016-05-316-5/+33
|
* cpukit, testsuite: Add rtems_printf and rtems_printer support.Chris Johns2016-05-253-114/+75
| | | | | | | | | | | | | | | | | | | This change adds rtems_printf and related functions and wraps the RTEMS print plugin support into a user API. All references to the plugin are removed and replaced with the rtems_printer interface. Printk and related functions are made to return a valid number of characters formatted and output. The function attribute to check printf functions has been added to rtems_printf and printk. No changes to remove warrnings are part of this patch set. The testsuite has been moved over to the rtems_printer. The testsuite has a mix of rtems_printer access and direct print control via the tmacros.h header file. The support for begink/endk has been removed as it served no purpose and only confused the code base. The testsuite has not been refactored to use rtems_printf. This is future work.
* score: Use thread state lock for current stateSebastian Huber2016-05-121-3/+10
| | | | | | | In addition protect scheduler of thread by thread state lock. Enables use of scheduler per-instance locks. Update #2555.
* cpuuse/cpuusagetop.c: Fix unused variable warningJoel Sherrill2016-03-241-1/+0
|
* score: Fix CPU time used by executing threadsSebastian Huber2016-03-173-54/+27
| | | | | | | | | | | | | | The CPU time used of a thread was previously maintained per-processor mostly during _Thread_Dispatch(). However, on SMP configurations the actual processor of a thread is difficult to figure out since thread dispatching is a highly asynchronous process (e.g. via inter-processor interrupts). Only the intended processor of a thread is known to the scheduler easily. Do the CPU usage accounting during thread heir updates in the context of the scheduler operations. Provide the function _Thread_Get_CPU_time_used() to get the CPU usage of a thread using proper locks to get a consistent value. Close #2627.
* score: Delete Thread_CPU_usage_tSebastian Huber2016-03-011-7/+7
| | | | | This type is superfluous since all operations with it are done via the _Timestamp_*() functions.
* score: Introduce Thread_Entry_informationSebastian Huber2016-01-111-1/+1
| | | | | | | This avoids potential dead code in _Thread_Handler(). It gets rid of the dangerous function pointer casts. Update #2514.
* score: Simplify <rtems/system.h>Sebastian Huber2015-06-261-1/+1
| | | | | Drop the <rtems/score/percpu.h> include since this file exposes a lot of implementation details.
* Remove use ticks for statistics configure option.Joel Sherrill2015-06-155-134/+33
| | | | | | | | | | This was obsolete and broken based upon recent time keeping changes. Thie build option was previously enabled by adding USE_TICKS_FOR_STATISTICS=1 to the configure command line. This propagated into the code as preprocessor conditionals using the __RTEMS_USE_TICKS_FOR_STATISTICS__ conditional.
* libmisc/cpuuse: Top support for current load.Chris Johns2015-04-291-195/+541
| | | | | | | | | | | | | | | | | | The cpuuse top command now supports the current load where the list of tasks is ordered based on the current load rather than the total cpu usage. This lets you see what is using the processor at any specific instance. The ability to sort on a range of thread values is now supported. Added memory usage stats for unified and separate workspace and C heaps as well as displaying the allocated stack space. Added a few more command keys to refresh the display, show all tasks in the system, control the lines display and a scrolling mode that does not clear the display on each refresh. Removed support for tick kernel builds. The tick support in the kernel is to be removed.
* cpuuse: Resolve compile errors.Jennifer Averett2014-11-031-28/+68
|
* libmisc: Add top to cpuusage.Jennifer Averett2014-10-272-0/+356
|
* cpuuse: Move is_executing_on_a_core to threadimpl.hJennifer Averett2014-10-271-24/+1
|
* score: Implement forced thread migrationSebastian Huber2014-05-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current implementation of task migration in RTEMS has some implications with respect to the interrupt latency. It is crucial to preserve the system invariant that a task can execute on at most one processor in the system at a time. This is accomplished with a boolean indicator in the task context. The processor architecture specific low-level task context switch code will mark that a task context is no longer executing and waits that the heir context stopped execution before it restores the heir context and resumes execution of the heir task. So there is one point in time in which a processor is without a task. This is essential to avoid cyclic dependencies in case multiple tasks migrate at once. Otherwise some supervising entity is necessary to prevent life-locks. Such a global supervisor would lead to scalability problems so this approach is not used. Currently the thread dispatch is performed with interrupts disabled. So in case the heir task is currently executing on another processor then this prolongs the time of disabled interrupts since one processor has to wait for another processor to make progress. It is difficult to avoid this issue with the interrupt latency since interrupts normally store the context of the interrupted task on its stack. In case a task is marked as not executing we must not use its task stack to store such an interrupt context. We cannot use the heir stack before it stopped execution on another processor. So if we enable interrupts during this transition we have to provide an alternative task independent stack for this time frame. This issue needs further investigation.
* score: Use common names for per-CPU variablesSebastian Huber2014-04-221-6/+6
| | | | | | | | | | | | | | | | Use "cpu" for an arbitrary Per_CPU_Control variable. Use "cpu_self" for the Per_CPU_Control of the current processor. Use "cpu_index" for an arbitrary processor index. Use "cpu_index_self" for the processor index of the current processor. Use "cpu_count" for the processor count obtained via _SMP_Get_processor_count(). Use "cpu_max" for the processor maximum obtained by rtems_configuration_get_maximum_processors().
* rtems: Rename rtems_smp_get_processor_count()Sebastian Huber2014-04-111-1/+1
| | | | | | Rename rtems_smp_get_processor_count() in rtems_get_processor_count(). Make rtems_get_processor_count() a function in uni-processor configurations to enable ABI compatibility with SMP configurations.
* score: Add and use thread get/set CPU functionsSebastian Huber2014-03-311-1/+3
|
* Change all references of rtems.com to rtems.org.Chris Johns2014-03-214-4/+4
|
* score: Rename tod.h to todimpl.hSebastian Huber2013-08-012-2/+2
|
* smp: Add and use _Per_CPU_Get()Sebastian Huber2013-07-301-1/+1
| | | | | | Add and use _Per_CPU_Get_by_index() and _Per_CPU_Get_index(). Add _Per_CPU_Send_interrupt(). This avoids direct access of _Per_CPU_Information.
* smp: Use Thread_Control.is_executingSebastian Huber2013-07-301-7/+4
| | | | FIXME: This area needs proper locking.
* score: Merge tod implementation into one fileSebastian Huber2013-07-262-4/+3
| | | | | Delete TOD_MICROSECONDS_PER_SECOND, TOD_MICROSECONDS_TO_TICKS() and TOD_MILLISECONDS_TO_TICKS().
* score: Create object implementation headerSebastian Huber2013-07-261-0/+1
| | | | | | Move implementation specific parts of object.h and object.inl into new header file objectimpl.h. The object.h contains now only the application visible API.
* score: Create watchdog implementation headerSebastian Huber2013-07-222-0/+2
| | | | | | Move implementation specific parts of watchdog.h and watchdog.inl into new header file watchdogimpl.h. The watchdog.h contains now only the application visible API.
* cpuuse: Add SMP supportSebastian Huber2013-07-221-1/+10
|
* score: Rename rtems_smp_get_number_of_processors()Sebastian Huber2013-06-141-1/+1
| | | | | | | | | Rename in rtems_smp_get_processor_count(). Always provide <rtems/score/smp.h> and <rtems/rtems/smp.h>. Add _SMP_Get_processor_count(). This function will be a compile time constant defined to be one on uni-processor configurations. This allows iterations over all processors without overhead on uni-processor configurations.
* libmisc: Doxygen Clean Up Task #1Ayush Awasthi2013-01-041-7/+9
| | | | | Conflicts occured durning this patch and modifications in the repo were favored over the patch.
* Header File Doxygen Enhancement Task #7Mathew Kallada2012-12-281-0/+3
|
* libmisc: Doxygen Enhancement Task #1Mathew Kallada2012-12-214-11/+38
|
* Remove All CVS Id Strings Possible Using a ScriptJoel Sherrill2012-05-115-12/+0
| | | | | | | | | | | | Script does what is expected and tries to do it as smartly as possible. + remove occurrences of two blank comment lines next to each other after Id string line removed. + remove entire comment blocks which only exited to contain CVS Ids + If the processing left a blank line at the top of a file, it was removed.
* 2011-09-15 Sebastian Huber <sebastian.huber@embedded-brains.de>Sebastian Huber2011-09-154-35/+21
| | | | | | | * cpukit/libmisc/cpuuse/cpuuse.h, cpukit/libmisc/cpuuse/cpuusagedata.c, cpukit/libmisc/cpuuse/cpuusagereport.c, cpukit/libmisc/cpuuse/cpuusagereset.c: Fixed timestamp usage.