DragonFly On-Line Manual Pages

Search: Section:  


LMDBG-SORT(1)                                                    LMDBG-SORT(1)

NAME

lmdbg-sort - sort stacktraces

SYNOPSIS

lmdbg-sort [OPTIONS] [files...]

DESCRIPTION

lmdbg-sort sorts stacktraces using the values of allocs, max, peak, leaks or num.

OPTIONS

-h Display the help message. -V Display the lmdbg version. -f field Specify the sorting field. Valid values are: allocs, max, peak, leaks or num. This option is mandatory.

EXAMPLE

$ cat -n testme.c 1 #include <stdlib.h> 2 3 int main () 4 { 5 int i; 6 void *p1, *p2; 7 p1 = malloc (100); 8 for (i=0; i < 3; ++i){ 9 p2 = realloc (NULL, 10+30*i); 10 } 11 free (p1); 12 free (p2); 13 14 return 0; 15 } $ lmdbg-run -T2 -B2 -f 'lmdbg-stat | lmdbg-sym' -o log ./testme $ cat log info progname ./testme info stat total_allocs: 4 info stat total_free_cnt: 2 info stat total_leaks: 50 stacktrace peak: 100 max: 100 allocs: 1 0x8048789 testme.c:7 main stacktrace peak: 120 max: 70 allocs: 3 leaks: 50 0x80487bb testme.c:9 main $ lmdbg-sort -f peak log info progname ./testme info stat total_allocs: 4 info stat total_free_cnt: 2 info stat total_leaks: 50 stacktrace peak: 120 max: 70 allocs: 3 leaks: 50 0x80487bb testme.c:9 main stacktrace peak: 100 max: 100 allocs: 1 0x8048789 testme.c:7 main $ lmdbg-sort -fmax log info progname ./testme info stat total_allocs: 4 info stat total_free_cnt: 2 info stat total_leaks: 50 stacktrace peak: 100 max: 100 allocs: 1 0x8048789 testme.c:7 main stacktrace peak: 120 max: 70 allocs: 3 leaks: 50 0x80487bb testme.c:9 main $

SEE ALSO

lmdbg(1), lmdbg-run(1), lmdbg-sym(1), lmdbg-stat(1), lmdbg-grep(1), lmdbg-head(1), lmdbg-leaks(1), lmdbg-sysleaks(1), lmdbg-strip(1), lmdbg-modules(1)

AUTHOR

Aleksey Cheusov <vle@gmx.net> September 2, 2012 LMDBG-SORT(1)

Search: Section: