OLD | NEW |
1 #!/usr/bin/tclsh | 1 #!/usr/bin/tclsh |
2 # | 2 # |
3 # Parse the output of | 3 # Parse the output of |
4 # | 4 # |
5 # objdump -d sqlite3.o | 5 # objdump -d sqlite3.o |
6 # | 6 # |
7 # for x64 and generate a report showing: | 7 # for x64 and generate a report showing: |
8 # | 8 # |
9 # (1) Stack used by each function | 9 # (1) Stack used by each function |
10 # (2) Recursion paths and their aggregate stack depth | 10 # (2) Recursion paths and their aggregate stack depth |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 } | 89 } |
90 } | 90 } |
91 foreach path [lsort -integer -decr -index 0 $pathlist] { | 91 foreach path [lsort -integer -decr -index 0 $pathlist] { |
92 foreach {depth m} $path break | 92 foreach {depth m} $path break |
93 set first [lindex $m 0] | 93 set first [lindex $m 0] |
94 puts [format {%6d %s %d} $depth $first $stkdepth($first)] | 94 puts [format {%6d %s %d} $depth $first $stkdepth($first)] |
95 foreach b [lrange $m 1 end] { | 95 foreach b [lrange $m 1 end] { |
96 puts " $b $stkdepth($b)" | 96 puts " $b $stkdepth($b)" |
97 } | 97 } |
98 } | 98 } |
OLD | NEW |