[pypy-commit] pypy default: Apply patch to have vmprof work on FreeBSD
arigo
pypy.commits at gmail.com
Wed Jul 18 16:49:32 EDT 2018
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r94876:587bebd53960
Date: 2018-07-18 22:47 +0200
http://bitbucket.org/pypy/pypy/changeset/587bebd53960/
Log: Apply patch to have vmprof work on FreeBSD (thanks David C. on pypy-
dev)
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
@@ -17,7 +17,7 @@
# vmprof works only on x86 for now
IS_SUPPORTED = False
-if sys.platform in ('darwin', 'linux', 'linux2'):
+if sys.platform in ('darwin', 'linux', 'linux2', 'freebsd10', 'freebsd11'):
try:
IS_SUPPORTED = detect_cpu.autodetect().startswith('x86')
except detect_cpu.ProcessorAutodetectError:
diff --git a/rpython/rlib/rvmprof/src/shared/vmprof_unix.h b/rpython/rlib/rvmprof/src/shared/vmprof_unix.h
--- a/rpython/rlib/rvmprof/src/shared/vmprof_unix.h
+++ b/rpython/rlib/rvmprof/src/shared/vmprof_unix.h
@@ -24,6 +24,9 @@
#include "vmprof_mt.h"
+#ifdef __FreeBSD__
+#include <ucontext.h>
+#endif
#include <signal.h>
RPY_EXTERN void vmprof_ignore_signals(int ignored);
More information about the pypy-commit
mailing list