Commit Graph

33 Commits

Author SHA1 Message Date
Jennifer Averett
04a13bdf74 capture: Move print methods out of cli for reuse.
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-24 14:04:53 -06:00
Jennifer Averett
8b11ff67a8 capture: Remove ctload command.
rtems_cpu_usage_top should be used for this information.
2014-10-28 07:58:28 -05:00
Jennifer Averett
05e4e59984 capture: Removal of capture task tracking.
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-10-27 14:01:13 -05:00
Jennifer Averett
2a86615b98 capture: Add support for variable length records. 2014-09-05 06:50:29 -05:00
Chris Johns
6a26e9bbf5 cpukit/capture: Print the uptime and diff in ctrace.
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-24 18:08:29 +11:00
Chris Johns
9f9c0bbf47 cpukit/capture: Use the new RTEMS API to get the uptime in nanoseconds.
Use the new API to get the uptime in nanoseconds and update the capture
engine.
2013-12-24 16:46:19 +11:00
Chris Johns
db8a89e212 cpukit/capture: Update the capture engine.
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.
2013-12-19 19:01:23 +11:00
Sebastian Huber
4b48ece07d score: Create watchdog implementation header
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.
2013-07-22 16:57:25 +02:00
Joel Sherrill
9b4422a251 Remove All CVS Id Strings Possible Using a Script
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.
2012-05-11 08:44:13 -05:00
Joel Sherrill
bab5c5fac0 2010-03-12 Joel Sherrill <joel.sherrill@oarcorp.com>
* ftpd/ftpd.c, httpd/asp.c, httpd/ejparse.c, httpd/emfdb.c,
	httpd/misc.c, httpd/um.c, httpd/webs.c, httpd/websuemf.c,
	libfs/src/dosfs/msdos_dir.c, libfs/src/dosfs/msdos_format.c,
	libfs/src/dosfs/msdos_misc.c, libfs/src/nfsclient/src/nfs.c,
	libmisc/capture/capture-cli.c, libmisc/monitor/mon-network.c,
	libmisc/shell/hexdump-odsyntax.c, libmisc/shell/main_ifconfig.c,
	libmisc/shell/shell.c, libmisc/shell/shell_makeargs.c,
	libmisc/uuid/parse.c, libnetworking/libc/gethostbydns.c,
	libnetworking/libc/gethostbyht.c, libnetworking/libc/gethostnamadr.c,
	libnetworking/libc/getnetnamadr.c, libnetworking/libc/inet_addr.c,
	libnetworking/libc/inet_network.c, libnetworking/libc/res_debug.c,
	libnetworking/libc/res_init.c, libnetworking/libc/res_query.c,
	libnetworking/rtems/rtems_mii_ioctl.c,
	score/src/objectgetnameasstring.c: Readdress use of ctype methods per
	recommendation from D.J. Delorie on the newlib mailing list. We
	should pass an unsigned char into these methods.
2010-03-12 16:26:16 +00:00
Joel Sherrill
391b4dda25 2010-03-11 Joel Sherrill <joel.sherrill@oarcorp.com>
* ftpd/ftpd.c, httpd/uemf.c, httpd/um.c, httpd/webs.c,
	httpd/websuemf.c, libblock/src/diskdevs.c,
	libmisc/capture/capture-cli.c, libmisc/monitor/mon-network.c,
	libmisc/shell/hexdump-odsyntax.c, libmisc/shell/main_ifconfig.c,
	libmisc/uuid/parse.c, libnetworking/lib/ftpfs.c,
	libnetworking/libc/gethostbyht.c, libnetworking/libc/getnetnamadr.c,
	libnetworking/libc/inet_network.c,
	libnetworking/rtems/rtems_mii_ioctl.c,
	score/src/objectgetnameasstring.c: Fix warnings for ctype methods.
2010-03-11 19:12:30 +00:00
Ralf Corsepius
0893220b2a Whitespace removal. 2009-11-29 12:12:39 +00:00
Ralf Corsepius
787519fb7c 2009-11-13 Ralf Corsépius <ralf.corsepius@rtems.org>
* libmisc/capture/capture-cli.c: Cast pointer to intptr_t to
	print it (Casting to int32_t is wrong).
2009-11-13 15:12:53 +00:00
Ralf Corsepius
031deada15 Add __attribute__((unused)) to unused function args. 2009-01-02 13:04:13 +00:00
Joel Sherrill
e41eaa881a 2008-12-18 Sebastian Huber <sebastian.huber@embedded-brains.de>
* 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-18 15:25:27 +00:00
Joel Sherrill
26fb4aadcd 2008-12-16 Joel Sherrill <joel.sherrill@oarcorp.com>
* 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-16 20:53:34 +00:00
Ralf Corsepius
11672356e7 Convert to using "bool". 2008-09-01 11:28:56 +00:00
Joel Sherrill
ce19f1fa3b 2008-01-23 Joel Sherrill <joel.sherrill@oarcorp.com>
* 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.
2008-01-23 22:57:43 +00:00
Chris Johns
1374fd3f07 2007-08-17 Chris Johns <chrisj@rtems.org>
* 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.
2007-08-17 00:54:16 +00:00
Ralf Corsepius
4a6fd1801c 2006-10-17 Ralf Corsépius <ralf.corsepius@rtems.org>
* libmisc/capture/capture-cli.c: Use size_t instead of int.
2006-10-17 17:21:18 +00:00
Joel Sherrill
8a1ae878d4 2006-08-29 Joel Sherrill <joel@OARcorp.com>
* libmisc/capture/capture-cli.c: Remove printf format warnings.
2006-08-29 21:55:30 +00:00
Chris Johns
a4ad7597d1 2005-05-18 Chris Johns <chrisj@rtems.org>
* libmisc/capture/capture-cli.c: Fix the output of ctload when
	there exists a large number of tasks.
2005-05-18 00:04:17 +00:00
Ralf Corsepius
714f06c7fa 2004-04-17 Ralf Corsepius <ralf_corsepius@rtems.org>
* libmisc/capture/capture-cli.c, libmisc/cpuuse/cpuuse.c,
	libmisc/dumpbuf/dumpbuf.c, libmisc/fsmount/fsmount.c,
	libmisc/monitor/mon-command.c, libmisc/monitor/mon-config.c,
	libmisc/monitor/mon-dname.c, libmisc/monitor/mon-driver.c,
	libmisc/monitor/mon-extension.c, libmisc/monitor/mon-itask.c,
	libmisc/monitor/mon-monitor.c, libmisc/monitor/mon-mpci.c,
	libmisc/monitor/mon-object.c, libmisc/monitor/mon-prmisc.c,
	libmisc/monitor/mon-queue.c, libmisc/monitor/mon-symbols.c,
	libmisc/monitor/mon-task.c, libmisc/rtmonuse/rtmonuse.c,
	libmisc/shell/cmds.c, libmisc/shell/shell.c, libmisc/shell/shell.h,
	libmisc/stackchk/check.c, libmisc/untar/untar.c: Use
	fprintf(stdout,...) instead of printf.
2004-04-17 08:12:02 +00:00
Ralf Corsepius
aed742c9a0 Remove stray white spaces. 2004-04-16 12:06:28 +00:00
Ralf Corsepius
3239698d1f Remove stray white spaces. 2004-04-15 13:26:21 +00:00
Ralf Corsepius
3e08d4ee62 2004-03-26 Ralf Corsepius <ralf_corsepius@rtems.org>
* libmisc/capture/capture-cli.c, libmisc/capture/capture.c,
	libmisc/capture/capture.h, libmisc/cpuuse/cpuuse.c,
	libmisc/devnull/devnull.c, libmisc/fsmount/fsmount.h,
	libmisc/monitor/mon-config.c, libmisc/monitor/mon-dname.c,
	libmisc/monitor/mon-driver.c, libmisc/monitor/mon-extension.c,
	libmisc/monitor/mon-itask.c, libmisc/monitor/mon-monitor.c,
	libmisc/monitor/mon-mpci.c, libmisc/monitor/mon-object.c,
	libmisc/monitor/mon-prmisc.c, libmisc/monitor/mon-queue.c,
	libmisc/monitor/mon-server.c, libmisc/monitor/mon-symbols.c,
	libmisc/monitor/monitor.h, libmisc/monitor/symbols.h,
	libmisc/mw-fb/mw_uid.c, libmisc/rtmonuse/rtmonuse.c,
	libmisc/serdbg/serdbg.h, libmisc/serdbg/serdbgio.c,
	libmisc/serdbg/termios_printk.c, libmisc/serdbg/termios_printk.h,
	libmisc/shell/shell.c, libmisc/shell/shell.h, libmisc/stackchk/check.c,
	libmisc/stackchk/internal.h: Convert to using c99 fixed size types.
2004-03-26 06:59:18 +00:00
Ralf Corsepius
b523336c9d 2003-10-21 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* capture/capture-cli.c: Reflect new rtems_monitor_command_arg_t.
2003-10-21 04:05:47 +00:00
Joel Sherrill
d4c40786f6 2003-09-26 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
PR 495/rtems_misc
	* capture/capture-cli.c, monitor/mon-command.c, monitor/mon-config.c,
	monitor/mon-monitor.c, monitor/mon-object.c, monitor/mon-symbols.c,
	monitor/monitor.h, shell/cmds.c: Move to making libmisc 16/32 bit
	clean.
2003-09-26 17:42:45 +00:00
Ralf Corsepius
550c3df787 2003-07-08 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* capture/capture-cli.c: Add config-header support.
	* capture/capture.c: Add config-header support.
	* cpuuse/cpuuse.c: Add config-header support.
	* devnull/devnull.c: Add config-header support.
	* dummy/dummy.c: Add config-header support.
	* dumpbuf/dumpbuf.c: Add config-header support.
	* monitor/mon-command.c: Add config-header support.
	* monitor/mon-config.c: Add config-header support.
	* monitor/mon-dname.c: Add config-header support.
	* monitor/mon-driver.c: Add config-header support.
	* monitor/mon-extension.c: Add config-header support.
	* monitor/mon-itask.c: Add config-header support.
	* monitor/mon-manager.c: Add config-header support.
	* monitor/mon-monitor.c: Add config-header support.
	* monitor/mon-mpci.c: Add config-header support.
	* monitor/mon-object.c: Add config-header support.
	* monitor/mon-prmisc.c: Add config-header support.
	* monitor/mon-queue.c: Add config-header support.
	* monitor/mon-server.c: Add config-header support.
	* monitor/mon-symbols.c: Add config-header support.
	* monitor/mon-task.c: Add config-header support.
	* mw-fb/mw_fb.c: Add config-header support.
	* mw-fb/mw_uid.c: Add config-header support.
	* rtmonuse/rtmonuse.c: Add config-header support.
	* serdbg/serdbg.c: Add config-header support.
	* serdbg/serdbgio.c: Add config-header support.
	* serdbg/termios_printk.c: Add config-header support.
	* shell/cmds.c: Add config-header support.
	* stackchk/check.c: Add config-header support.
	* untar/untar.c: Add config-header support.
2003-07-08 08:39:16 +00:00
Ralf Corsepius
769f47ae8a Merger from rtems-4-6-branch. 2003-02-28 07:29:21 +00:00
Ralf Corsepius
aebc8290f2 2002-07-20 Ralf Corsepius <corsepiu@faw.uni-ulm.de>
* capture/capture.c: include <string.h> for memset.
2002-07-20 09:18:37 +00:00
Joel Sherrill
63977bb4d3 2002-07-01 Joel Sherrill <joel@OARcorp.com>
* capture/capture-cli.c, cpuuse/cpuuse.c, monitor/mon-monitor.c,
	monitor/mon-object.c, monitor/monitor.h: Corrected use of
	_Objects_Information_table now that it is a two dimensional
	array based upon API and class.  In addition, in the monitor,
	corrected an error which occured when a target has 64 bit pointers.
2002-07-01 22:19:33 +00:00
Joel Sherrill
a923a82d2d 2002-05-16 Chris Johns <ccj@acm.org>
* Per PR194, added the Capture engine.
	* capture/Makefile.am, capture/README, capture/capture-cli.c,
	capture/capture-cli.h, capture/capture.c, capture/capture.h,
	capture/.cvsignore: New files.
	* Makefile.am, configure.ac, wrapup/Makefile.am: Modified to
	reflect addition.
2002-05-15 16:36:10 +00:00