Print relative offsets in Eval.JitCompareHHIR
commit3f829f3edee5436c24c5cbe742d768877ddabbe3
authorbsimmers <bsimmers@fb.com>
Mon, 18 Mar 2013 23:12:23 +0000 (18 16:12 -0700)
committerSara Golemon <sgolemon@fb.com>
Tue, 19 Mar 2013 21:11:16 +0000 (19 14:11 -0700)
tree1145ab20c8a37bbe5d7878aa8da9216df60b140a
parent02e0774721ecac7806b52343a18aa7aede49c876
Print relative offsets in Eval.JitCompareHHIR

This diff adds a relativeOffsets option to Disasm, which will print
code addresses as relative offsets from the beginning of the tracelet instead
of absolute addresses. This format makes it much easier to compare the relative
sizes of the instructions selected by the two jits. I also changed the runtime
option to be a double instead of a bool, which is used as the cutoff ratio for
which tracelets to print. Setting it to 1 will print tracelets where the ir
made larger code than tx64, setting it to 2 will print tracelets where the ir's
code is at least twice as big as tx64's, etc...
hphp/runtime/base/runtime_option.h
hphp/runtime/vm/bytecode.cpp
hphp/runtime/vm/translator/hopt/ir.cpp
hphp/runtime/vm/translator/translator-x64.cpp
hphp/util/disasm.cpp
hphp/util/disasm.h