OLD | NEW |
1 #!/usr/bin/perl | 1 #!/usr/bin/perl |
2 | 2 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. |
3 # | 5 # |
4 # Blame callstacks for each memory allocation. | 6 # Blame callstacks for each memory allocation. |
5 # Similar to memprof.pl, will also try to filter out unuseful stacks. | 7 # Similar to memprof.pl, will also try to filter out unuseful stacks. |
6 # TODO: better describe how these tools differ. | 8 # TODO: better describe how these tools differ. |
7 # | 9 # |
8 # Usage: | 10 # Usage: |
9 # | 11 # |
10 # memtrace.pl <logfile> | 12 # memtrace.pl <logfile> |
11 # | 13 # |
12 # logfile -- The memwatcher.logXXXX file to summarize. | 14 # logfile -- The memwatcher.logXXXX file to summarize. |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 return $num; | 137 return $num; |
136 } | 138 } |
137 | 139 |
138 # ----- Main ------------------------------------------------ | 140 # ----- Main ------------------------------------------------ |
139 | 141 |
140 # Get the command line argument | 142 # Get the command line argument |
141 my $filename = shift; | 143 my $filename = shift; |
142 | 144 |
143 # Process the file. | 145 # Process the file. |
144 process_raw($filename); | 146 process_raw($filename); |
OLD | NEW |