summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc/capture/capture.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* cpukit/libmisc/capture: Manually change license to BSD-2Joel Sherrill2022-03-221-19/+36
| | | | | | | These files did not follow the standard format and needed to be changed manually. Updates #3053.
* rtems: Add rtems_scheduler_get_processor_maximum()Sebastian Huber2019-04-091-3/+3
| | | | | | | | | | | 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.
* rtems: Add rtems_scheduler_get_processor()Sebastian Huber2019-04-091-2/+2
| | | | | | | | | | | Add rtems_scheduler_get_processor() as a replacement for rtems_get_current_processor(). The rtems_get_current_processor() is a bit orphaned. Adopt it by the Scheduler Manager. This is in line with the glibc sched_getcpu() function. Deprecate rtems_get_current_processor(). Update #3731.
* capture: prevent unaligned access when reading timeDaniel Hellstrom2018-08-241-1/+3
| | | | | | | | | | | | LLVM warns about this: cpukit/libmisc/capture/capture.c:405:30: warning: taking address of packed member 'time' of class or structure 'rtems_capture_record' may result in an unaligned pointer value [-Waddress-of-packed-member] rtems_capture_get_time (&in.time); And on sparc it generates an unaligned trap which makes smpcapture01 and smpcapture02 test to fail on sparc.
* capture: Include <rtems/captureimpl.h>Sebastian Huber2017-12-131-1/+1
| | | | | | Prepare for header file move to common include directory. Update #3254.
* rtems: Add rtems_task_iterate()Sebastian Huber2016-11-021-6/+9
| | | | Update #2423.
* capture: Use proper accessor functionsSebastian Huber2016-09-061-4/+4
|
* libmisc/capture: Remove the reserved _t in the types.Chris Johns2016-09-011-79/+69
|
* libmisc/capture: Fix the capture engine on SMP.Chris Johns2016-09-011-218/+257
| | | | | | | | | | | | | | | | | | | | | | | This patches some issues with the capture engine: 1. Check is the engine is open in ctrace commands. 2. Check all record open and appends for overflow. 3. Fix the record open to take the size of user data and not the record header. 4. Use packed structs for data being written to the per cpu buffers. 5. Remove direct struct access to the capture buffers to avoid misaligned accesses. 6. Add support to extract records, no struct access to the capture buffers. 7. Update ctrace to extract records from the capture buffers. 8. Add support to ctrace to always print the task name if it has one. 9. Add support to manage names or the lack of a name. 10. Range of minor fixes. 11. Fix a long standing bug in ctset's handling of args. Closes #2780.
* rtems: Rework RTEMS API to SuperCore prioritySebastian Huber2016-06-221-5/+3
| | | | | Use same structure as POSIX API for thread priority conversion to/from SuperCore.
* capture: Fix use of per-processor dataSebastian Huber2016-05-121-17/+16
| | | | | | Get the current processor index only once and with interrupts disabled. Close #2707.
* capture: Remove superfluous includesSebastian Huber2016-05-121-3/+0
|
* basdefs.h: Add and use RTEMS_UNUSEDSebastian Huber2015-10-261-1/+1
|
* capture: Fix warningsSebastian Huber2015-03-051-5/+5
|
* capture: Fix lock initializationSebastian Huber2015-01-091-6/+11
|
* capture: Add SMP support.Jennifer Averett2014-11-241-193/+218
| | | | | | To support smp data was broken into global and percpu capture data. Capture control must be disabled prior to printing or setting of watch points.
* capture: Move logging of task record to occur after filter check.Jennifer Averett2014-11-241-11/+28
| | | | | | | The catpture task record is now logged just prior to the first log entry using that task instead of the first time the task is seen. This involved splitting the record task method into an initialize task and a record task.
* capture: Removal of capture task tracking.Jennifer Averett2014-10-271-268/+93
| | | | | | | | | | This patch removes functionality for stack checking from the capture engine and requiresi the use of existing rtems functions for this information. It modifies ctload to use functionality similar to rtems cpuusage. It removes the capture task and stores a new capture task record the first time the task is seen. The per task data that was still needed is scaled down and stored in the tcb.
* capture: Add support for variable length records.Jennifer Averett2014-09-051-68/+106
|
* capture: Split user extension methods out.Jennifer Averett2014-09-051-387/+41
|
* capture: Fix capture engine to handle new extensions.Jennifer Averett2014-07-111-28/+66
|
* capture: Update comment block style in capture engine.Jennifer Averett2014-07-111-207/+22
| | | | Doxygen added and comment blocks standardized.
* score: Simplify _Thread_Change_priority()Sebastian Huber2014-05-151-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | The function to change a thread priority was too complex. Simplify it with a new scheduler operation. This increases the average case performance due to the simplified logic. The interrupt disabled critical section is a bit prolonged since now the extract, update and enqueue steps are executed atomically. This should however not impact the worst-case interrupt latency since at least for the Deterministic Priority Scheduler this sequence can be carried out with a wee bit of instructions and no loops. Add _Scheduler_Change_priority() to replace the sequence of - _Thread_Set_transient(), - _Scheduler_Extract(), - _Scheduler_Enqueue(), and - _Scheduler_Enqueue_first(). Delete STATES_TRANSIENT, _States_Is_transient() and _Thread_Set_transient() since this state is now superfluous. With this change it is possible to get rid of the SCHEDULER_SMP_NODE_IN_THE_AIR state. This considerably simplifies the implementation of the new SMP locking protocols.
* capture: Use ISR lock for SMP supportSebastian Huber2014-04-141-71/+72
|
* cpukit/capture: Use the new RTEMS API to get the uptime in nanoseconds.Chris Johns2013-12-241-2/+3
| | | | | Use the new API to get the uptime in nanoseconds and update the capture engine.
* rtems: classic api to/from core priority conversionsDaniel Ramirez2013-12-211-1/+4
|
* cpukit/capture: Update the capture engine.Chris Johns2013-12-191-49/+35
| | | | | | | | | | | | The capture did not work due to changes in the workspace allocator. The engine now scans all existing tasks when enabled and does any allocations then. Fixed a bug in the ctset commandi in the CLI. Updated the capture engine to use 64bit nanosec timestamps. Fixed the CLI showing the stack usage.
* score: Create states implementation headerSebastian Huber2013-07-261-1/+1
| | | | | | Move implementation specific parts of states.h and states.inl into new header file statesimpl.h. The states.h contains now only the application visible API.
* score: Merge wkspace API into one fileSebastian Huber2013-07-231-10/+9
|
* score: Create watchdog implementation headerSebastian Huber2013-07-221-1/+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.
* sapi: Use rtems_config*_get_microseconds_per_tickSebastian Huber2012-11-071-1/+1
|
* Fix C files which had two semi-colons at EOLJoel Sherrill2012-05-311-1/+1
|
* 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-12-05 Ralf Corsépius <ralf.corsepius@rtems.org>Ralf Corsepius2011-12-051-10/+10
| | | | | | | | | | | * libmisc/capture/capture.c: Make RTEMS_CAPTURE_* defines unsigned (Avoid implicit sign-conversions). Make rtems_capture_trigger static (Missing prototypes). Make rtems_capture_trigger static (Missing prototypes). * libmisc/capture/capture.h: Make RTEMS_CAPTURE_WATCH, RTEMS_CAPTURE_TRACED unsigned (Avoid implicit sign conversions).
* 2011-02-15 Joel Sherrill <joel.sherrilL@OARcorp.com>Joel Sherrill2011-02-161-2/+1
| | | | | | | | | | | | * libmisc/capture/capture.c, posix/src/keyfreememory.c, posix/src/pthread.c, score/include/rtems/score/wkspace.h, score/src/objectextendinformation.c, score/src/objectnamespaceremove.c, score/src/objectsetname.c, score/src/threadclose.c, score/src/threadinitialize.c, score/src/wkspace.c: Many places were checking for a NULL pointer before calling _Workspace_Free. By moving the check into _Workspace_Free, we eliminate a number of conditional paths and make it harder to return a NULL pointer.
* 2011-01-21 Eric Norum <wenorum@lbl.gov>Joel Sherrill2011-01-211-1/+3
| | | | * libmisc/capture/capture.c: Avoid using TCB of task just deleted.
* Whitespace removal.Ralf Corsepius2009-11-291-22/+22
|
* 2009-09-26 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2009-09-261-7/+7
| | | | | | * libmisc/capture/capture.c, posix/src/pthread.c, rtems/src/tasks.c, score/include/rtems/score/userext.h: Eliminate use of deprecated rtems_extension. Re-add prototype for _User_extensions_Add_API_set.
* 2009-09-11 Joel Sherrill <joel.sherrill@OARcorp.com>Joel Sherrill2009-09-111-8/+1
| | | | * libmisc/capture/capture.c: Use public API to obtain object name.
* Add __attribute__((unused)) to unused function args.Ralf Corsepius2009-01-021-1/+1
|
* 2008-12-16 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2008-12-161-1/+1
| | | | | | | | | | | | | * libblock/src/bdbuf.c, libmisc/capture/capture-cli.c, libmisc/capture/capture.c, libmisc/mw-fb/mw_uid.c, rtems/include/rtems/rtems/support.h, score/Makefile.am, score/include/rtems/score/tod.h, score/src/coretod.c, score/src/coretodtickle.c: Eliminate all public use of TOD conversion routines. Eliminate _TOD_Microseconds_per_tick and let every place use the field directly from the Configuration Table. This required moving some methods from macros to bodies. * score/src/coretodmsecstoticks.c, score/src/coretodtickspersec.c, score/src/coretodusectoticks.c: New files.
* 2008-12-15 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2008-12-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | * itron/include/rtems/itron/itronapi.h, libmisc/capture/capture.c, libmisc/monitor/mon-config.c, libmisc/monitor/mon-driver.c, libmisc/monitor/mon-itask.c, libmisc/monitor/mon-mpci.c, posix/include/rtems/posix/config.h, posix/include/rtems/posix/posixapi.h, rtems/include/rtems/rtems/config.h, rtems/include/rtems/rtems/rtemsapi.h, rtems/src/taskinitusers.c, sapi/include/confdefs.h, sapi/include/rtems/config.h, sapi/include/rtems/init.h, sapi/src/exinit.c, sapi/src/itronapi.c, sapi/src/posixapi.c, sapi/src/rtemsapi.c, score/src/isr.c, score/src/thread.c, score/src/threadcreateidle.c, score/src/threadstackallocate.c, score/src/threadstackfree.c, score/src/wkspace.c: Eliminate pointers to API configuration tables in the main configuration table. Reference the main configuration table and the API configuration tables directly using the confdefs.h version rather than obtaining a pointer to it. This eliminated some variables, a potential fatal error, some unnecessary default configuration structures. Overall, about a 4.5% reduction in the code size for minimum and hello on the SPARC.
* Convert to using "bool".Ralf Corsepius2008-09-011-23/+23
|
* Stop using old-style function-definitions.Ralf Corsepius2008-08-251-7/+7
|
* 2008-01-29 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2008-01-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * itron/src/exd_tsk.c, itron/src/task.c, libmisc/capture/capture.c, libmisc/monitor/mon-config.c, libmisc/monitor/mon-driver.c, libmisc/monitor/mon-itask.c, libmisc/monitor/mon-monitor.c, libmisc/monitor/mon-mpci.c, libmisc/monitor/mon-object.c, libmisc/monitor/mon-symbols.c, posix/src/cancelrun.c, posix/src/pthreadexit.c, rtems/Makefile.am, rtems/preinstall.am, rtems/include/rtems.h, rtems/include/rtems/rtems/support.h, rtems/inline/rtems/rtems/tasks.inl, rtems/src/eventmp.c, rtems/src/msgmp.c, rtems/src/partmp.c, rtems/src/regionmp.c, rtems/src/rtemsobjectgetname.c, rtems/src/semmp.c, rtems/src/signalmp.c, rtems/src/taskdelete.c, rtems/src/taskmp.c, rtems/src/timerserver.c, score/Makefile.am, score/include/rtems/score/object.h, score/inline/rtems/score/object.inl, score/src/Unlimited.txt, score/src/objectgetnameasstring.c, score/src/threadqextractwithproxy.c: Add new Object Services collection. This changed the name of a few previously public but undocumented services and added a some new services. * rtems/include/rtems/rtems/object.h, rtems/src/rtemsbuildid.c, rtems/src/rtemsbuildname.c, rtems/src/rtemsobjectapimaximumclass.c, rtems/src/rtemsobjectapiminimumclass.c, rtems/src/rtemsobjectgetapiclassname.c, rtems/src/rtemsobjectgetapiname.c, rtems/src/rtemsobjectgetclassicname.c, rtems/src/rtemsobjectgetclassinfo.c, rtems/src/rtemsobjectidapimaximum.c, rtems/src/rtemsobjectidapiminimum.c, rtems/src/rtemsobjectidgetapi.c, rtems/src/rtemsobjectidgetclass.c, rtems/src/rtemsobjectidgetindex.c, rtems/src/rtemsobjectidgetnode.c, rtems/src/rtemsobjectsetname.c, score/src/objectapimaximumclass.c, score/src/objectgetinfo.c, score/src/objectgetinfoid.c, score/src/objectsetname.c: New files. * rtems/src/rtemsidtoname.c: Removed.
* 2008-01-23 Joel Sherrill <joel.sherrill@oarcorp.com>Joel Sherrill2008-01-231-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * itron/include/rtems/itron/object.h, itron/src/cre_tsk.c, libblock/src/show_bdbuf.c, libmisc/capture/capture-cli.c, libmisc/capture/capture.c, libmisc/monitor/mon-manager.c, libmisc/stackchk/check.c, posix/src/condinit.c, posix/src/keycreate.c, posix/src/mqueuecreatesupp.c, posix/src/mqueuedeletesupp.c, posix/src/mqueuenametoid.c, posix/src/mqueueopen.c, posix/src/mqueueunlink.c, posix/src/mutexinit.c, posix/src/pbarrierinit.c, posix/src/prwlockinit.c, posix/src/pspininit.c, posix/src/pthreadcreate.c, posix/src/pthreadexit.c, posix/src/semaphorecreatesupp.c, posix/src/semaphorenametoid.c, posix/src/timercreate.c, rtems/src/barrierident.c, rtems/src/dpmemident.c, rtems/src/msgqident.c, rtems/src/partident.c, rtems/src/ratemonident.c, rtems/src/regionident.c, rtems/src/semident.c, rtems/src/taskident.c, rtems/src/timerident.c, sapi/src/extensionident.c, score/Makefile.am, score/include/rtems/score/object.h, score/inline/rtems/score/object.inl, score/src/apimutexallocate.c, score/src/objectextendinformation.c, score/src/objectgetnameasstring.c, score/src/objectmp.c, score/src/objectnametoid.c: Convert the Objects_Name type from a simple type to a union of an unsigned 32 bit integer and a pointer. This should help eliminate weird casts between u32 and pointers in various places. The APIs now have to explicitly call _u32 or _string versions of helper routines. This should also simplify things and eliminate the need for ugly casts in some cases. * score/src/objectclearname.c, score/src/objectcomparenameraw.c, score/src/objectcomparenamestring.c, score/src/objectcopynameraw.c, score/src/objectcopynamestring.c: Removed.
* 2007-08-17 Chris Johns <chrisj@rtems.org>Chris Johns2007-08-171-184/+540
| | | | | | | | * libmisc/capture/README: Minor copyright change. * libmisc/capture/capture-cli.c, libmisc/capture/capture.c, libmisc/capture/capture.h: Fixed the memory leak when lots of tasks are being created and deleted. Improved the trigger interface so all task type actions can be caught.
* Add ability to free information on task delete.Eric Norum2006-04-271-6/+23
|
* Fix typo.Ralf Corsepius2005-01-051-1/+1
|
* Remove stray white spaces.Ralf Corsepius2004-04-161-33/+33
|