diff options
Diffstat (limited to 'chromium/third_party/sqlite/sqlite-src-3240000/tool/opcodesum.tcl')
-rw-r--r-- | chromium/third_party/sqlite/sqlite-src-3240000/tool/opcodesum.tcl | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/chromium/third_party/sqlite/sqlite-src-3240000/tool/opcodesum.tcl b/chromium/third_party/sqlite/sqlite-src-3240000/tool/opcodesum.tcl deleted file mode 100644 index 47dff32b907..00000000000 --- a/chromium/third_party/sqlite/sqlite-src-3240000/tool/opcodesum.tcl +++ /dev/null @@ -1,34 +0,0 @@ -#!/usr/bin/tclsh -# -# Run this script, redirecting input from cachegrind output, to compute the -# number of CPU cycles used by each VDBE opcode. -# -# The cachegrind output should be configured so that it reports a single -# column of Ir at the left margin. Ex: -# -# cg_annotation --show=Ir --auto=yes cachegrind.out.* | tclsh opcodesum.tcl -# -set currentop x -set ncycle(x) 0 -while {![eof stdin]} { - set line [string map {\173 x \175 x \042 x} [gets stdin]] - if {[regexp { \. case OP_.*:} $line]} { - regexp {OP_(.+):} $line all currentop - set ncycle($currentop) 0 - } elseif {[lindex $line 1]=="default:" - && [regexp {really OP_Noop and OP_Explain} $line]} { - break - } elseif {[lindex $line 0]!="."} { - regsub -all {[^0-9]} [lindex $line 0] {} n - if {$n!=""} {incr ncycle($currentop) $n} - } -} -unset ncycle(x) -set results {} -foreach op [lsort [array names ncycle]] { - if {$ncycle($op)==0} continue - lappend results [list $ncycle($op) $op] -} -foreach entry [lsort -index 0 -int -decr $results] { - puts [format {%-16s %10d} [lindex $entry 1] [lindex $entry 0]] -} |