Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
LMDBG-GREP(1)							 LMDBG-GREP(1)

NAME
       lmdbg-grep - output stacktraces that match the specified	condition

SYNOPSIS
       lmdbg-grep [OPTIONS] _awk_expr_ [files...]

DESCRIPTION
       lmdbg-grep takes	output of lmdbg-stat or	lmdbg-run as input and outputs
       stacktraces that	match the condition awk_expr.  The  following  special
       variables can be	used in	awk_exp	expression :

	      bytes  the number	of allocated bytes,

	      allocs the number	of calls of malloc/calloc/memalign/posix_mema-
		     lign,

	      max    the maximum number	of  bytes  allocated  per  malloc/cal-
		     loc/memalign/posix_memalign function,

	      peak   the peak number of	allocated bytes,

	      leaks  the number	of allocated but not freed bytes,

	      address
		     address returned by memory	allocation function,

	      source source code filename,

	      funcname
		     function name,

	      addrline
		     address in	the stacktrace.
       The  following  variables are numeric: bytes, allocs, max, peak,	leaks;
       others contain string values.

OPTIONS
       -h     Display the help message.

       -V     Display the lmdbg	version.

       -v     Invert the sense of matching, select non-matching	lines.

EXAMPLE
       $ cat log
       stacktrace peak:	120 max: 70 allocs: 3 leaks: 50
	0xbbbe2bc3     lmdbg.c:101     log_stacktrace
	0xbbbe3498     lmdbg.c:456     realloc
	0x8049700      testme.c:902    func1
	0x8048788      testme.c:9      main
	0x80485b4
	0x8048517
       stacktrace peak:	100 max: 100 allocs: 1
	0xbbbe2bc3     lmdbg.c:101     log_stacktrace
	0xbbbe33bd     lmdbg.c:431     malloc
	0x8049654      testme.c:450    func2
	0x8048757      testme.c:7      main
	0x80485b4
	0x8048517
       $ lmdbg-grep 'leaks > 0'	log
       stacktrace peak:	120 max: 70 allocs: 3 leaks: 50
	0xbbbe2bc3     lmdbg.c:101     log_stacktrace
	0xbbbe3498     lmdbg.c:456     realloc
	0x8049700      testme.c:902    func1
	0x8048788      testme.c:9      main
	0x80485b4
	0x8048517
       $ lmdbg-grep '!leaks' log
       stacktrace peak:	100 max: 100 allocs: 1
	0xbbbe2bc3     lmdbg.c:101     log_stacktrace
	0xbbbe33bd     lmdbg.c:431     malloc
	0x8049654      testme.c:450    func2
	0x8048757      testme.c:7      main
	0x80485b4
	0x8048517
       $ lmdbg-grep 'addrline ~	/func2/' log
       stacktrace peak:	100 max: 100 allocs: 1
	0xbbbe2bc3     lmdbg.c:101     log_stacktrace
	0xbbbe33bd     lmdbg.c:431     malloc
	0x8049654      testme.c:450    func2
	0x8048757      testme.c:7      main
	0x80485b4
	0x8048517
       $ lmdbg-grep 'allocs > 1000 || peak > 1000000' log
       $

SEE ALSO
       lmdbg(1),  lmdbg-run(1),	 lmdbg-sym(1),	lmdbg-stat(1),	lmdbg-sort(1),
       lmdbg-head(1),	lmdbg-leaks(1),	  lmdbg-sysleaks(1),   lmdbg-strip(1),
       lmdbg-modules(1)

AUTHOR
       Aleksey Cheusov <vle@gmx.net>

				  Sep 2, 2012			 LMDBG-GREP(1)

NAME | SYNOPSIS | DESCRIPTION | OPTIONS | EXAMPLE | SEE ALSO | AUTHOR

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=lmdbg-grep&sektion=1&manpath=FreeBSD+13.0-RELEASE+and+Ports>

home | help