summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc/cpuuse/cpuusagereport.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* cpuuse: Use rtems_task_iterate()Sebastian Huber2016-11-021-58/+59
| | | | Update #2423.
* Move printer initialization to separate headerSebastian Huber2016-06-221-0/+1
| | | | | | 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>.
* cpuuse: Hide implementation detailsSebastian Huber2016-05-311-0/+2
|
* cpukit, testsuite: Add rtems_printf and rtems_printer support.Chris Johns2016-05-251-15/+13
| | | | | | | | | | | | | | | | | | | 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: Fix CPU time used by executing threadsSebastian Huber2016-03-171-33/+18
| | | | | | | | | | | | | | 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.
* Remove use ticks for statistics configure option.Joel Sherrill2015-06-151-75/+15
| | | | | | | | | | 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.
* 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: 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-211-1/+1
|
* score: Rename tod.h to todimpl.hSebastian Huber2013-08-011-1/+1
|
* 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-261-0/+1
| | | | | 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-221-0/+1
| | | | | | 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.
* 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 Enhancement Task #1Mathew Kallada2012-12-211-2/+7
|
* Remove All CVS Id Strings Possible Using a ScriptJoel Sherrill2012-05-111-2/+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-151-18/+9
| | | | | | | * cpukit/libmisc/cpuuse/cpuuse.h, cpukit/libmisc/cpuuse/cpuusagedata.c, cpukit/libmisc/cpuuse/cpuusagereport.c, cpukit/libmisc/cpuuse/cpuusagereset.c: Fixed timestamp usage.
* 2011-06-28 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2011-06-281-1/+1
| | | | | | | | PR 1826/cpukit * libmisc/cpuuse/cpuusagereport.c, rtems/Makefile.am, rtems/preinstall.am, rtems/include/rtems.h: Add SMP Helper methods to Classic API. * rtems/include/rtems/rtems/smp.h: New file.
* 2011-06-16 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2011-06-161-5/+31
| | | | | | PR 1818/misc * libmisc/cpuuse/cpuusagereport.c: Add SMP support to CPU Usage Reporting.
* 2011-03-15 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2011-03-151-1/+1
| | | | * libmisc/cpuuse/cpuusagereport.c: Make compile again.
* 2011-03-15 Sebastian Huber <sebastian.huber@embedded-brains.de>Sebastian Huber2011-03-151-0/+1
| | | | | * libmisc/cpuuse/cpuusagereport.c: Avoid assumptions on execution context.
* 2011-03-07 Sebastian Huber <sebastian.huber@embedded-brains.de>Sebastian Huber2011-03-071-6/+9
| | | | | | * libmisc/cpuuse/cpuusagereport.c: Fix calculation in case a thread dispatch happends in the meantime. The percent values will not sum up to one hundred percent.
* 2010-12-16 Sebastian Huber <sebastian.huber@embedded-brains.de>Sebastian Huber2010-12-161-4/+3
| | | | | * libmisc/cpuuse/cpuusagereport.c: We have to take the time since the last context switch before the uptime.
* 2010-11-23 Sebastian Huber <sebastian.huber@embedded-brains.de>Sebastian Huber2010-11-231-10/+8
| | | | | * score/src/iterateoverthreads.c, libmisc/cpuuse/cpuusagereport.c: Avoid dead code if POSIX API is enabled.
* 2010-11-23 Sebastian Huber <sebastian.huber@embedded-brains.de>Sebastian Huber2010-11-231-10/+6
| | | | | * score/src/iterateoverthreads.c, libmisc/cpuuse/cpuusagereport.c: Fixed NULL pointer access in case POSIX API is disabled.
* 2010-07-26 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2010-07-261-8/+18
| | | | | | | | | | * libcsupport/src/privateenv.c, libmisc/cpuuse/cpuusagereport.c, posix/Makefile.am, posix/include/rtems/posix/key.h, posix/src/keycreate.c, posix/src/keydelete.c, score/src/iterateoverthreads.c: Since removing ITRON, the loop over all APIs for tasks has a path that cannot be reached. Either modify the code or mark tests for NULL as RTEMS_DEBUG. * posix/src/keyfreememory.c: New file.
* 2010-07-04 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2010-07-041-1/+0
| | | | | | | | | | | | | | | | * libblock/include/rtems/ide_part_table.h, libblock/src/bdbuf.c, libcsupport/src/__times.c, libcsupport/src/libio_init.c, libcsupport/src/mallocfreespace.c, libcsupport/src/mount-mgr.c, libcsupport/src/mount.c, libcsupport/src/rewinddir.c, libcsupport/src/seekdir.c, libcsupport/src/telldir.c, libcsupport/src/unmount.c, libfs/src/dosfs/fat.c, libfs/src/dosfs/fat_fat_operations.c, libfs/src/dosfs/msdos_create.c, libfs/src/dosfs/msdos_dir.c, libfs/src/dosfs/msdos_eval.c, libfs/src/dosfs/msdos_file.c, libfs/src/dosfs/msdos_format.c, libfs/src/dosfs/msdos_fsunmount.c, libfs/src/dosfs/msdos_initsupp.c, libfs/src/dosfs/msdos_rename.c, libmisc/cpuuse/cpuusagereport.c, libmisc/shell/vis.c, libmisc/stackchk/check.c, sapi/src/posixapi.c, telnetd/telnetd.c: Remove include of assert.h when it is not needed.
* 2009-12-02 Glenn Humphrey <glenn.humphrey@OARcorp.com>Glenn Humphrey2009-12-021-1/+1
| | | | | | | | | * libcsupport/src/__times.c, libmisc/cpuuse/cpuusagedata.c, libmisc/cpuuse/cpuusagereport.c, libmisc/cpuuse/cpuusagereset.c, rtems/include/rtems/rtems/types.h, rtems/src/ratemongetstatistics.c, rtems/src/ratemonreportstatistics.c, score/src/threaddispatch.c, score/src/threadinitialize.c, score/src/threadtickletimeslice.c: Updated copyright line.
* 2009-12-02 Glenn Humphrey <glenn.humphrey@OARcorp.com>Glenn Humphrey2009-12-021-8/+8
| | | | | | | | | | | | | * configure.ac, libcsupport/src/__times.c, libmisc/cpuuse/cpuusagedata.c, libmisc/cpuuse/cpuusagereport.c, libmisc/cpuuse/cpuusagereset.c, rtems/include/rtems/rtems/ratemon.h, rtems/include/rtems/rtems/types.h, rtems/src/ratemongetstatistics.c, rtems/src/ratemongetstatus.c, rtems/src/ratemonperiod.c, rtems/src/ratemonreportstatistics.c, score/include/rtems/score/thread.h, score/src/threaddispatch.c, score/src/threadinitialize.c, score/src/threadtickletimeslice.c: Changed the configuration of statistics granularity to use just one define.
* Whitespace removal.Ralf Corsepius2009-11-291-2/+2
|
* 2009-11-11 Jennifer Averett <jennifer.averett@OARcorp.com>Joel Sherrill2009-11-111-2/+10
| | | | | | PR 1471/cpukit * libmisc/cpuuse/cpuusagereport.c: Rework statement to ensure 64-bit multiplication is used to avoid overflow with intermediate value.
* 2008-12-18 Sebastian Huber <sebastian.huber@embedded-brains.de>Joel Sherrill2008-12-181-17/+29
| | | | | | | | | | | | | | | | | | | | | | * libmisc/serdbg/termios_printk.c, libmisc/serdbg/termios_printk.h: Fixed incompatible return value. * libmisc/cpuuse/cpuusagereport.c: Changed output format. * libmisc/Makefile.am, libmisc/monitor/mon-editor.c: New file. * libmisc/capture/capture-cli.c, libmisc/monitor/mon-command.c, libmisc/monitor/mon-monitor.c, libmisc/monitor/mon-object.c, libmisc/monitor/mon-prmisc.c, libmisc/monitor/mon-symbols.c, libmisc/monitor/monitor.h, libmisc/shell/cat_file.c, libmisc/shell/cmds.c, libmisc/shell/internal.h, libmisc/shell/main_help.c, libmisc/shell/shell.c, libmisc/shell/shell.h, libmisc/shell/shell_cmdset.c, libmisc/shell/shell_getchar.c, libmisc/shell/str2int.c: Various global data is now read only. Added 'const' qualifier to many pointer parameters. It is no longer possible to remove monitor commands. Moved monitor line editor into a separate file to avoid unnecessary dependencies.
* 2008-12-08 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2008-12-081-11/+13
| | | | | | | | | | | | | | | | | | | | | | | | * libcsupport/src/__times.c, libmisc/cpuuse/cpuusagereport.c, libmisc/cpuuse/cpuusagereset.c, posix/src/clockgettime.c, posix/src/pthread.c, posix/src/timersettime.c, rtems/include/rtems/rtems/ratemon.h, rtems/src/clockgetsecondssinceepoch.c, rtems/src/clockgetuptime.c, rtems/src/ratemongetstatus.c, rtems/src/ratemonperiod.c, rtems/src/ratemonreportstatistics.c, rtems/src/taskwakewhen.c, rtems/src/timerfirewhen.c, rtems/src/timerserver.c, rtems/src/timerserverfirewhen.c, score/Makefile.am, score/preinstall.am, score/include/rtems/score/thread.h, score/include/rtems/score/tod.h, score/src/coretod.c, score/src/coretodget.c, score/src/coretodgetuptime.c, score/src/coretodset.c, score/src/coretodtickle.c, score/src/threaddispatch.c, score/src/threadinitialize.c: Add SuperCore handler Timestamp to provide an opaque class for the representation and manipulation of uptime, time of day, and the difference between two timestamps. By using SuperCore Timestamp, it is clear which methods and APIs really have to be struct timespec and which can be in an optimized native format. * score/include/rtems/score/timestamp.h, score/src/coretodgetuptimetimespec.c: New files.
* 2008-06-06 Joel Sherrill <joel.sherrill@OARcorp.com>Joel Sherrill2008-06-061-3/+3
| | | | | | | | | | | | | * libcsupport/src/__times.c, libmisc/cpuuse/cpuusagereport.c, libmisc/cpuuse/cpuusagereset.c, libmisc/monitor/mon-task.c, rtems/include/rtems/rtems/ratemon.h, rtems/src/ratemongetstatus.c, rtems/src/ratemonperiod.c, score/include/rtems/score/thread.h, score/src/threaddispatch.c, score/src/threadinitialize.c, score/src/threadtickletimeslice.c: Add typedefs for cpu usage and period timing statistics. Also renamed related variables and structure members so they are the same whether you are using nanosecond (e.g. struct timespec) or ticks (e.g. uint32_t) granularity. This lays the groundwork for future cleanup.
* 2008-02-06 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2008-02-061-4/+9
| | | | | | * libcsupport/src/printk.c: Added width and padding for %s. * libmisc/cpuuse/cpuusagereport.c: Support object names that are strings longer than 4 chanracters.
* 2007-10-26 Glenn Humphrey <glenn.humphrey@OARcorp.com>Glenn Humphrey2007-10-261-11/+8
| | | | | | | * libmisc/cpuuse/cpuusagereport.c, rtems/src/ratemonreportstatistics.c: Cleaned up reports and fixed a bug related the printf format which resulted in lack of leading zeroes and misleading magnitude. * score/src/timespecdivide.c: Fixed bugs related to zero divide case.
* 2007-09-06 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2007-09-061-10/+25
| | | | | | | | | | | | | | | | * libcsupport/Makefile.am, libcsupport/src/printk.c: * libcsupport/src/printk_plugin.c: New file. include/rtems/bspIo.h, libmisc/cpuuse/cpuusagereport.c, libmisc/cpuuse/cpuuse.h, libmisc/stackchk/check.c, libmisc/stackchk/stackchk.h: rtems/include/rtems/rtems/ratemon.h, rtems/src/ratemonreportstatistics.c: Added capability to specify your own "printf" routine to various reporting functions. This added an XXX_with_plugin as the underlying implementation for + rtems_rate_monotonic_report_statistics + rtems_stack_checker_report_usage + rtems_cpu_usage_report As demonstration, the http netdemo can now print out stack and cpu usage reports.
* 2007-07-24 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2007-07-241-17/+25
| | | | | | | * libmisc/cpuuse/cpuusagereport.c, libmisc/cpuuse/cpuusagereset.c, score/src/timespecdivide.c: Fix various math and reporting bugs. Now the time appears to be reported correctly and add up to what is expected.
* 2007-07-18 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2007-07-181-7/+10
| | | | | | | | * libmisc/Makefile.am, libmisc/cpuuse/cpuusagereport.c, libmisc/cpuuse/cpuusagereset.c: Fix bug where cpu usage calculation was always using uptime not time since last cpu usage reset when using nanoseconds granularity. * libmisc/cpuuse/cpuusagedata.c: New file.
* 2007-05-21 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2007-05-211-0/+149
* libmisc/Makefile.am, libmisc/cpuuse/README: Split remaining CPU Usage functionality into multiple files to eliminate unnecessary cohesion. Update README. * libmisc/cpuuse/cpuusagereport.c, libmisc/cpuuse/cpuusagereset.c: New files. * libmisc/cpuuse/cpuuse.c: Removed.