diff options
Diffstat (limited to 'lib/skin_parser/skin_buffer_debug.pl')
-rwxr-xr-x | lib/skin_parser/skin_buffer_debug.pl | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/lib/skin_parser/skin_buffer_debug.pl b/lib/skin_parser/skin_buffer_debug.pl new file mode 100755 index 0000000000..6d0d1ba0e7 --- /dev/null +++ b/lib/skin_parser/skin_buffer_debug.pl | |||
@@ -0,0 +1,31 @@ | |||
1 | #!/usr/bin/perl | ||
2 | # __________ __ ___. | ||
3 | # Open \______ \ ____ ____ | | _\_ |__ _______ ___ | ||
4 | # Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / | ||
5 | # Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < | ||
6 | # Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ | ||
7 | # \/ \/ \/ \/ \/ | ||
8 | # $Id$ | ||
9 | # | ||
10 | |||
11 | %allocs = (); | ||
12 | |||
13 | while (<>) { | ||
14 | if (/([0-9]*) (.*)$/) { | ||
15 | $key = $2; | ||
16 | $value = $1; | ||
17 | if (exists $allocs{$key}) { | ||
18 | $val = $allocs{$key}[0]; | ||
19 | $count = $allocs{$key}[1]; | ||
20 | $allocs{$key} = [$value + $val, $count+1] | ||
21 | } else { | ||
22 | $allocs{$key} = [$value, 1] | ||
23 | } | ||
24 | } | ||
25 | } | ||
26 | print "Count\tTotal cost\tLine\n"; | ||
27 | for my $key ( keys %allocs ) { | ||
28 | $val = $allocs{$key}[0]; | ||
29 | $count = $allocs{$key}[1]; | ||
30 | print "$count\t$val\t$key\n"; | ||
31 | } | ||