File tree Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Expand file tree Collapse file tree 3 files changed +14
-3
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ Setting up development can be done using the following commands:
2727 $ source vmprof3/bin/activate
2828 $ python setup.py develop
2929
30+ You need to install python development packages. In case of e.g. Debian or Ubuntu the package you need is ` python3-dev ` and ` libunwind-dev ` .
3031Now it is time to write a test and implement your feature. If you want
3132your changes to affect vmprof.com, head over to
3233https://github.com/vmprof/vmprof-server and follow the setup instructions.
Original file line number Diff line number Diff line change 22from distutils .command .build_py import build_py
33import os , sys
44import subprocess
5+ import platform
56
67IS_PYPY = '__pypy__' in sys .builtin_module_names
78
@@ -39,10 +40,15 @@ def run(self):
3940 extra_compile_args = ['-Wno-unused' ]
4041 extra_compile_args += ['-DVMPROF_LINUX=1' ]
4142 extra_compile_args += ['-DVMPROF_UNIX=1' ]
42- if sys .maxsize == 2 ** 63 - 1 :
43- libraries .append ('unwind-x86_64' )
43+ if platform .machine ().startswith ("arm" ):
44+ libraries .append ('unwind-arm' )
45+ elif platform .machine ().startswith ("x86" ):
46+ if sys .maxsize == 2 ** 63 - 1 :
47+ libraries .append ('unwind-x86_64' )
48+ else :
49+ libraries .append ('unwind-x86' )
4450 else :
45- libraries . append ( 'unwind-x86' )
51+ raise NotImplementedError
4652 extra_source_files += [
4753 'src/vmprof_mt.c' ,
4854 'src/vmprof_unix.c' ,
Original file line number Diff line number Diff line change @@ -36,6 +36,8 @@ PY_EVAL_RETURN_T * vmprof_eval(PY_STACK_FRAME_T *f, int throwflag)
3636 register PY_STACK_FRAME_T * callee_saved asm("rbx" );
3737#elif defined(X86_32 )
3838 register PY_STACK_FRAME_T * callee_saved asm("edi" );
39+ #elif defined(__arm__ )
40+ register PY_STACK_FRAME_T * callee_saved asm("r4" );
3941#else
4042# error "platform not supported"
4143#endif
@@ -45,6 +47,8 @@ PY_EVAL_RETURN_T * vmprof_eval(PY_STACK_FRAME_T *f, int throwflag)
4547 "movq %1, %0\t\n"
4648#elif defined(X86_32 )
4749 "mov %1, %0\t\n"
50+ #elif defined(__arm__ )
51+ "mov %1, %0\t\n"
4852#else
4953# error "platform not supported"
5054#endif
You can’t perform that action at this time.
0 commit comments