Commit d8e5b7f6 authored by Kevin Modzelewski's avatar Kevin Modzelewski

Add some more 'hot functions'

parent df5d6491
.text.intLtInt
.text.div_i64_i64 .text.div_i64_i64
.text.boxInt .text.boxInt
.text.boxBool
.text._ZN6pyston2gc10SmallArena6_allocEmi .text._ZN6pyston2gc10SmallArena6_allocEmi
.text._ZNSt17_Function_handlerIFvPN6pyston2gc10SmallArena16ThreadBlockCacheEEZNS2_12freeUnmarkedERSt6vectorIPNS0_3BoxESaIS8_EEE3$_0E9_M_invokeERKSt9_Any_dataS4_ .text._ZNSt17_Function_handlerIFvPN6pyston2gc10SmallArena16ThreadBlockCacheEEZNS2_12freeUnmarkedERSt6vectorIPNS0_3BoxESaIS8_EEE3$_0E9_M_invokeERKSt9_Any_dataS4_
.text.memset
.text.gc_alloc
.text.gc_realloc
.text._ZN6pyston9BoxedList6ensureEi
.text.PyNumber_AsSsize_t
.text._ZN6pyston15objectNewNoArgsEPNS_10BoxedClassE
.text._PyIndex_Check
.text._ZN6pyston9threading21allowGLReadPreemptionEv
.text._ZN6pyston9getOpNameEi
.text._ZN6pyston8callFuncEPNS_17BoxedFunctionBaseEPNS_15CallRewriteArgsENS_11ArgPassSpecEPNS_3BoxES6_S6_PS6_PKSt6vectorIPKSsSaISA_EE
.text._ZN6pyston2gc9GCVisitor5visitEPv
.text.intLtInt
.text.intModInt
.text.intAddInt
.text.intMulInt
...@@ -106,6 +106,7 @@ This will typically look like: ...@@ -106,6 +106,7 @@ This will typically look like:
Benchmark that was run. '--heap-map-target BENCHMARK' is Benchmark that was run. '--heap-map-target BENCHMARK' is
equivalent to '--heap-map-args ./pyston_release -i BENCHMARK'. equivalent to '--heap-map-args ./pyston_release -i BENCHMARK'.
""".strip()) """.strip())
parser.add_argument("--perf-data", default="perf.data")
args = parser.parse_args() args = parser.parse_args()
func = args.func_name func = args.func_name
...@@ -116,7 +117,7 @@ equivalent to '--heap-map-args ./pyston_release -i BENCHMARK'. ...@@ -116,7 +117,7 @@ equivalent to '--heap-map-args ./pyston_release -i BENCHMARK'.
objdump = get_objdump(func) objdump = get_objdump(func)
p = subprocess.Popen(["perf", "annotate", "-v", func], stdout=subprocess.PIPE, stderr=open("/dev/null", "w")) p = subprocess.Popen(["perf", "annotate", "-i", args.perf_data, "-v", func], stdout=subprocess.PIPE, stderr=open("/dev/null", "w"))
annotate = p.communicate()[0] annotate = p.communicate()[0]
assert p.wait() == 0 assert p.wait() == 0
......
...@@ -5,7 +5,7 @@ def tally(fn): ...@@ -5,7 +5,7 @@ def tally(fn):
for l in open(fn): for l in open(fn):
samples = int(l.split()[3]) samples = int(l.split()[3])
func = l.split()[-1] func = l.rsplit(']', 1)[1].strip()
counts[func] = counts.get(func, 0) + samples counts[func] = counts.get(func, 0) + samples
return counts return counts
...@@ -23,12 +23,11 @@ def main(): ...@@ -23,12 +23,11 @@ def main():
diff_thresh = (total1 + total2) / 2 / 100 diff_thresh = (total1 + total2) / 2 / 100
names.sort(key=lambda n: counts1.get(n, 0) + counts2.get(n, 0), reverse=True) names.sort(key=lambda n: abs(counts1.get(n, 0) - counts2.get(n, 0)), reverse=True)
for n in names: for n in names[:10]:
c1 = counts1.get(n, 0) c1 = counts1.get(n, 0)
c2 = counts2.get(n, 0) c2 = counts2.get(n, 0)
if abs(c1 - c2) >= diff_thresh: print n, counts1.get(n, 0), counts2.get(n, 0)
print n, counts1.get(n, 0), counts2.get(n, 0)
if __name__ == "__main__": if __name__ == "__main__":
main() main()
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment