[pypy-commit] pypy default: add minimal support for vmprof on s390x (not in the jit), passes 2 tests
plan_rich
pypy.commits at gmail.com
Thu Nov 3 07:45:49 EDT 2016
Author: Richard Plangger <planrichi at gmail.com>
Branch:
Changeset: r88115:929b9079f0e9
Date: 2016-11-03 12:44 +0100
http://bitbucket.org/pypy/pypy/changeset/929b9079f0e9/
Log: add minimal support for vmprof on s390x (not in the jit), passes 2
tests
diff --git a/pypy/module/_vmprof/test/test__vmprof.py b/pypy/module/_vmprof/test/test__vmprof.py
--- a/pypy/module/_vmprof/test/test__vmprof.py
+++ b/pypy/module/_vmprof/test/test__vmprof.py
@@ -1,4 +1,3 @@
-
from rpython.tool.udir import udir
from pypy.tool.pytest.objspace import gettestobjspace
diff --git a/pypy/module/faulthandler/test/test_faulthander.py b/pypy/module/faulthandler/test/test_faulthander.py
--- a/pypy/module/faulthandler/test/test_faulthander.py
+++ b/pypy/module/faulthandler/test/test_faulthander.py
@@ -1,4 +1,3 @@
-
class AppTestFaultHandler:
spaceconfig = {
"usemodules": ["faulthandler", "_vmprof"]
diff --git a/rpython/rlib/rvmprof/cintf.py b/rpython/rlib/rvmprof/cintf.py
--- a/rpython/rlib/rvmprof/cintf.py
+++ b/rpython/rlib/rvmprof/cintf.py
@@ -30,9 +30,6 @@
def setup():
- if host_platform.machine() == 's390x':
- raise VMProfPlatformUnsupported("rvmprof not supported on"
- " s390x CPUs for now")
compile_extra = ['-DRPYTHON_LL2CTYPES']
platform.verify_eci(ExternalCompilationInfo(
compile_extra=compile_extra,
diff --git a/rpython/rlib/rvmprof/src/vmprof_config.h b/rpython/rlib/rvmprof/src/vmprof_config.h
--- a/rpython/rlib/rvmprof/src/vmprof_config.h
+++ b/rpython/rlib/rvmprof/src/vmprof_config.h
@@ -22,6 +22,8 @@
#define PC_FROM_UCONTEXT uc_mcontext.arm_ip
#elif defined(__linux) && defined(__i386) && defined(__GNUC__)
#define PC_FROM_UCONTEXT uc_mcontext.gregs[REG_EIP]
+#elif defined(__s390x__)
+ #define PC_FROM_UCONTEXT uc_mcontext.psw.addr
#else
/* linux, gnuc */
#define PC_FROM_UCONTEXT uc_mcontext.gregs[REG_RIP]
More information about the pypy-commit
mailing list