Author: Richard Plangger <[email protected]>
Branch:
Changeset: r90860:d1a9d22b323c
Date: 2017-03-29 11:10 -0400
http://bitbucket.org/pypy/pypy/changeset/d1a9d22b323c/
Log: merge vmprof-native, I thought I have already done that before
diff too long, truncating to 2000 out of 48309 lines
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 (optional, loaded dynamically at runtime)
+
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/pypy/module/_vmprof/interp_vmprof.py
b/pypy/module/_vmprof/interp_vmprof.py
--- a/pypy/module/_vmprof/interp_vmprof.py
+++ b/pypy/module/_vmprof/interp_vmprof.py
@@ -50,8 +50,8 @@
return OperationError(w_VMProfError, space.newtext(e.msg))
-@unwrap_spec(fileno=int, period=float)
-def enable(space, fileno, period):
+@unwrap_spec(fileno=int, period=float, memory=int, lines=int, native=int)
+def enable(space, fileno, period, memory, lines, native):
"""Enable vmprof. Writes go to the given 'fileno', a file descriptor
opened for writing. *The file descriptor must remain open at least
until disable() is called.*
@@ -65,7 +65,7 @@
# "with vmprof will crash"),
# space.w_RuntimeWarning)
try:
- rvmprof.enable(fileno, period)
+ rvmprof.enable(fileno, period, memory, native)
except rvmprof.VMProfError as e:
raise VMProfError(space, e)
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
@@ -24,10 +24,11 @@
i += 5 * WORD # header
assert s[i ] == '\x05' # MARKER_HEADER
assert s[i + 1] == '\x00' # 0
- assert s[i + 2] == '\x02' # VERSION_THREAD_ID
- assert s[i + 3] == chr(4) # len('pypy')
- assert s[i + 4: i + 8] == 'pypy'
- i += 8
+ assert s[i + 2] == '\x06' # VERSION_TIMESTAMP
+ assert s[i + 3] == '\x08' # PROFILE_RPYTHON
+ assert s[i + 4] == chr(4) # len('pypy')
+ assert s[i + 5: i + 9] == 'pypy'
+ i += 9
while i < len(s):
if s[i] == '\x03':
break
@@ -41,6 +42,17 @@
_, size = struct.unpack("ll", s[i:i + 2 * WORD])
count += 1
i += 2 * WORD + size
+ elif s[i] == '\x06':
+ print(s[i:i+24])
+ i += 1+8+8+8
+ elif s[i] == '\x07':
+ i += 1
+ # skip string
+ size, = struct.unpack("l", s[i:i + WORD])
+ i += WORD+size
+ # skip string
+ size, = struct.unpack("l", s[i:i + WORD])
+ i += WORD+size
else:
raise AssertionError(ord(s[i]))
return count
@@ -48,7 +60,7 @@
import _vmprof
gc.collect() # try to make the weakref list deterministic
gc.collect() # by freeing all dead code objects
- _vmprof.enable(tmpfileno, 0.01)
+ _vmprof.enable(tmpfileno, 0.01, 0, 0, 0)
_vmprof.disable()
s = open(self.tmpfilename, 'rb').read()
no_of_codes = count(s)
@@ -61,7 +73,7 @@
gc.collect()
gc.collect()
- _vmprof.enable(tmpfileno2, 0.01)
+ _vmprof.enable(tmpfileno2, 0.01, 0, 0, 0)
exec """def foo2():
pass
@@ -76,9 +88,9 @@
def test_enable_ovf(self):
import _vmprof
- raises(_vmprof.VMProfError, _vmprof.enable, 2, 0)
- raises(_vmprof.VMProfError, _vmprof.enable, 2, -2.5)
- raises(_vmprof.VMProfError, _vmprof.enable, 2, 1e300)
- raises(_vmprof.VMProfError, _vmprof.enable, 2, 1e300 * 1e300)
+ raises(_vmprof.VMProfError, _vmprof.enable, 2, 0, 0, 0, 0)
+ raises(_vmprof.VMProfError, _vmprof.enable, 2, -2.5, 0, 0, 0)
+ raises(_vmprof.VMProfError, _vmprof.enable, 2, 1e300, 0, 0, 0)
+ raises(_vmprof.VMProfError, _vmprof.enable, 2, 1e300 * 1e300, 0, 0, 0)
NaN = (1e300*1e300) / (1e300*1e300)
- raises(_vmprof.VMProfError, _vmprof.enable, 2, NaN)
+ raises(_vmprof.VMProfError, _vmprof.enable, 2, NaN, 0, 0, 0)
diff --git a/pypy/module/_vmprof/test/test_direct.py
b/pypy/module/_vmprof/test/test_direct.py
--- a/pypy/module/_vmprof/test/test_direct.py
+++ b/pypy/module/_vmprof/test/test_direct.py
@@ -43,7 +43,7 @@
}
-""" + open(str(srcdir.join("vmprof_get_custom_offset.h"))).read(),
include_dirs=[str(srcdir)])
+""" + open(str(srcdir.join("shared/vmprof_get_custom_offset.h"))).read(),
include_dirs=[str(srcdir)])
class TestDirect(object):
def test_infrastructure(self):
diff --git a/pypy/module/faulthandler/cintf.py
b/pypy/module/faulthandler/cintf.py
--- a/pypy/module/faulthandler/cintf.py
+++ b/pypy/module/faulthandler/cintf.py
@@ -5,10 +5,14 @@
cwd = py.path.local(__file__).dirpath()
+rvmp = cwd.join('../../..')
+rvmp = rvmp.join('rpython/rlib/rvmprof/src')
+
eci = ExternalCompilationInfo(
includes=[cwd.join('faulthandler.h')],
- include_dirs=[str(cwd), cdir],
- separate_module_files=[cwd.join('faulthandler.c')])
+ include_dirs=[str(cwd), cdir, rvmp],
+ separate_module_files=[cwd.join('faulthandler.c')],
+ compile_extra=['-DRPYTHON_VMPROF=1'])
eci_later = eci.merge(ExternalCompilationInfo(
pre_include_bits=['#define PYPY_FAULTHANDLER_LATER\n']))
diff --git a/rpython/rlib/jit.py b/rpython/rlib/jit.py
--- a/rpython/rlib/jit.py
+++ b/rpython/rlib/jit.py
@@ -244,6 +244,10 @@
return inner
def oopspec(spec):
+ """ The JIT compiler won't look inside this decorated function,
+ but instead during translation, rewrites it according to the handler in
+ rpython/jit/codewriter/jtransform.py.
+ """
def decorator(func):
func.oopspec = spec
return func
diff --git a/rpython/rlib/rvmprof/__init__.py b/rpython/rlib/rvmprof/__init__.py
--- a/rpython/rlib/rvmprof/__init__.py
+++ b/rpython/rlib/rvmprof/__init__.py
@@ -32,8 +32,8 @@
return code._vmprof_unique_id
return 0
-def enable(fileno, interval):
- _get_vmprof().enable(fileno, interval)
+def enable(fileno, interval, memory=0, native=0):
+ _get_vmprof().enable(fileno, interval, memory, native)
def disable():
_get_vmprof().disable()
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
@@ -14,32 +14,64 @@
ROOT = py.path.local(rpythonroot).join('rpython', 'rlib', 'rvmprof')
SRC = ROOT.join('src')
+SHARED = SRC.join('shared')
+BACKTRACE = SHARED.join('libbacktrace')
+compile_extra = ['-DRPYTHON_VMPROF', '-O3']
if sys.platform.startswith('linux'):
+ separate_module_files = [
+ BACKTRACE.join('backtrace.c'),
+ BACKTRACE.join('state.c'),
+ BACKTRACE.join('elf.c'),
+ BACKTRACE.join('dwarf.c'),
+ BACKTRACE.join('fileline.c'),
+ BACKTRACE.join('mmap.c'),
+ BACKTRACE.join('mmapio.c'),
+ BACKTRACE.join('posix.c'),
+ BACKTRACE.join('sort.c'),
+ ]
_libs = ['dl']
+ compile_extra += ['-DVMPROF_UNIX']
+ compile_extra += ['-DVMPROF_LINUX']
+elif sys.platform == 'darwin':
+ compile_extra += ['-DVMPROF_UNIX']
+ compile_extra += ['-DVMPROF_MAC']
+ separate_module_files = []
+ _libs = []
else:
+ # windows
+ separate_module_files = []
_libs = []
+
eci_kwds = dict(
- include_dirs = [SRC],
- includes = ['rvmprof.h', 'vmprof_stack.h'],
+ include_dirs = [SRC, SHARED, BACKTRACE],
+ includes = ['rvmprof.h','vmprof_stack.h'],
libraries = _libs,
- separate_module_files = [SRC.join('rvmprof.c')],
- post_include_bits=['#define RPYTHON_VMPROF\n'],
+ separate_module_files = [
+ SRC.join('rvmprof.c'),
+ SHARED.join('compat.c'),
+ SHARED.join('machine.c'),
+ SHARED.join('symboltable.c'),
+ SHARED.join('vmp_stack.c'),
+ ] + separate_module_files,
+ post_include_bits=[],
+ compile_extra=compile_extra
)
global_eci = ExternalCompilationInfo(**eci_kwds)
def setup():
- compile_extra = ['-DRPYTHON_LL2CTYPES']
+ eci_kwds['compile_extra'].append('-DRPYTHON_LL2CTYPES')
platform.verify_eci(ExternalCompilationInfo(
- compile_extra=compile_extra,
- **eci_kwds))
+ **eci_kwds))
eci = global_eci
vmprof_init = rffi.llexternal("vmprof_init",
- [rffi.INT, rffi.DOUBLE, rffi.CCHARP],
+ [rffi.INT, rffi.DOUBLE, rffi.INT, rffi.INT,
+ rffi.CCHARP, rffi.INT],
rffi.CCHARP, compilation_info=eci)
- vmprof_enable = rffi.llexternal("vmprof_enable", [], rffi.INT,
+ vmprof_enable = rffi.llexternal("vmprof_enable", [rffi.INT, rffi.INT],
+ rffi.INT,
compilation_info=eci,
save_err=rffi.RFFI_SAVE_ERRNO)
vmprof_disable = rffi.llexternal("vmprof_disable", [], rffi.INT,
@@ -62,6 +94,7 @@
return CInterface(locals())
+
class CInterface(object):
def __init__(self, namespace):
for k, v in namespace.iteritems():
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
@@ -10,6 +10,8 @@
MAX_FUNC_NAME = 1023
+PLAT_WINDOWS = sys.platform == 'win32'
+
# ____________________________________________________________
# keep in sync with vmprof_stack.h
@@ -122,7 +124,7 @@
self._gather_all_code_objs = gather_all_code_objs
@jit.dont_look_inside
- def enable(self, fileno, interval):
+ def enable(self, fileno, interval, memory=0, native=0):
"""Enable vmprof. Writes go to the given 'fileno'.
The sampling interval is given by 'interval' as a number of
seconds, as a float which must be smaller than 1.0.
@@ -132,12 +134,16 @@
if self.is_enabled:
raise VMProfError("vmprof is already enabled")
- p_error = self.cintf.vmprof_init(fileno, interval, "pypy")
+ if PLAT_WINDOWS:
+ native = 0 # force disabled on Windows
+ lines = 0 # not supported on PyPy currently
+
+ p_error = self.cintf.vmprof_init(fileno, interval, lines, memory,
"pypy", native)
if p_error:
raise VMProfError(rffi.charp2str(p_error))
self._gather_all_code_objs()
- res = self.cintf.vmprof_enable()
+ res = self.cintf.vmprof_enable(memory, native)
if res < 0:
raise VMProfError(os.strerror(rposix.get_saved_errno()))
self.is_enabled = True
@@ -154,6 +160,7 @@
if res < 0:
raise VMProfError(os.strerror(rposix.get_saved_errno()))
+
def _write_code_registration(self, uid, name):
assert name.count(':') == 3 and len(name) <= MAX_FUNC_NAME, (
"the name must be 'class:func_name:func_line:filename' "
@@ -171,6 +178,23 @@
arguments given to the decorated function.
'result_class' is ignored (backward compatibility).
+
+ ====================================
+ TRANSLATION NOTE CALL THIS ONLY ONCE
+ ====================================
+
+ This function can only be called once during translation.
+ It generates a C function called __vmprof_eval_vmprof which is used by
+ the vmprof C source code and is bound as an extern function.
+ This is necessary while walking the native stack.
+ If you see __vmprof_eval_vmprof defined twice during
+ translation, read on:
+
+ To remove this restriction do the following:
+
+ *) Extend the macro IS_VMPROF_EVAL in the vmprof source repo to check
several
+ sybmols.
+ *) Give each function provided to this decorator a unique symbol name in C
"""
if _hack_update_stack_untranslated:
from rpython.rtyper.annlowlevel import llhelper
@@ -198,16 +222,27 @@
unique_id = get_code_fn(*args)._vmprof_unique_id
unique_id = rffi.cast(lltype.Signed, unique_id)
# ^^^ removes the "known non-negative" hint for annotation
+ #
+ # Signals can occur at the two places (1) and (2), that will
+ # have added a stack entry, but the function __vmprof_eval_vmprof
+ # is not entered. This behaviour will swallow one Python stack
frame
+ #
+ # Current fix: vmprof will discard this sample. (happens
+ # very infrequently)
+ #
if not jit.we_are_jitted():
x = enter_code(unique_id)
+ # (1) signal here
try:
return func(*args)
finally:
+ # (2) signal here
leave_code(x)
else:
return decorated_jitted_function(unique_id, *args)
decorated_function.__name__ = func.__name__ + '_rvmprof'
+ decorated_function.c_name = '__vmprof_eval_vmprof'
return decorated_function
return decorate
@@ -216,7 +251,6 @@
def _was_registered(CodeClass):
return hasattr(CodeClass, '_vmprof_unique_id')
-
_vmprof_instance = None
@specialize.memo()
diff --git a/rpython/rlib/rvmprof/src/rvmprof.c
b/rpython/rlib/rvmprof/src/rvmprof.c
--- a/rpython/rlib/rvmprof/src/rvmprof.c
+++ b/rpython/rlib/rvmprof/src/rvmprof.c
@@ -2,25 +2,30 @@
#ifdef RPYTHON_LL2CTYPES
/* only for testing: ll2ctypes sets RPY_EXTERN from the command-line */
-#ifndef RPY_EXTERN
-#define RPY_EXTERN RPY_EXPORTED
-#endif
-#ifdef _WIN32
-#define RPY_EXPORTED __declspec(dllexport)
-#else
-#define RPY_EXPORTED extern __attribute__((visibility("default")))
-#endif
#else
# include "common_header.h"
# include "structdef.h"
# include "src/threadlocal.h"
# include "rvmprof.h"
+# include "forwarddecl.h"
#endif
-#if defined(__unix__) || defined(__APPLE__)
-#include "vmprof_main.h"
+
+#include "shared/vmprof_get_custom_offset.h"
+#ifdef VMPROF_UNIX
+#include "shared/vmprof_main.h"
#else
-#include "vmprof_main_win32.h"
+#include "shared/vmprof_main_win32.h"
#endif
+
+
+#ifdef RPYTHON_LL2CTYPES
+int IS_VMPROF_EVAL(void * ptr) { return 0; }
+#else
+int IS_VMPROF_EVAL(void * ptr)
+{
+ return ptr == __vmprof_eval_vmprof;
+}
+#endif
diff --git a/rpython/rlib/rvmprof/src/rvmprof.h
b/rpython/rlib/rvmprof/src/rvmprof.h
--- a/rpython/rlib/rvmprof/src/rvmprof.h
+++ b/rpython/rlib/rvmprof/src/rvmprof.h
@@ -1,12 +1,30 @@
-#ifdef _WIN32
-typedef long intptr_t;
+#pragma once
+
+#include "shared/vmprof.h"
+
+#define SINGLE_BUF_SIZE (8192 - 2 * sizeof(unsigned int))
+
+#ifdef VMPROF_WINDOWS
+#include "msiinttypes/inttypes.h"
+#include "msiinttypes/stdint.h"
#else
-# include <stdint.h>
+#include <inttypes.h>
+#include <stdint.h>
#endif
-RPY_EXTERN char *vmprof_init(int, double, char *);
+#ifndef RPY_EXTERN
+#define RPY_EXTERN RPY_EXPORTED
+#endif
+#ifdef _WIN32
+#define RPY_EXPORTED __declspec(dllexport)
+#else
+#define RPY_EXPORTED extern __attribute__((visibility("default")))
+#endif
+
+RPY_EXTERN char *vmprof_init(int fd, double interval, int memory,
+ int lines, const char *interp_name, int native);
RPY_EXTERN void vmprof_ignore_signals(int);
-RPY_EXTERN int vmprof_enable(void);
+RPY_EXTERN int vmprof_enable(int memory, int native);
RPY_EXTERN int vmprof_disable(void);
RPY_EXTERN int vmprof_register_virtual_function(char *, long, int);
RPY_EXTERN void* vmprof_stack_new(void);
@@ -15,4 +33,7 @@
RPY_EXTERN void vmprof_stack_free(void*);
RPY_EXTERN intptr_t vmprof_get_traceback(void *, void *, intptr_t*, intptr_t);
+long vmprof_write_header_for_jit_addr(intptr_t *result, long n,
+ intptr_t addr, int max_depth);
+
#define RVMPROF_TRACEBACK_ESTIMATE_N(num_entries) (2 * (num_entries) + 4)
diff --git a/rpython/rlib/rvmprof/src/shared/_vmprof.c
b/rpython/rlib/rvmprof/src/shared/_vmprof.c
new file mode 100644
--- /dev/null
+++ b/rpython/rlib/rvmprof/src/shared/_vmprof.c
@@ -0,0 +1,371 @@
+/*[clinic input]
+module _vmprof
+[clinic start generated code]*/
+/*[clinic end generated code: output=da39a3ee5e6b4b0d input=b443489e38f2be7d]*/
+
+#define _GNU_SOURCE 1
+
+#include <Python.h>
+#include <frameobject.h>
+#include <signal.h>
+
+#include "_vmprof.h"
+
+static volatile int is_enabled = 0;
+static destructor Original_code_dealloc = 0;
+static PyObject* (*_default_eval_loop)(PyFrameObject *, int) = 0;
+void dump_native_symbols(int fileno);
+
+#if VMPROF_UNIX
+#include "trampoline.h"
+#include "machine.h"
+#include "symboltable.h"
+#include "vmprof_main.h"
+#else
+#include "vmprof_main_win32.h"
+#endif
+#include "vmp_stack.h"
+
+#ifdef VMPROF_UNIX
+#ifdef __clang__
+__attribute__((optnone))
+#elif defined(__GNUC__)
+__attribute__((optimize("O1")))
+#endif
+PY_EVAL_RETURN_T * vmprof_eval(PY_STACK_FRAME_T *f, int throwflag)
+{
+#ifdef X86_64
+ register PY_STACK_FRAME_T * callee_saved asm("rbx");
+#elif defined(X86_32)
+ register PY_STACK_FRAME_T * callee_saved asm("edi");
+#else
+# error "platform not supported"
+#endif
+
+ asm volatile(
+#ifdef X86_64
+ "movq %1, %0\t\n"
+#elif defined(X86_32)
+ "mov %1, %0\t\n"
+#else
+# error "platform not supported"
+#endif
+ : "=r" (callee_saved)
+ : "r" (f) );
+ return _default_eval_loop(f, throwflag);
+}
+#endif
+
+static int emit_code_object(PyCodeObject *co)
+{
+ char buf[MAX_FUNC_NAME + 1];
+ char *co_name, *co_filename;
+ int co_firstlineno;
+ int sz;
+#if PY_MAJOR_VERSION >= 3
+ co_name = PyUnicode_AsUTF8(co->co_name);
+ if (co_name == NULL)
+ return -1;
+ co_filename = PyUnicode_AsUTF8(co->co_filename);
+ if (co_filename == NULL)
+ return -1;
+#else
+ co_name = PyString_AS_STRING(co->co_name);
+ co_filename = PyString_AS_STRING(co->co_filename);
+#endif
+ co_firstlineno = co->co_firstlineno;
+
+ sz = snprintf(buf, MAX_FUNC_NAME / 2, "py:%s", co_name);
+ if (sz < 0) sz = 0;
+ if (sz > MAX_FUNC_NAME / 2) sz = MAX_FUNC_NAME / 2;
+ snprintf(buf + sz, MAX_FUNC_NAME / 2, ":%d:%s", co_firstlineno,
+ co_filename);
+ return vmprof_register_virtual_function(buf, CODE_ADDR_TO_UID(co), 500000);
+}
+
+static int _look_for_code_object(PyObject *o, void *all_codes)
+{
+ if (PyCode_Check(o) && !PySet_Contains((PyObject *)all_codes, o)) {
+ Py_ssize_t i;
+ PyCodeObject *co = (PyCodeObject *)o;
+ if (emit_code_object(co) < 0)
+ return -1;
+ if (PySet_Add((PyObject *)all_codes, o) < 0)
+ return -1;
+
+ /* as a special case, recursively look for and add code
+ objects found in the co_consts. The problem is that code
+ objects are not created as GC-aware in CPython, so we need
+ to hack like this to hope to find most of them.
+ */
+ i = PyTuple_Size(co->co_consts);
+ while (i > 0) {
+ --i;
+ if (_look_for_code_object(PyTuple_GET_ITEM(co->co_consts, i),
+ all_codes) < 0)
+ return -1;
+ }
+ }
+ return 0;
+}
+
+static void emit_all_code_objects(void)
+{
+ PyObject *gc_module = NULL, *lst = NULL, *all_codes = NULL;
+ Py_ssize_t i, size;
+
+ gc_module = PyImport_ImportModuleNoBlock("gc");
+ if (gc_module == NULL)
+ goto error;
+
+ lst = PyObject_CallMethod(gc_module, "get_objects", "");
+ if (lst == NULL || !PyList_Check(lst))
+ goto error;
+
+ all_codes = PySet_New(NULL);
+ if (all_codes == NULL)
+ goto error;
+
+ size = PyList_GET_SIZE(lst);
+ for (i = 0; i < size; i++) {
+ PyObject *o = PyList_GET_ITEM(lst, i);
+ if (o->ob_type->tp_traverse &&
+ o->ob_type->tp_traverse(o, _look_for_code_object, (void
*)all_codes)
+ < 0)
+ goto error;
+ }
+
+ error:
+ Py_XDECREF(all_codes);
+ Py_XDECREF(lst);
+ Py_XDECREF(gc_module);
+}
+
+static void cpyprof_code_dealloc(PyObject *co)
+{
+ if (is_enabled) {
+ emit_code_object((PyCodeObject *)co);
+ /* xxx error return values are ignored */
+ }
+ Original_code_dealloc(co);
+}
+
+
+void dump_native_symbols(int fileno)
+{
+ PyObject * mod = NULL;
+
+ mod = PyImport_ImportModuleNoBlock("vmprof");
+ if (mod == NULL)
+ goto error;
+
+ PyObject_CallMethod(mod, "dump_native_symbols", "(l)", fileno);
+
+error:
+ Py_XDECREF(mod);
+}
+
+
+
+static PyObject *enable_vmprof(PyObject* self, PyObject *args)
+{
+ int fd;
+ int memory = 0;
+ int lines = 0;
+ int native = 0;
+ double interval;
+ char *p_error;
+
+ if (!PyArg_ParseTuple(args, "id|iii", &fd, &interval, &memory, &lines,
&native)) {
+ return NULL;
+ }
+ assert(fd >= 0 && "file descripter provided to vmprof must not" \
+ " be less then zero.");
+
+ if (is_enabled) {
+ PyErr_SetString(PyExc_ValueError, "vmprof is already enabled");
+ return NULL;
+ }
+
+ vmp_profile_lines(lines);
+
+ if (!Original_code_dealloc) {
+ Original_code_dealloc = PyCode_Type.tp_dealloc;
+ PyCode_Type.tp_dealloc = &cpyprof_code_dealloc;
+ }
+
+ p_error = vmprof_init(fd, interval, memory, lines, "cpython", native);
+ if (p_error) {
+ PyErr_SetString(PyExc_ValueError, p_error);
+ return NULL;
+ }
+
+ if (vmprof_enable(memory, native) < 0) {
+ PyErr_SetFromErrno(PyExc_OSError);
+ return NULL;
+ }
+
+ is_enabled = 1;
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyObject *
+disable_vmprof(PyObject *module, PyObject *noarg)
+{
+ if (!is_enabled) {
+ PyErr_SetString(PyExc_ValueError, "vmprof is not enabled");
+ return NULL;
+ }
+ is_enabled = 0;
+ vmprof_ignore_signals(1);
+ emit_all_code_objects();
+
+ if (vmprof_disable() < 0) {
+ PyErr_SetFromErrno(PyExc_OSError);
+ return NULL;
+ }
+ if (PyErr_Occurred())
+ return NULL;
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+static PyObject *
+write_all_code_objects(PyObject *module, PyObject *noargs)
+{
+ if (!is_enabled) {
+ PyErr_SetString(PyExc_ValueError, "vmprof is not enabled");
+ return NULL;
+ }
+ emit_all_code_objects();
+ if (PyErr_Occurred())
+ return NULL;
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+
+
+static PyObject *
+sample_stack_now(PyObject *module, PyObject * args)
+{
+ PyThreadState * tstate = NULL;
+ PyObject * list = NULL;
+ int i;
+ int entry_count;
+ void ** m;
+ void * routine_ip;
+ long skip = 0;
+
+ // stop any signal to occur
+ vmprof_ignore_signals(1);
+
+ list = PyList_New(0);
+ if (list == NULL) {
+ goto error;
+ }
+
+ if (!PyArg_ParseTuple(args, "l", &skip)) {
+ goto error;
+ }
+
+ tstate = PyGILState_GetThisThreadState();
+ m = (void**)malloc(SINGLE_BUF_SIZE);
+ if (m == NULL) {
+ PyErr_SetString(PyExc_MemoryError, "could not allocate buffer for
stack trace");
+ vmprof_ignore_signals(0);
+ return NULL;
+ }
+ entry_count = vmp_walk_and_record_stack(tstate->frame, m,
MAX_STACK_DEPTH-1, skip, 0);
+
+ for (i = 0; i < entry_count; i++) {
+ routine_ip = m[i];
+ PyList_Append(list, PyLong_NEW((ssize_t)routine_ip));
+ }
+
+ free(m);
+
+ Py_INCREF(list);
+
+ vmprof_ignore_signals(0);
+ return list;
+error:
+ Py_DECREF(list);
+ Py_INCREF(Py_None);
+
+ vmprof_ignore_signals(0);
+ return Py_None;
+}
+
+#ifdef VMP_SUPPORTS_NATIVE_PROFILING
+static PyObject *
+resolve_addr(PyObject *module, PyObject *args) {
+ long long addr;
+ PyObject * o_name = NULL;
+ PyObject * o_lineno = NULL;
+ PyObject * o_srcfile = NULL;
+ char name[128];
+ int lineno = 0;
+ char srcfile[256];
+
+ if (!PyArg_ParseTuple(args, "L", &addr)) {
+ return NULL;
+ }
+ name[0] = '\x00';
+ srcfile[0] = '-';
+ srcfile[1] = '\x00';
+ if (vmp_resolve_addr((void*)addr, name, 128, &lineno, srcfile, 256) != 0) {
+ goto error;
+ }
+
+ o_name = PyStr_NEW(name);
+ if (o_name == NULL) goto error;
+ o_lineno = PyLong_NEW(lineno);
+ if (o_lineno == NULL) goto error;
+ o_srcfile = PyStr_NEW(srcfile);
+ if (o_srcfile == NULL) goto error;
+ //
+ return PyTuple_Pack(3, o_name, o_lineno, o_srcfile);
+error:
+ Py_XDECREF(o_name);
+ Py_XDECREF(o_lineno);
+ Py_XDECREF(o_srcfile);
+
+ Py_INCREF(Py_None);
+ return Py_None;
+}
+#endif
+
+static PyMethodDef VMProfMethods[] = {
+ {"enable", enable_vmprof, METH_VARARGS, "Enable profiling."},
+ {"disable", disable_vmprof, METH_NOARGS, "Disable profiling."},
+ {"write_all_code_objects", write_all_code_objects, METH_NOARGS,
+ "Write eagerly all the IDs of code objects"},
+ {"sample_stack_now", sample_stack_now, METH_VARARGS, "Sample the stack
now"},
+#ifdef VMP_SUPPORTS_NATIVE_PROFILING
+ {"resolve_addr", resolve_addr, METH_VARARGS, "Return the name of the
addr"},
+#endif
+ {NULL, NULL, 0, NULL} /* Sentinel */
+};
+
+
+#if PY_MAJOR_VERSION >= 3
+static struct PyModuleDef VmprofModule = {
+ PyModuleDef_HEAD_INIT,
+ "_vmprof",
+ "", // doc
+ -1, // size
+ VMProfMethods
+};
+
+PyMODINIT_FUNC PyInit__vmprof(void)
+{
+ return PyModule_Create(&VmprofModule);
+}
+#else
+PyMODINIT_FUNC init_vmprof(void)
+{
+ Py_InitModule("_vmprof", VMProfMethods);
+}
+#endif
diff --git a/rpython/rlib/rvmprof/src/shared/_vmprof.h
b/rpython/rlib/rvmprof/src/shared/_vmprof.h
new file mode 100644
--- /dev/null
+++ b/rpython/rlib/rvmprof/src/shared/_vmprof.h
@@ -0,0 +1,46 @@
+#pragma once
+
+#include "vmprof.h"
+
+#ifdef VMPROF_WINDOWS
+#include "msiinttypes/inttypes.h"
+#include "msiinttypes/stdint.h"
+#else
+#include <inttypes.h>
+#include <stdint.h>
+#include <stddef.h>
+#endif
+
+/**
+ * This whole setup is very strange. There was just one C file called
+ * _vmprof.c which included all *.h files to copy code. Unsure what
+ * the goal was with this design, but I assume it just 'GREW'
+ *
+ * Thus I'm (plan_rich) slowly trying to separate this. *.h files
+ * should not have complex implementations (all of them currently have them)
+ */
+
+
+#define SINGLE_BUF_SIZE (8192 - 2 * sizeof(unsigned int))
+
+#define ROUTINE_IS_PYTHON(RIP) ((unsigned long long)RIP & 0x1) == 0
+#define ROUTINE_IS_C(RIP) ((unsigned long long)RIP & 0x1) == 1
+
+/* This returns the address of the code object
+ as the identifier. The mapping from identifiers to string
+ representations of the code object is done elsewhere, namely:
+
+ * If the code object dies while vmprof is enabled,
+ PyCode_Type.tp_dealloc will emit it. (We don't handle nicely
+ for now the case where several code objects are created and die
+ at the same memory address.)
+
+ * When _vmprof.disable() is called, then we look around the
+ process for code objects and emit all the ones that we can
+ find (which we hope is very close to 100% of them).
+*/
+#define CODE_ADDR_TO_UID(co) (((intptr_t)(co)))
+
+#define CPYTHON_HAS_FRAME_EVALUATION PY_VERSION_HEX >= 0x30600B0
+
+int vmp_write_all(const char *buf, size_t bufsize);
diff --git a/rpython/rlib/rvmprof/src/shared/compat.c
b/rpython/rlib/rvmprof/src/shared/compat.c
new file mode 100644
--- /dev/null
+++ b/rpython/rlib/rvmprof/src/shared/compat.c
@@ -0,0 +1,140 @@
+#include "compat.h"
+
+#include <string.h>
+#include <assert.h>
+#if VMPROF_WINDOWS
+#define WIN32_LEAN_AND_MEAN
+#include <Windows.h>
+#else
+#include <time.h>
+#include <sys/time.h>
+#endif
+
+static int _vmp_profile_fileno = -1;
+
+int vmp_profile_fileno(void) {
+ return _vmp_profile_fileno;
+}
+void vmp_set_profile_fileno(int fileno) {
+ _vmp_profile_fileno = fileno;
+}
+
+#ifndef VMPROF_WINDOWS
+int vmp_write_all(const char *buf, size_t bufsize)
+{
+ ssize_t count;
+ if (_vmp_profile_fileno == -1) {
+ return -1;
+ }
+ while (bufsize > 0) {
+ count = write(_vmp_profile_fileno, buf, bufsize);
+ if (count <= 0)
+ return -1; /* failed */
+ buf += count;
+ bufsize -= count;
+ }
+ return 0;
+}
+#endif
+
+int vmp_write_meta(const char * key, const char * value)
+{
+ char marker = MARKER_META;
+ long x = (long)strlen(key);
+ vmp_write_all(&marker, 1);
+ vmp_write_all((char*)&x, sizeof(long));
+ vmp_write_all(key, x);
+ x = (long)strlen(value);
+ vmp_write_all((char*)&x, sizeof(long));
+ vmp_write_all(value, x);
+ return 0;
+}
+
+/**
+ * Write the time and zone now.
+ */
+
+struct timezone_buf {
+ int64_t tv_sec;
+ int64_t tv_usec;
+};
+#define __SIZE (1+sizeof(struct timezone_buf)+8)
+
+#ifdef VMPROF_UNIX
+int vmp_write_time_now(int marker) {
+ char buffer[__SIZE];
+ struct timezone_buf buf;
+
+ (void)memset(&buffer, 0, __SIZE);
+
+ assert((marker == MARKER_TRAILER || marker == MARKER_TIME_N_ZONE) && \
+ "marker must be either a trailer or time_n_zone!");
+
+ struct timeval tv;
+ time_t now;
+ struct tm tm;
+
+
+ /* copy over to the struct */
+ if (gettimeofday(&tv, NULL) != 0) {
+ return -1;
+ }
+ if (time(&now) == (time_t)-1) {
+ return -1;
+ }
+ if (localtime_r(&now, &tm) == NULL) {
+ return -1;
+ }
+ buf.tv_sec = tv.tv_sec;
+ buf.tv_usec = tv.tv_usec;
+ strncpy(((char*)buffer)+__SIZE-8, tm.tm_zone, 8);
+
+ buffer[0] = marker;
+ (void)memcpy(buffer+1, &buf, sizeof(struct timezone_buf));
+ vmp_write_all(buffer, __SIZE);
+ return 0;
+}
+#endif
+
+#ifdef VMPROF_WINDOWS
+int vmp_write_time_now(int marker) {
+ char buffer[__SIZE];
+ struct timezone_buf buf;
+
+ /**
+ *
http://stackoverflow.com/questions/10905892/equivalent-of-gettimeday-for-windows
+ */
+
+ // Note: some broken versions only have 8 trailing zero's, the correct
+ // epoch has 9 trailing zero's
+ static const uint64_t EPOCH = ((uint64_t) 116444736000000000ULL);
+
+ SYSTEMTIME system_time;
+ FILETIME file_time;
+ uint64_t time;
+
+ (void)memset(&buffer, 0, __SIZE);
+
+ assert((marker == MARKER_TRAILER || marker == MARKER_TIME_N_ZONE) && \
+ "marker must be either a trailer or time_n_zone!");
+
+
+ GetSystemTime( &system_time );
+ SystemTimeToFileTime( &system_time, &file_time );
+ time = ((uint64_t)file_time.dwLowDateTime ) ;
+ time += ((uint64_t)file_time.dwHighDateTime) << 32;
+
+ buf.tv_sec = ((time - EPOCH) / 10000000L);
+ buf.tv_usec = (system_time.wMilliseconds * 1000);
+
+ // time zone not implemented on windows
+ memset(((char*)buffer)+__SIZE-8, 0, 8);
+ (void)memcpy(((char*)buffer)+__SIZE-8, "UTC", 3);
+
+ buffer[0] = marker;
+ (void)memcpy(buffer+1, &buf, sizeof(struct timezone_buf));
+ vmp_write_all(buffer, __SIZE);
+ return 0;
+}
+#endif
+#undef __SIZE
diff --git a/rpython/rlib/rvmprof/src/shared/compat.h
b/rpython/rlib/rvmprof/src/shared/compat.h
new file mode 100644
--- /dev/null
+++ b/rpython/rlib/rvmprof/src/shared/compat.h
@@ -0,0 +1,25 @@
+#pragma once
+
+#include "vmprof.h"
+
+#ifndef RPYTHON_VMPROF
+# if PY_MAJOR_VERSION >= 3
+ #define PyStr_AS_STRING PyBytes_AS_STRING
+ #define PyStr_GET_SIZE PyBytes_GET_SIZE
+ #define PyStr_NEW PyUnicode_FromString
+ #define PyLong_NEW PyLong_FromSsize_t
+# else
+ #define PyStr_AS_STRING PyString_AS_STRING
+ #define PyStr_GET_SIZE PyString_GET_SIZE
+ #define PyStr_NEW PyString_FromString
+ #define PyLong_NEW PyInt_FromSsize_t
+ #define PyLong_AsLong PyInt_AsLong
+# endif
+#endif
+
+int vmp_write_all(const char *buf, size_t bufsize);
+int vmp_write_time_now(int marker);
+int vmp_write_meta(const char * key, const char * value);
+
+int vmp_profile_fileno(void);
+void vmp_set_profile_fileno(int fileno);
diff --git a/rpython/rlib/rvmprof/src/shared/libbacktrace/ChangeLog
b/rpython/rlib/rvmprof/src/shared/libbacktrace/ChangeLog
new file mode 100644
--- /dev/null
+++ b/rpython/rlib/rvmprof/src/shared/libbacktrace/ChangeLog
@@ -0,0 +1,602 @@
+2017-01-01 Jakub Jelinek <[email protected]>
+
+ Update copyright years.
+
+2016-11-15 Matthias Klose <[email protected]>
+
+ * configure: Regenerate.
+
+2016-09-11 Carlos Liam <[email protected]>
+
+ * all: Remove meaningless trailing whitespace.
+
+2016-05-18 Uros Bizjak <[email protected]>
+
+ PR target/71161
+ * elf.c (phdr_callback) [__i386__]: Add
+ __attribute__((__force_align_arg_pointer__)).
+
+2016-03-02 Maxim Ostapenko <[email protected]>
+
+ * elf.c (backtrace_initialize): Properly initialize elf_fileline_fn to
+ avoid possible crash.
+ (elf_add): Don't set *fileline_fn to elf_nodebug value in case of
+ missing debug info anymore.
+
+2016-02-06 John David Anglin <[email protected]>
+
+ * mmap.c (MAP_FAILED): Define if not defined.
+
+2016-01-04 Jakub Jelinek <[email protected]>
+
+ Update copyright years.
+
+2015-12-18 Andris Pavenis <[email protected]>
+
+ * configure.ac: Specify that DJGPP do not have mmap
+ even when sys/mman.h exists.
+ * configure: Regenerate
+
+2015-12-09 John David Anglin <[email protected]>
+
+ PR libgfortran/68115
+ * configure.ac: Set libbacktrace_cv_sys_sync to no on hppa*-*-hpux*.
+ * configure: Regenerate.
+ * elf.c (backtrace_initialize): Cast __sync_bool_compare_and_swap call
+ to void.
+
+2015-09-17 Ian Lance Taylor <[email protected]>
+
+ * posix.c (backtrace_open): Cast second argument of open() to int.
+
+2015-09-11 Ian Lance Taylor <[email protected]>
+
+ * Makefile.am (backtrace.lo): Depend on internal.h.
+ (sort.lo, stest.lo): Add explicit dependencies.
+ * Makefile.in: Rebuild.
+
+2015-09-09 Hans-Peter Nilsson <[email protected]>
+
+ * backtrace.c: #include <sys/types.h>.
+
+2015-09-08 Ian Lance Taylor <[email protected]>
+
+ PR other/67457
+ * backtrace.c: #include "internal.h".
+ (struct backtrace_data): Add can_alloc field.
+ (unwind): If can_alloc is false, don't try to get file/line
+ information.
+ (backtrace_full): Set can_alloc field in bdata.
+ * alloc.c (backtrace_alloc): Don't call error_callback if it is
+ NULL.
+ * mmap.c (backtrace_alloc): Likewise.
+ * internal.h: Update comments for backtrace_alloc and
+ backtrace_free.
+
+2015-09-08 Ian Lance Taylor <[email protected]>
+
+ PR other/67457
+ * mmap.c (backtrace_alloc): Correct test for mmap failure.
+
+2015-08-31 Ulrich Weigand <[email protected]>
+
+ * configure.ac: For spu-*-* targets, set have_fcntl to no.
+ * configure: Regenerate.
+
+2015-08-27 Ulrich Weigand <[email protected]>
+
+ * configure.ac: Remove [disable-shared] argument to LT_INIT.
+ Remove setting PIC_FLAG when building as target library.
+ * configure: Regenerate.
+
+2015-08-26 Hans-Peter Nilsson <[email protected]>
+
+ * configure.ac: Only compile with -fPIC if the target
+ supports it.
+ * configure: Regenerate.
+
+2015-08-24 Ulrich Weigand <[email protected]>
+
+ * configure.ac: Set have_mmap to no on spu-*-* targets.
+ * configure: Regenerate.
+
+2015-08-13 Ian Lance Taylor <[email protected]>
+
+ * dwarf.c (read_function_entry): Add vec_inlined parameter.
+ Change all callers.
+
+2015-06-11 Martin Sebor <[email protected]>
+
+ PR sanitizer/65479
+ * dwarf.c (struct line): Add new field idx.
+ (line_compare): Use it.
+ (add_line): Set it.
+ (read_line_info): Reset it.
+
+2015-05-29 Tristan Gingold <[email protected]>
+
+ * pecoff.c: New file.
+ * Makefile.am (FORMAT_FILES): Add pecoff.c and dependencies.
+ * Makefile.in: Regenerate.
+ * filetype.awk: Detect pecoff.
+ * configure.ac: Define BACKTRACE_SUPPORTS_DATA on elf platforms.
+ Add pecoff.
+ * btest.c (test5): Test enabled only if BACKTRACE_SUPPORTS_DATA is
+ true.
+ * backtrace-supported.h.in (BACKTRACE_SUPPORTS_DATA): Define.
+ * configure: Regenerate.
+ * pecoff.c: New file.
+
+2015-05-13 Michael Haubenwallner <[email protected]>
+
+ * Makefile.in: Regenerated with automake-1.11.6.
+ * aclocal.m4: Likewise.
+ * configure: Likewise.
+
+2015-01-24 Matthias Klose <[email protected]>
+
+ * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC.
+ * configure: Regenerate.
+
+2015-01-05 Jakub Jelinek <[email protected]>
+
+ Update copyright years.
+
+2014-11-21 H.J. Lu <[email protected]>
+
+ PR bootstrap/63784
+ * configure: Regenerated.
+
+2014-11-11 David Malcolm <[email protected]>
+
+ * ChangeLog.jit: New.
+
+2014-11-11 Francois-Xavier Coudert <[email protected]>
+
+ PR target/63610
+ * configure: Regenerate.
+
+2014-10-23 Ian Lance Taylor <[email protected]>
+
+ * internal.h (backtrace_atomic_load_pointer) [no atomic or sync]:
+ Fix to return void *.
+
+2014-05-08 Ian Lance Taylor <[email protected]>
+
+ * mmap.c (backtrace_free): If freeing a large aligned block of
+ memory, call munmap rather than holding onto it.
+ (backtrace_vector_grow): When growing a vector, double the number
+ of pages requested. When releasing the old version of a grown
+ vector, pass the correct size to backtrace_free.
+
+2014-03-07 Ian Lance Taylor <[email protected]>
+
+ * sort.c (backtrace_qsort): Use middle element as pivot.
+
+2014-03-06 Ian Lance Taylor <[email protected]>
+
+ * sort.c: New file.
+ * stest.c: New file.
+ * internal.h (backtrace_qsort): Declare.
+ * dwarf.c (read_abbrevs): Call backtrace_qsort instead of qsort.
+ (read_line_info, read_function_entry): Likewise.
+ (read_function_info, build_dwarf_data): Likewise.
+ * elf.c (elf_initialize_syminfo): Likewise.
+ * Makefile.am (libbacktrace_la_SOURCES): Add sort.c.
+ (stest_SOURCES, stest_LDADD): Define.
+ (check_PROGRAMS): Add stest.
+
+2014-02-07 Misty De Meo <[email protected]>
+
+ PR target/58710
+ * configure.ac: Use AC_LINK_IFELSE in check for
+ _Unwind_GetIPInfo.
+ * configure: Regenerate.
+
+2014-01-02 Richard Sandiford <[email protected]>
+
+ Update copyright years
+
+2013-12-06 Jakub Jelinek <[email protected]>
+
+ * elf.c (ET_DYN): Undefine and define again.
+ (elf_add): Add exe argument, if true and ehdr.e_type is ET_DYN,
+ return early -1 without closing the descriptor.
+ (struct phdr_data): Add exe_descriptor.
+ (phdr_callback): If pd->exe_descriptor is not -1, for very first
+ call if dlpi_name is NULL just call elf_add with the exe_descriptor,
+ otherwise backtrace_close the exe_descriptor if not -1. Adjust
+ call to elf_add.
+ (backtrace_initialize): Adjust call to elf_add. If it returns
+ -1, set pd.exe_descriptor to descriptor, otherwise set it to -1.
+
+2013-12-05 Ian Lance Taylor <[email protected]>
+
+ * alloc.c (backtrace_vector_finish): Add error_callback and data
+ parameters. Call backtrace_vector_release. Return address base.
+ * mmap.c (backtrace_vector_finish): Add error_callback and data
+ parameters. Return address base.
+ * dwarf.c (read_function_info): Get new address base from
+ backtrace_vector_finish.
+ * internal.h (backtrace_vector_finish): Update declaration.
+
+2013-11-27 Ian Lance Taylor <[email protected]>
+
+ * dwarf.c (find_address_ranges): New static function, broken out
+ of build_address_map.
+ (build_address_map): Call it.
+ * btest.c (check): Check for missing filename or function, rather
+ than crashing.
+ (f3): Check that enough frames were returned.
+
+2013-11-19 Jakub Jelinek <[email protected]>
+
+ * backtrace.h (backtrace_syminfo_callback): Add symsize argument.
+ * elf.c (elf_syminfo): Pass 0 or sym->size to the callback as
+ last argument.
+ * btest.c (struct symdata): Add size field.
+ (callback_three): Add symsize argument. Copy it to the data->size
+ field.
+ (f23): Set symdata.size to 0.
+ (test5): Likewise. If sizeof (int) > 1, lookup address of
+ ((uintptr_t) &global) + 1. Verify symdata.val and symdata.size
+ values.
+
+ * atomic.c: Include sys/types.h.
+
+2013-11-18 Ian Lance Taylor <[email protected]>
+
+ * configure.ac: Check for support of __atomic extensions.
+ * internal.h: Declare or #define atomic functions for use in
+ backtrace code.
+ * atomic.c: New file.
+ * dwarf.c (dwarf_lookup_pc): Use atomic functions.
+ (dwarf_fileline, backtrace_dwarf_add): Likewise.
+ * elf.c (elf_add_syminfo_data, elf_syminfo): Likewise.
+ (backtrace_initialize): Likewise.
+ * fileline.c (fileline_initialize): Likewise.
+ * Makefile.am (libbacktrace_la_SOURCES): Add atomic.c.
+ * configure, config.h.in, Makefile.in: Rebuild.
+
+2013-11-18 Jakub Jelinek <[email protected]>
+
+ * elf.c (SHN_UNDEF): Define.
+ (elf_initialize_syminfo): Add base_address argument. Ignore symbols
+ with st_shndx == SHN_UNDEF. Add base_address to address fields.
+ (elf_add): Adjust caller.
+
+ * elf.c (phdr_callback): Process info->dlpi_addr == 0 normally.
+
+2013-11-16 Ian Lance Taylor <[email protected]>
+
+ * backtrace.h (backtrace_create_state): Correct comment about
+ threading.
+
+2013-11-15 Ian Lance Taylor <[email protected]>
+
+ * backtrace.h (backtrace_syminfo): Update comment and parameter
+ name to take any address, not just a PC value.
+ * elf.c (STT_OBJECT): Define.
+ (elf_nosyms): Rename parameter pc to addr.
+ (elf_symbol_search): Rename local variable pc to addr.
+ (elf_initialize_syminfo): Add STT_OBJECT symbols to elf_symbols.
+ (elf_syminfo): Rename parameter pc to addr.
+ * btest.c (global): New global variable.
+ (test5): New test.
+ (main): Call test5.
+
+2013-10-17 Ian Lance Taylor <[email protected]>
+
+ * elf.c (elf_add): Don't get the wrong offsets if a debug section
+ is missing.
+
+2013-10-15 David Malcolm <[email protected]>
+
+ * configure.ac: Add --enable-host-shared, setting up
+ pre-existing PIC_FLAG variable within Makefile.am et al.
+ * configure: Regenerate.
+
+2013-09-20 Alan Modra <[email protected]>
+
+ * configure: Regenerate.
+
+2013-07-23 Alexander Monakov <[email protected]>
+
+ * elf.c (elf_syminfo): Loop over the elf_syminfo_data chain.
+
+2013-07-23 Alexander Monakov <[email protected]>
+
+ * elf.c (backtrace_initialize): Pass elf_fileline_fn to
+ dl_iterate_phdr callbacks.
+
+2013-03-25 Ian Lance Taylor <[email protected]>
+
+ * alloc.c: #include <sys/types.h>.
+ * mmap.c: Likewise.
+
+2013-01-31 Ian Lance Taylor <[email protected]>
+
+ * dwarf.c (read_function_info): Permit fvec parameter to be NULL.
+ (dwarf_lookup_pc): Don't use ddata->fvec if threaded.
+
+2013-01-25 Jakub Jelinek <[email protected]>
+
+ PR other/56076
+ * dwarf.c (read_line_header): Don't crash if DW_AT_comp_dir
+ attribute was not seen.
+
+2013-01-16 Ian Lance Taylor <[email protected]>
+
+ * dwarf.c (struct unit): Add filename and abs_filename fields.
+ (build_address_map): Set new fields when reading unit.
+ (dwarf_lookup_pc): If we don't find an entry in the line table,
+ just return the main file name.
+
+2013-01-14 Richard Sandiford <[email protected]>
+
+ Update copyright years.
+
+2013-01-01 Ian Lance Taylor <[email protected]>
+
+ PR bootstrap/54834
+ * Makefile.am (AM_CPPFLAGS): Remove -I ../gcc/include and -I
+ $(MULTIBUILDTOP)/../../gcc/include.
+ * Makefile.in: Rebuild.
+
+2013-01-01 Ian Lance Taylor <[email protected]>
+
+ PR other/55536
+ * mmap.c (backtrace_alloc): Don't call sync functions if not
+ threaded.
+ (backtrace_free): Likewise.
+
+2012-12-12 John David Anglin <[email protected]>
+
+ * mmapio.c: Define MAP_FAILED if not defined.
+
+2012-12-11 Jakub Jelinek <[email protected]>
+
+ PR bootstrap/54926
+ * Makefile.am (AM_CFLAGS): Remove -frandom-seed=$@.
+ * configure.ac: If --with-target-subdir, add -frandom-seed=$@
+ to EXTRA_FLAGS unconditionally, otherwise check whether the compiler
+ accepts it.
+ * Makefile.in: Regenerated.
+ * configure: Regenerated.
+
+2012-12-07 Jakub Jelinek <[email protected]>
+
+ PR bootstrap/54926
+ * Makefile.am (AM_CFLAGS): Add -frandom-seed=$@.
+ * Makefile.in: Regenerated.
+
+2012-11-20 Ian Lance Taylor <[email protected]>
+
+ * dwarf.c (read_attribute): Always clear val.
+
+2012-11-13 Ian Lance Taylor <[email protected]>
+
+ PR other/55312
+ * configure.ac: Only add -Werror if building a target library.
+ * configure: Rebuild.
+
+2012-11-12 Ian Lance Taylor <[email protected]>
+ Rainer Orth <[email protected]>
+ Gerald Pfeifer <[email protected]>
+
+ * configure.ac: Check for getexecname.
+ * fileline.c: #include <errno.h>. Define getexecname if not
+ available.
+ (fileline_initialize): Try to find the executable in a few
+ different ways.
+ * print.c (error_callback): Only print the filename if it came
+ from the backtrace state.
+ * configure, config.h.in: Rebuild.
+
+2012-10-29 Ian Lance Taylor <[email protected]>
+
+ * mmap.c (backtrace_vector_release): Correct last patch: add
+ aligned, not size.
+
+2012-10-29 Ian Lance Taylor <[email protected]>
+
+ * mmap.c (backtrace_vector_release): Make sure freed block is
+ aligned on 8-byte boundary.
+
+2012-10-26 Ian Lance Taylor <[email protected]>
+
+ PR other/55087
+ * posix.c (backtrace_open): Add does_not_exist parameter.
+ * elf.c (phdr_callback): Do not warn if shared library could not
+ be opened.
+ * fileline.c (fileline_initialize): Update calls to
+ backtrace_open.
+ * internal.h (backtrace_open): Update declaration.
+
+2012-10-26 Jack Howarth <[email protected]>
+
+ PR target/55061
+ * configure.ac: Check for _Unwind_GetIPInfo function declaration.
+ * configure: Regenerate.
+
+2012-10-24 Ian Lance Taylor <[email protected]>
+
+ PR target/55061
+ * configure.ac: Check whether -funwind-tables option works.
+ * configure: Rebuild.
+
+2012-10-11 Ian Lance Taylor <[email protected]>
+
+ * configure.ac: Do not use dl_iterate_phdr on Solaris 10.
+ * configure: Rebuild.
+
+2012-10-10 Ian Lance Taylor <[email protected]>
+
+ * elf.c: Rename all Elf typedefs to start with b_elf, and be all
+ lower case.
+
+2012-10-10 Hans-Peter Nilsson <[email protected]>
+
+ * elf.c (elf_add_syminfo_data): Add casts to avoid warning.
+
+2012-10-09 Ian Lance Taylor <[email protected]>
+
+ * dwarf.c (dwarf_fileline): Add cast to avoid warning.
+ (backtrace_dwarf_add): Likewise.
+
+2012-10-09 Ian Lance Taylor <[email protected]>
+
+ Add support for tracing through shared libraries.
+ * configure.ac: Check for link.h and dl_iterate_phdr.
+ * elf.c: #include <link.h> if system has dl_iterate_phdr. #undef
+ ELF macros before #defining them.
+ (dl_phdr_info, dl_iterate_phdr): Define if system does not have
+ dl_iterate_phdr.
+ (struct elf_syminfo_data): Add next field.
+ (elf_initialize_syminfo): Initialize next field.
+ (elf_add_syminfo_data): New static function.
+ (elf_add): New static function, broken out of
+ backtrace_initialize. Call backtrace_dwarf_add instead of
+ backtrace_dwarf_initialize.
+ (struct phdr_data): Define.
+ (phdr_callback): New static function.
+ (backtrace_initialize): Call elf_add.
+ * dwarf.c (struct dwarf_data): Add next and base_address fields.
+ (add_unit_addr): Add base_address parameter. Change all callers.
+ (add_unit_ranges, build_address_map): Likewise.
+ (add_line): Add ddata parameter. Change all callers.
+ (read_line_program, add_function_range): Likewise.
+ (dwarf_lookup_pc): New static function, broken out of
+ dwarf_fileline.
+ (dwarf_fileline): Call dwarf_lookup_pc.
+ (build_dwarf_data): New static function.
+ (backtrace_dwarf_add): New function.
+ (backtrace_dwarf_initialize): Remove.
+ * internal.h (backtrace_dwarf_initialize): Don't declare.
+ (backtrace_dwarf_add): Declare.
+ * configure, config.h.in: Rebuild.
+
+2012-10-04 Gerald Pfeifer <[email protected]>
+
+ * btest.c (f23): Avoid uninitialized variable warning.
+
+2012-10-04 Ian Lance Taylor <[email protected]>
+
+ * dwarf.c: If the system header files do not declare strnlen,
+ provide our own version.
+
+2012-10-03 Ian Lance Taylor <[email protected]>
+
+ * dwarf.c (read_uleb128): Fix overflow test.
+ (read_sleb128): Likewise.
+ (build_address_map): Don't change unit_buf.start.
+
+2012-10-02 Uros Bizjak <[email protected]>
+
+ PR other/54761
+ * configure.ac (EXTRA_FLAGS): New.
+ * Makefile.am (AM_FLAGS): Add $(EXTRA_FLAGS).
+ * configure, Makefile.in: Regenerate.
+
+2012-09-29 Ian Lance Taylor <[email protected]>
+
+ PR other/54749
+ * fileline.c (fileline_initialize): Pass errnum as -1 when
+ reporting that we could not read executable information after a
+ previous failure.
+
+2012-09-27 Ian Lance Taylor <[email protected]>
+
+ PR bootstrap/54732
+ * configure.ac: Add no-dependencies to AM_INIT_AUTOMAKE.
+ * Makefile.am: Add dependencies for all objects.
+ * configure, aclocal.m4, Makefile.in: Rebuild.
+
+2012-09-27 Ian Lance Taylor <[email protected]>
+
+ PR other/54726
+ * elf.c (backtrace_initialize): Set *fileln_fn, not
+ state->fileln_fn.
+
+2012-09-19 Ian Lance Taylor <[email protected]>
+
+ * configure.ac: Only use GCC_CHECK_UNWIND_GETIPINFO when compiled
+ as a target library.
+ * configure: Rebuild.
+
+2012-09-19 Rainer Orth <[email protected]>
+ Ian Lance Taylor <[email protected]>
+
+ * configure.ac (GCC_HEADER_STDINT): Invoke.
+ * backtrace.h: If we can't find <stdint.h>, use "gstdint.h".
+ * btest.c: Don't include <stdint.h>.
+ * dwarf.c: Likewise.
+ * configure, aclocal.m4, Makefile.in, config.h.in: Rebuild.
+
+2012-09-18 Ian Lance Taylor <[email protected]>
+
+ PR bootstrap/54623
+ * Makefile.am (AM_CPPFLAGS): Define.
+ (AM_CFLAGS): Remove -I options.
+ * Makefile.in: Rebuild.
+
+2012-09-18 Ian Lance Taylor <[email protected]>
+
+ * posix.c (O_BINARY): Define if not defined.
+ (backtrace_open): Pass O_BINARY to open. Only call fcntl if
+ HAVE_FCNTL is defined.
+ * configure.ac: Test for the fcntl function.
+ * configure, config.h.in: Rebuild.
+
+2012-09-18 Ian Lance Taylor <[email protected]>
+
+ * btest.c (test1, test2, test3, test4): Add the unused attribute.
+
+2012-09-18 Ian Lance Taylor <[email protected]>
+
+ * dwarf.c: Correct test of HAVE_DECL_STRNLEN.
+
+2012-09-18 Ian Lance Taylor <[email protected]>
+
+ * configure.ac: Add AC_USE_SYSTEM_EXTENSIONS.
+ * mmapio.c: Don't define _GNU_SOURCE.
+ * configure, config.h.in: Rebuild.
+
+2012-09-18 Ian Lance Taylor <[email protected]>
+
+ * configure.ac: Check whether strnlen is declared.
+ * dwarf.c: Declare strnlen if not declared.
+ * configure, config.h.in: Rebuild.
+
+2012-09-18 Rainer Orth <[email protected]>
+
+ * fileline.c: Include <stdlib.h>.
+ * mmap.c: Likewise.
+
+2012-09-17 Ian Lance Taylor <[email protected]>
+
+ PR bootstrap/54611
+ * nounwind.c (backtrace_full): Rename from backtrace. Add state
+ parameter.
+
+2012-09-17 Gerald Pfeifer <[email protected]>
+
+ PR bootstrap/54611
+ * nounwind.c (backtrace_simple): Add state parameter.
+
+2012-09-17 Ian Lance Taylor <[email protected]>
+
+ PR bootstrap/54609
+ * unknown.c (unknown_fileline): Add state parameter, remove
+ fileline_data parameter, name error_callback parameter.
+ (backtrace_initialize): Add state parameter.
+
+2012-09-17 Ian Lance Taylor <[email protected]>
+
+ * Initial implementation.
+
+Copyright (C) 2012-2017 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
diff --git a/rpython/rlib/rvmprof/src/shared/libbacktrace/ChangeLog.jit
b/rpython/rlib/rvmprof/src/shared/libbacktrace/ChangeLog.jit
new file mode 100644
--- /dev/null
+++ b/rpython/rlib/rvmprof/src/shared/libbacktrace/ChangeLog.jit
@@ -0,0 +1,14 @@
+2014-09-24 David Malcolm <[email protected]>
+
+ * ChangeLog.jit: Add copyright footer.
+
+2013-10-03 David Malcolm <[email protected]>
+
+ * configure.ac: Add --enable-host-shared.
+ * configure: Regenerate.
+
+Copyright (C) 2013-2014 Free Software Foundation, Inc.
+
+Copying and distribution of this file, with or without modification,
+are permitted in any medium without royalty provided the copyright
+notice and this notice are preserved.
diff --git a/rpython/rlib/rvmprof/src/shared/libbacktrace/Makefile
b/rpython/rlib/rvmprof/src/shared/libbacktrace/Makefile
new file mode 100644
--- /dev/null
+++ b/rpython/rlib/rvmprof/src/shared/libbacktrace/Makefile
@@ -0,0 +1,770 @@
+# Makefile.in generated by automake 1.11.6 from Makefile.am.
+# Makefile. Generated from Makefile.in by configure.
+
+# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
+# This Makefile.in is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+
+
+# Makefile.am -- Backtrace Makefile.
+# Copyright (C) 2012-2016 Free Software Foundation, Inc.
+
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are
+# met:
+
+# (1) Redistributions of source code must retain the above copyright
+# notice, this list of conditions and the following disclaimer.
+
+# (2) Redistributions in binary form must reproduce the above copyright
+# notice, this list of conditions and the following disclaimer in
+# the documentation and/or other materials provided with the
+# distribution.
+
+# (3) The name of the author may not be used to
+# endorse or promote products derived from this software without
+# specific prior written permission.
+
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
+# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
+# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
+# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+# POSSIBILITY OF SUCH DAMAGE.
+
+
+am__make_dryrun = \
+ { \
+ am__dry=no; \
+ case $$MAKEFLAGS in \
+ *\\[\ \ ]*) \
+ echo 'am--echo: ; @echo "AM" OK' | $(MAKE) -f - 2>/dev/null \
+ | grep '^AM OK$$' >/dev/null || am__dry=yes;; \
+ *) \
+ for am__flg in $$MAKEFLAGS; do \
+ case $$am__flg in \
+ *=*|--*) ;; \
+ *n*) am__dry=yes; break;; \
+ esac; \
+ done;; \
+ esac; \
+ test $$am__dry = yes; \
+ }
+pkgdatadir = $(datadir)/libbacktrace
+pkgincludedir = $(includedir)/libbacktrace
+pkglibdir = $(libdir)/libbacktrace
+pkglibexecdir = $(libexecdir)/libbacktrace
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+install_sh_DATA = $(install_sh) -c -m 644
+install_sh_PROGRAM = $(install_sh) -c
+install_sh_SCRIPT = $(install_sh) -c
+INSTALL_HEADER = $(INSTALL_DATA)
+transform = $(program_transform_name)
+NORMAL_INSTALL = :
+PRE_INSTALL = :
+POST_INSTALL = :
+NORMAL_UNINSTALL = :
+PRE_UNINSTALL = :
+POST_UNINSTALL = :
+build_triplet = x86_64-pc-linux-gnu
+host_triplet = x86_64-pc-linux-gnu
+target_triplet = x86_64-pc-linux-gnu
+check_PROGRAMS = $(am__EXEEXT_1)
+am__append_1 = btest stest
+subdir = .
+DIST_COMMON = README ChangeLog $(srcdir)/Makefile.in \
+ $(srcdir)/Makefile.am $(top_srcdir)/configure \
+ $(am__configure_deps) $(srcdir)/config.h.in \
+ $(srcdir)/../mkinstalldirs $(srcdir)/backtrace-supported.h.in
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+am__aclocal_m4_deps = $(top_srcdir)/../config/lead-dot.m4 \
+ $(top_srcdir)/../config/multi.m4 \
+ $(top_srcdir)/../config/override.m4 \
+ $(top_srcdir)/../config/stdint.m4 \
+ $(top_srcdir)/../config/unwind_ipinfo.m4 \
+ $(top_srcdir)/../config/warnings.m4 \
+ $(top_srcdir)/../libtool.m4 $(top_srcdir)/../ltoptions.m4 \
+ $(top_srcdir)/../ltsugar.m4 $(top_srcdir)/../ltversion.m4 \
+ $(top_srcdir)/../lt~obsolete.m4 $(top_srcdir)/configure.ac
+am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
+ $(ACLOCAL_M4)
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno config.status.lineno
+mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
+CONFIG_HEADER = config.h
+CONFIG_CLEAN_FILES = backtrace-supported.h
+CONFIG_CLEAN_VPATH_FILES =
+LTLIBRARIES = $(noinst_LTLIBRARIES)
+am__DEPENDENCIES_1 =
+am_libbacktrace_la_OBJECTS = atomic.lo dwarf.lo fileline.lo posix.lo \
+ print.lo sort.lo state.lo
+libbacktrace_la_OBJECTS = $(am_libbacktrace_la_OBJECTS)
+am__EXEEXT_1 = btest$(EXEEXT) stest$(EXEEXT)
+am_btest_OBJECTS = btest-btest.$(OBJEXT)
+btest_OBJECTS = $(am_btest_OBJECTS)
+btest_DEPENDENCIES = libbacktrace.la
+btest_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(btest_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+am_stest_OBJECTS = stest.$(OBJEXT)
+stest_OBJECTS = $(am_stest_OBJECTS)
+stest_DEPENDENCIES = libbacktrace.la
+DEFAULT_INCLUDES = -I.
+depcomp =
+am__depfiles_maybe =
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
+ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
+ --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \
+ $(LDFLAGS) -o $@
+SOURCES = $(libbacktrace_la_SOURCES) $(EXTRA_libbacktrace_la_SOURCES) \
+ $(btest_SOURCES) $(stest_SOURCES)
+MULTISRCTOP =
+MULTIBUILDTOP =
+MULTIDIRS =
+MULTISUBDIR =
+MULTIDO = true
+MULTICLEAN = true
+am__can_run_installinfo = \
+ case $$AM_UPDATE_INFO_DIR in \
+ n|no|NO) false;; \
+ *) (install-info --version) >/dev/null 2>&1;; \
+ esac
+ETAGS = etags
+CTAGS = ctags
+am__tty_colors = \
+red=; grn=; lgn=; blu=; std=
+ACLOCAL = ${SHELL} /home/rich/src/gcc/missing --run aclocal-1.11
+ALLOC_FILE = mmap.lo
+AMTAR = $${TAR-tar}
+AR = ar
+AUTOCONF = ${SHELL} /home/rich/src/gcc/missing --run autoconf
+AUTOHEADER = ${SHELL} /home/rich/src/gcc/missing --run autoheader
+AUTOMAKE = ${SHELL} /home/rich/src/gcc/missing --run automake-1.11
+AWK = gawk
+BACKTRACE_FILE = backtrace.lo simple.lo
+BACKTRACE_SUPPORTED = 1
+BACKTRACE_SUPPORTS_DATA = 1
+BACKTRACE_SUPPORTS_THREADS = 1
+BACKTRACE_USES_MALLOC = 0
+CC = gcc
+CFLAGS = -g -O2
+CPP = gcc -E
+CPPFLAGS =
+CYGPATH_W = echo
+DEFS = -DHAVE_CONFIG_H
+DSYMUTIL =
+DUMPBIN =
+ECHO_C =
+ECHO_N = -n
+ECHO_T =
+EGREP = /usr/bin/grep -E
+EXEEXT =
+EXTRA_FLAGS = -funwind-tables -frandom-seed=$@
+FGREP = /usr/bin/grep -F
+FORMAT_FILE = elf.lo
+GREP = /usr/bin/grep
+INSTALL = /usr/bin/install -c
+INSTALL_DATA = ${INSTALL} -m 644
+INSTALL_PROGRAM = ${INSTALL}
+INSTALL_SCRIPT = ${INSTALL}
+INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
+LD = /usr/bin/ld -m elf_x86_64
+LDFLAGS =
+LIBOBJS =
+LIBS =
+LIBTOOL = $(SHELL) $(top_builddir)/libtool
+LIPO =
+LN_S = ln -s
+LTLIBOBJS =
+MAINT = #
+MAKEINFO = ${SHELL} /home/rich/src/gcc/missing --run makeinfo
+MKDIR_P = /usr/bin/mkdir -p
+NM = /usr/bin/nm -B
+NMEDIT =
+OBJDUMP = objdump
+OBJEXT = o
+OTOOL =
+OTOOL64 =
+PACKAGE = libbacktrace
+PACKAGE_BUGREPORT =
+PACKAGE_NAME = package-unused
+PACKAGE_STRING = package-unused version-unused
+PACKAGE_TARNAME = libbacktrace
+PACKAGE_URL =
+PACKAGE_VERSION = version-unused
+PATH_SEPARATOR = :
+PIC_FLAG =
+RANLIB = ranlib
+SED = /usr/bin/sed
+SET_MAKE =
+SHELL = /bin/sh
+STRIP = strip
+VERSION = version-unused
+VIEW_FILE = mmapio.lo
+WARN_FLAGS = -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
-Wold-style-definition -Wmissing-format-attribute -Wcast-qual
+abs_builddir = /home/rich/src/gcc/libbacktrace
+abs_srcdir = /home/rich/src/gcc/libbacktrace
+abs_top_builddir = /home/rich/src/gcc/libbacktrace
+abs_top_srcdir = /home/rich/src/gcc/libbacktrace
+ac_ct_CC = gcc
+ac_ct_DUMPBIN =
+am__leading_dot = .
+am__tar = $${TAR-tar} chof - "$$tardir"
+am__untar = $${TAR-tar} xf -
+bindir = ${exec_prefix}/bin
+build = x86_64-pc-linux-gnu
+build_alias =
+build_cpu = x86_64
+build_os = linux-gnu
+build_vendor = pc
+builddir = .
+datadir = ${datarootdir}
+datarootdir = ${prefix}/share
+docdir = ${datarootdir}/doc/${PACKAGE_TARNAME}
+dvidir = ${docdir}
+exec_prefix = ${prefix}
+host = x86_64-pc-linux-gnu
+host_alias =
+host_cpu = x86_64
+host_os = linux-gnu
+host_vendor = pc
+htmldir = ${docdir}
+includedir = ${prefix}/include
+infodir = ${datarootdir}/info
+install_sh = ${SHELL} /home/rich/src/gcc/install-sh
+libdir = ${exec_prefix}/lib
+libexecdir = ${exec_prefix}/libexec
+libtool_VERSION = 1:0:0
+localedir = ${datarootdir}/locale
+localstatedir = ${prefix}/var
+mandir = ${datarootdir}/man
+mkdir_p = /usr/bin/mkdir -p
+multi_basedir =
+oldincludedir = /usr/include
+pdfdir = ${docdir}
+prefix = /usr/local
+program_transform_name = s,x,x,
+psdir = ${docdir}
+sbindir = ${exec_prefix}/sbin
+sharedstatedir = ${prefix}/com
+srcdir = .
+sysconfdir = ${prefix}/etc
+target = x86_64-pc-linux-gnu
+target_alias =
+target_cpu = x86_64
+target_os = linux-gnu
+target_vendor = pc
+top_build_prefix =
+top_builddir = .
+top_srcdir = .
+ACLOCAL_AMFLAGS = -I .. -I ../config
+AM_CPPFLAGS = -I $(top_srcdir)/../include -I $(top_srcdir)/../libgcc \
+ -I ../libgcc
+
+AM_CFLAGS = $(EXTRA_FLAGS) $(WARN_FLAGS) $(PIC_FLAG)
+noinst_LTLIBRARIES = libbacktrace.la
+libbacktrace_la_SOURCES = \
+ backtrace.h \
+ atomic.c \
+ dwarf.c \
+ fileline.c \
+ internal.h \
+ posix.c \
+ print.c \
+ sort.c \
+ state.c
+
+BACKTRACE_FILES = \
+ backtrace.c \
+ simple.c \
+ nounwind.c
+
+FORMAT_FILES = \
+ elf.c \
+ pecoff.c \
+ unknown.c
+
+VIEW_FILES = \
+ read.c \
+ mmapio.c
+
+ALLOC_FILES = \
+ alloc.c \
+ mmap.c
+
+EXTRA_libbacktrace_la_SOURCES = \
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit