[pypy-commit] pypy vmprof: add rpython-vmprof, a small wrapper that runs rpython with vmprof on

fijal noreply at buildbot.pypy.org
Sat Mar 21 12:37:19 CET 2015


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: vmprof
Changeset: r76495:027c22aa974a
Date: 2015-03-21 13:37 +0200
http://bitbucket.org/pypy/pypy/changeset/027c22aa974a/

Log:	add rpython-vmprof, a small wrapper that runs rpython with vmprof on

diff --git a/rpython/bin/rpython-vmprof b/rpython/bin/rpython-vmprof
new file mode 100755
--- /dev/null
+++ b/rpython/bin/rpython-vmprof
@@ -0,0 +1,26 @@
+#!/usr/bin/env pypy
+
+"""RPython translation usage:
+
+rpython <translation options> target <targetoptions>
+
+run with --help for more information
+"""
+
+import sys, os
+sys.path.insert(0, os.path.dirname(os.path.dirname(
+                       os.path.dirname(os.path.realpath(__file__)))))
+from rpython.translator.goal.translate import main
+
+# no implicit targets
+if len(sys.argv) == 1:
+    print __doc__
+    sys.exit(1)
+
+import _vmprof
+x = open("vmprof.log", "w")
+_vmprof.enable(x.fileno(), 1000)
+try:
+	main()
+finally:
+	_vmprof.disable()
diff --git a/rpython/jit/backend/test/runner_test.py b/rpython/jit/backend/test/runner_test.py
--- a/rpython/jit/backend/test/runner_test.py
+++ b/rpython/jit/backend/test/runner_test.py
@@ -1792,7 +1792,7 @@
         c_box = self.alloc_string("hi there").constbox()
         c_nest = ConstInt(0)
         c_id = ConstInt(0)
-        self.execute_operation(rop.DEBUG_MERGE_POINT, [c_box, c_nest, c_id], 'void')
+        self.execute_operation(rop.DEBUG_MERGE_POINT, [c_box, c_nest, c_id, c_nest], 'void')
         self.execute_operation(rop.JIT_DEBUG, [c_box, c_nest, c_nest,
                                                c_nest, c_nest], 'void')
 


More information about the pypy-commit mailing list