summaryrefslogtreecommitdiffstats
path: root/cpukit/libmisc/capture (unfollow)
Commit message (Collapse)AuthorFilesLines
2022-03-22cpukit/libmisc/capture: Manually change license to BSD-2Joel Sherrill7-112/+212
These files did not follow the standard format and needed to be changed manually. Updates #3053.
2022-03-22cpukit/capture: Change license to BSD-2Joel Sherrill2-6/+44
Updates #3053.
2020-10-10capture: Fix unaligned pointer value warningFrank Kühndel1-4/+4
rtems_name is a four byte integer. Giving an rtems_name as value instead of a pointer to ctrace_task_name_add() fixes not only the compiler warning but it is also a bit more safe For those who have asked for the warning: ../../../cpukit/libmisc/capture/capture_support.c:352:49: warning: taking address of packed member of 'struct rtems_capture_task_record' may result in an unaligned pointer value [-Waddress-of-packed-member] 352 | ctrace_task_name_add (rec_out->task_id, &task_rec.name); | ^~~~~~~~~~~~~~
2020-09-20capture: Move default trace dataSebastian Huber2-28/+37
Provide the default trace data in a separate file to avoid issues on targets with a small-data area. Close #3883.
2019-04-09rtems: Add rtems_scheduler_get_processor_maximum()Sebastian Huber2-4/+4
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.
2019-04-09rtems: Add rtems_scheduler_get_processor()Sebastian Huber1-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.
2019-02-28Remove explicit file names from @fileSebastian Huber1-1/+1
This makes the @file documentation independent of the actual file name. Update #3707.
2018-08-24capture: prevent unaligned access when reading timeDaniel Hellstrom1-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.
2018-01-25Remove make preinstallChris Johns4-1508/+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.
2017-12-13capture: Include <rtems/captureimpl.h>Sebastian Huber2-5/+3
Prepare for header file move to common include directory. Update #3254.
2017-06-21capture/rtems-trace-buffer-vars.c: Fix duplicate const warningJoel Sherrill1-1/+1
2016-11-02score: Introduce Thread_Scheduler_control::homeSebastian Huber1-1/+1
Replace Thread_Scheduler_control::control and Thread_Scheduler_control::own_control with new Thread_Scheduler_control::home. Update #2556.
2016-11-02rtems: Add rtems_task_iterate()Sebastian Huber2-20/+22
Update #2423.
2016-09-21score: Rework thread priority managementSebastian Huber1-1/+1
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.
2016-09-08score: Introduce _Thread_Get_priority()Sebastian Huber1-1/+1
Avoid direct access to thread internal data fields.
2016-09-06capture: Use proper accessor functionsSebastian Huber1-4/+4
2016-09-06capture: Workaround to avoid misaligned accessSebastian Huber1-1/+1
Move the 64-bit field to a not 64-bit aligned structure offset to stop the compiler from generating 64-bit load/store operations.
2016-09-01libmisc/capture: Remove the reserved _t in the types.Chris Johns8-271/+252
2016-09-01libmisc/capture: Fix the capture engine on SMP.Chris Johns9-666/+880
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.
2016-06-22rtems: Rework RTEMS API to SuperCore prioritySebastian Huber2-6/+6
Use same structure as POSIX API for thread priority conversion to/from SuperCore.
2016-05-12capture: Fix use of per-processor dataSebastian Huber2-27/+31
Get the current processor index only once and with interrupts disabled. Close #2707.
2016-05-12capture: Remove superfluous includesSebastian Huber1-3/+0
2016-05-12capture: Compact rtems_capture_record_tSebastian Huber1-1/+1
Order fields according to alignment to reduce structure internal padding.
2016-05-12capture: Fix buffer allocation and freeSebastian Huber2-11/+11
Do not use function static variables. Remove superfluous volatile qualifiers. Use proper integer types. Close #2706.
2015-10-26basdefs.h: Add and use RTEMS_UNUSEDSebastian Huber2-2/+2
2015-04-02capture: Define __rtld_tbg_lockSebastian Huber1-0/+2
2015-03-31libmisc/shell: Add the rtrace command for buffered tracing support.Chris Johns2-0/+326
The rtrace command interfaces to the RTEMS Trace Linker's trace buffering data allowing users to capture and report trace data.
2015-03-24capture/capture_support.c: Fix printf() warning and formattingJoel Sherrill1-10/+14
2015-03-19libmisc/capture: Clean up formatting on ARM.Chris Johns2-22/+29
The printing of 64bit diff's for the timestamp did not work on ARM so I have changed this to 32bit. A 32bit nano-second diff between events should be more than enough time. Print '____' for POSIX thread output.
2015-03-16capture: fix warnings in printGedare Bloom1-4/+6
2015-03-11cpukit: Remove old DESCRIPTION: in commentsJoel Sherrill3-69/+1
These were remnants of pre-Doxygen comment style.
2015-03-06Fix a number of minor Doxygen formatting issuesJoel Sherrill2-1/+3
2015-03-05capture: Fix warningsSebastian Huber1-5/+5
2015-01-09capture: Fix lock initializationSebastian Huber1-6/+11
2014-11-25capture: Resolve failure path memory leak.Jennifer Averett1-0/+1
2014-11-24capture: Remove whitespace and fix copyrights.Jennifer Averett6-61/+55
2014-11-24capture: Add SMP support.Jennifer Averett3-218/+234
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.
2014-11-24capture: Move print methods out of cli for reuse.Jennifer Averett3-210/+370
Methods to print the data were moved from capture-cli into a support area and are no longer static so that they can be shared by test routines, or application code that wants to use the capture engine without the shell interface.
2014-11-24capture: Move logging of task record to occur after filter check.Jennifer Averett3-36/+78
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.
2014-10-28capture: Remove ctload command.Jennifer Averett1-272/+0
rtems_cpu_usage_top should be used for this information.
2014-10-27capture: Removal of capture task tracking.Jennifer Averett5-892/+415
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.
2014-09-05capture: Add support for variable length records.Jennifer Averett7-70/+467
2014-09-05capture: Split user extension methods out.Jennifer Averett3-387/+671
2014-07-11capture: Fix capture engine to handle new extensions.Jennifer Averett2-35/+76
2014-07-11capture: Update comment block style in capture engine.Jennifer Averett2-416/+378
Doxygen added and comment blocks standardized.
2014-05-15score: Simplify _Thread_Change_priority()Sebastian Huber1-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.
2014-04-14capture: Use ISR lock for SMP supportSebastian Huber1-71/+72
2013-12-24cpukit/capture: Print the uptime and diff in ctrace.Chris Johns1-17/+17
Print the uptime and difference in nanoseconds to the previous record in the ctrace output. For example: 0:00:59.474927121 14760 0a01000c TNTD 235 235 CREATED_BY 0:00:59.474927418 297 0a010012 /dev 235 235 CREATED 0:00:59.474930799 3381 0a01000c TNTD 235 235 STARTED_BY 0:00:59.474931105 306 0a010012 /dev 235 235 STARTED 0:00:59.475072297 141192 0a01000c TNTD 235 235 SWITCHED_OUT
2013-12-24cpukit/capture: Use the new RTEMS API to get the uptime in nanoseconds.Chris Johns3-16/+57
Use the new API to get the uptime in nanoseconds and update the capture engine.
2013-12-21rtems: classic api to/from core priority conversionsDaniel Ramirez1-1/+4