source: vis_dev/vis-2.1/share/help/_memory_profileCmd.txt @ 11

Last change on this file since 11 was 11, checked in by cecile, 13 years ago

Add vis

File size: 2.9 KB
Line 
1
2  _memory_profile - It shows the amount of memory used by every pacakge.
3     _________________________________________________________________
4
5   _memory_profile [-f <filename>] [-h] [-p] [-u <units>]
6
7   This  command  intregrates  the output from purify with a function map
8   generated by a perlscript plus another perlscript to generate a memory
9   profile of vis.
10
11   This  command  relies  on  the  output of purify to a file to call the
12   script  "memoryaccount"  and  produce a summary of how much memory has
13   been  allocated  by  each  package.  Although  this command may appear
14   simple  it requires the interaction of two scripts and three files, so
15   special care should be taken when attempting to modify it.
16
17   Here  is  the  way it works. The code in this command is conditionally
18   compiled  depending  on  the  definition  of the symbol PURIFY. If the
19   symbol is not defined, the program prints a message notifying that the
20   command  is  not  operative  in  this  executable.  If PURIFY has been
21   defined, there are certain things that are assumed. The executable has
22   been linked with purify. The output of purify is being redirected to a
23   file  with  name  purify.log.  The  perl  script  memoryaccount  is in
24   $VIS/common/share  and  it  is executable. There exists a file mapping
25   function names to packages in the same place whose name is .fmap.
26
27   The  command  then calls purify_all_inuse() to force purify to dump to
28   the file purify.log the information about the memory that is currently
29   visible  to the program. This memory is not the total memory allocated
30   by  the  program  since  there  may be leaked memory that is no longer
31   accessible.  A  temporary file is created and the script memoryaccount
32   is  called  to  analyze the file purify.log and write in the temporary
33   file the memory profile obtained from it. Once the script is done, the
34   temporary file is dumped to vis_stdout and deleted.
35
36   Since  most  of  the  computation  in  this  command  is  done  by the
37   pearlscript  memoryaccount,  for  more information please refer to the
38   message printed when the script is invoked with the option -h. Command
39   options:
40
41   -f <filename>
42          File  to  read  the  dump from. The default is purify.log. This
43          option  should  be used if and only if the option -log-file has
44          been used at the linking stage when building the executable.
45
46   -h
47          Print the command usage.
48
49   -p
50          Print  also  the  packages  that  did not allocated any visible
51          memory
52
53   -u <units>
54          Units  to  print  the memory usage in. It may be "b" for bytes,
55          "k" for kilobytes, "m" for megabytes and "g" for gigabytes. The
56          default is bytes.
57     _________________________________________________________________
58
59   Last updated on 20050519 10h16
Note: See TracBrowser for help on using the repository browser.