Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 6 Dec 2003 23:06:58 +0200
From:      AleshaVS <AleshaVS@rambler.ru>
To:        freebsd-questions@FreeBSD.ORG
Subject:   mprof 3.0
Message-ID:  <1702571390.20031206230658@rambler.ru>

next in thread | raw e-mail | index | archive | help
        Hello. Please help. I have problem with mprof 3.0.
        I install last version mprof 3.0. And do this:
#uname -a
FreeBSD  5.1-RELEASE FreeBSD 5.1-RELEASE #0: Thu Jun  5 02:55:42 GMT 2003
root@wv1u.btc.adaptec.com:/usr/obj/usr/src/sys/GENERIC  i386
#ls /usr/ports/devel/mprof/files
patch-02          patch-Makefile.i386                   patch-mpgraph.c
patch-mprof.h     patch-mprof_mon.c

#pwd
/usr/ports/devel/mprof/work

#cc -g test2.c libc_mp.a
#./a.out
Segmantation fault (core dump)
#mprof -normal a.out
--c 0+--v3.0+--m0+--+--+--+--+--+--+--+--+ MPROF +--+--+--+--+--+--+--s0+--f2097204+--d2621446+--l1376280+


--------- Allocation Bins with possible Types ------------

      size:    allocs     bytes (%)      frees      kept (%)     types   

        711 1345956321208213840 (.)          01208213840 (.)    
        712 1347420161447034880 (2)          01447034880 (2)    
        715 1345901971742710343 (2)          01742710343 (2)    
        716     16384  11730944 (-1)         0  11730944 (-1)   
        717         4      2868 (.)          0      2868 (.)    
        719 134596857-2009107625 (-1)         0-2009107625 (-1)   
        720         4      2880 (.)          0      2880 (.)    
        721    249861 180149781 (-1)         0 180149781 (-1)   

       ...   .......    ......  ..           ..  ......  ..

       1002       109    109218 (.)          0    109218 (.)
       1003 1345135271773081405 (-1)         01773081405 (-1)   
       1007 134593641-1903156985 (2)          0-1903156985 (2)    
       1008 134626840-1735098752 (2)          0-1735098752 (2)    
       1009 134746112-1480126464 (3)          0-1480126464 (3)    
       1010       109    110090 (.)          0    110090 (.)    
       1012         1      1012 (.)          0      1012 (.)    
       1013         2      2026 (.)          0      2026 (.)    
       1015       109    110635 (.)          0    110635 (.)    
       1016 134746112-536903680 (-3)         0-536903680 (-3)   
       1017 134626840-523457192 (1)          0-523457192 (1)    
       1019 134591440-290276112 (-1)         0-290276112 (-1)   
       1020 134626840-119576672 (-1)         0-119576672 (-1)   
       1021 134746112 136826880 (-1)         0 136826880 (-1)   
       1022       109    111398 (.)          0    111398 (.)    
     > 1024         0         0              0         0        

    <TOTAL>1010396561-656409063              1-656409063
    
swap_pager: out of swap space
swap_pager_getswapspace: failed
Dec  6 21:57:30  kernel: pid 905 (mprof), uid 0, was killed: out of swap space
Dec  6 21:57:31  last message repeated 2 times


                 OR I DO
#pwd
/home/work/mprof
#ls
1.c libc_mp.a
#more 1.c

#include <stdio.h>
int main()
{
 int *m;
 m=(int *)malloc(sizeof(int));
 return 0;
} 

#cc -g 1.c libc_mp.a
#./a.out
Segmantation fault (core dump)
#mprof -normal a.out

--c 0+--v3.0+--m0+--+--+--+--+--+--+--+--+ MPROF +--+--+--+--+--+--+--s0+--f2097204+--d2621446+--l1900576+


--------- Allocation Bins with possible Types ------------

      size:    allocs     bytes (%)      frees      kept (%)     types   

        711 1345956321208213840 (67)         01208213840 (67)   
        712 1347420161447034880 (-159)         01447034880 (-159)   
        715 1345901971742710343 (-218)         01742710343 (-218)   
        716     16384  11730944 (140)         0  11730944 (140)   
        717         4      2868 (.)          0      2868 (.)

        ...   ......      ....   ..         ..     ....  ..
        
       1010       109    110090 (1)          0    110090 (1)    
       1012         1      1012 (.)          0      1012 (.)    
       1013         2      2026 (.)          0      2026 (.)    
       1015       109    110635 (1)          0    110635 (1)    
       1016 134746112-536903680 (257)         0-536903680 (257)   
       1017 134626840-523457192 (-96)         0-523457192 (-96)   
       1019 134591440-290276112 (124)         0-290276112 (124)   
       1020 134626840-119576672 (111)         0-119576672 (111)   
       1021 134746112 136826880 (95)         0 136826880 (95)   
       1022       109    111398 (1)          0    111398 (1)    
     > 1024         0         0              0         0        

 other bins 876531533 751639620 (-257)         0 751639620 (-257)   
    <TOTAL>  80100070   8334961              1   8334961        


#gdb a.out a.out.core
GNU gdb 5.2.1 (FreeBSD)
Copyright 2002 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i386-undermydesk-freebsd"...
Core was generated by `a.out'.
Program terminated with signal 11, Segmentation fault.
Reading symbols from /usr/lib/libc.so.5...done.
Loaded symbols for /usr/lib/libc.so.5
Reading symbols from /usr/libexec/ld-elf.so.1...done.
Loaded symbols for /usr/libexec/ld-elf.so.1
#0  0x08048d00 in mp_note_leaf (l=0x0, nbytes=0) at mprof_mon.c:201
201         mp_note_alloc(fn_lcount(l), nbytes);

            What do I do incorrectly?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1702571390.20031206230658>