GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  LMDBG-SORT (1)

NAME

lmdbg-sort - sort stacktraces

CONTENTS

Synopsis
Description
Options
Example
See Also
Author

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>
Search for    or go to Top of page |  Section 1 |  Main Index


LMDBG-SORT (1) Sep 2, 2012

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.