Author: Richard Plangger <planri...@gmail.com> Branch: vmprof-native Changeset: r90018:7c464bc97d6f Date: 2017-02-09 11:34 +0100 http://bitbucket.org/pypy/pypy/changeset/7c464bc97d6f/
Log: revert that check, does not work for tests diff --git a/pypy/doc/build.rst b/pypy/doc/build.rst --- a/pypy/doc/build.rst +++ b/pypy/doc/build.rst @@ -79,6 +79,9 @@ _ssl libssl +_vmprof + libunwind + Make sure to have these libraries (with development headers) installed before building PyPy, otherwise the resulting binary will not contain these modules. Furthermore, the following libraries should be present diff --git a/rpython/rlib/rvmprof/rvmprof.py b/rpython/rlib/rvmprof/rvmprof.py --- a/rpython/rlib/rvmprof/rvmprof.py +++ b/rpython/rlib/rvmprof/rvmprof.py @@ -94,10 +94,11 @@ """ if CodeClass in self._code_classes: return - assert len(self._code_classes) == 0, \ - "native profiling currently prohibits " \ - "to have more than one code class. see comment "\ - "in vmprof_execute_code for details" + # nope does not work for our tests + # assert len(self._code_classes) == 0, \ + # "native profiling currently prohibits " \ + # "to have more than one code class. see comment "\ + # "in vmprof_execute_code for details" CodeClass._vmprof_unique_id = 0 # default value: "unknown" immut = CodeClass.__dict__.get('_immutable_fields_', []) CodeClass._immutable_fields_ = list(immut) + ['_vmprof_unique_id'] diff --git a/rpython/rlib/rvmprof/src/shared/vmprof.h b/rpython/rlib/rvmprof/src/shared/vmprof.h --- a/rpython/rlib/rvmprof/src/shared/vmprof.h +++ b/rpython/rlib/rvmprof/src/shared/vmprof.h @@ -44,12 +44,19 @@ #define PY_THREAD_STATE_T void #define FRAME_STEP(f) f->next #define FRAME_CODE(f) f-> -// Is there is a way to tell the compiler -// that this prototype can have ANY return value. Just removing -// the return type will default to int -typedef long Signed; -RPY_EXTERN Signed __vmprof_eval_vmprof(); -#define IS_VMPROF_EVAL(PTR) PTR == (void*)__vmprof_eval_vmprof + +#ifdef RPYTHON_LL2CTYPES +# define IS_VMPROF_EVAL(PTR) 0 +#else + // Is there is a way to tell the compiler + // that this prototype can have ANY return value. Just removing + // the return type will default to int + typedef long Signed; + RPY_EXTERN Signed __vmprof_eval_vmprof(); +# define IS_VMPROF_EVAL(PTR) PTR == (void*)__vmprof_eval_vmprof +#endif + + #else #define RPY_EXTERN // for cpython _______________________________________________ pypy-commit mailing list pypy-commit@python.org https://mail.python.org/mailman/listinfo/pypy-commit