[SATYR PATCHv3 0/6] python base classes and distance functions

Martin Milata mmilata at redhat.com
Mon Jun 24 09:47:28 UTC 2013


(I'm a retard and did not really manage to do what the next sentence says; this
third version should fix it.)

(These revised patches only add type initialization to py_module.c which I
previously forgot. Only patches 2 and 3 are affected.)

This patchset adds distance functions for comparing pairs as well as lists of
threads regardless of their type, as per ticket #63.

The python bindings had to be significantly changed to take advantage of the
"type-agnostic" interface that was added in satyr in
7ef55a0d77016fc651e4fd5422a592eab083e6c7 (and further commits).

Martin Milata (6):
  Add getters/setters that will be used in py bindings
  python: base class for frames
  python: base classes for threads and stacktraces
  tests: refactor input file loading into common function
  python: distance computation between pair of threads
  python: type-agnostic distances for list of threads

 include/distance.h            |   5 +-
 include/frame.h               |   6 +
 include/stacktrace.h          |  12 ++
 include/thread.h              |  12 ++
 lib/core_frame.c              |   2 +
 lib/core_stacktrace.c         |   5 +
 lib/core_thread.c             |   6 +-
 lib/gdb_frame.c               |   2 +
 lib/gdb_stacktrace.c          |   5 +
 lib/gdb_thread.c              |   6 +-
 lib/generic_frame.c           |   9 ++
 lib/generic_frame.h           |   2 +
 lib/generic_stacktrace.c      |  15 +++
 lib/generic_stacktrace.h      |  11 ++
 lib/generic_thread.c          |  15 +++
 lib/generic_thread.h          |  18 ++-
 lib/internal_utils.h          |  19 ++-
 lib/java_frame.c              |   2 +
 lib/java_stacktrace.c         |   5 +
 lib/java_thread.c             |   6 +-
 lib/koops_frame.c             |   2 +
 lib/koops_stacktrace.c        |   7 +-
 lib/python_frame.c            |   2 +
 lib/python_stacktrace.c       |   7 +-
 python/Makefile.am            |   6 +
 python/py_base_frame.c        | 117 +++++++++++++++++
 python/py_base_frame.h        |  51 ++++++++
 python/py_base_stacktrace.c   | 293 ++++++++++++++++++++++++++++++++++++++++++
 python/py_base_stacktrace.h   |  64 +++++++++
 python/py_base_thread.c       | 244 +++++++++++++++++++++++++++++++++++
 python/py_base_thread.h       |  59 +++++++++
 python/py_gdb_frame.c         |  14 +-
 python/py_gdb_frame.h         |   8 +-
 python/py_gdb_stacktrace.c    |  94 ++++++--------
 python/py_gdb_stacktrace.h    |   9 +-
 python/py_gdb_thread.c        | 161 +++--------------------
 python/py_gdb_thread.h        |  14 +-
 python/py_java_frame.c        |  14 +-
 python/py_java_frame.h        |   8 +-
 python/py_java_stacktrace.c   | 147 +++------------------
 python/py_java_stacktrace.h   |  10 +-
 python/py_java_thread.c       | 130 ++-----------------
 python/py_java_thread.h       |  14 +-
 python/py_koops_frame.c       |  14 +-
 python/py_koops_frame.h       |   8 +-
 python/py_koops_stacktrace.c  | 141 ++------------------
 python/py_koops_stacktrace.h  |   7 +-
 python/py_metrics.c           |  45 ++++---
 python/py_module.c            |  36 ++++++
 python/py_python_frame.c      |  14 +-
 python/py_python_frame.h      |   8 +-
 python/py_python_stacktrace.c | 135 ++-----------------
 python/py_python_stacktrace.h |   7 +-
 tests/python/gdb.py           |  12 +-
 tests/python/java.py          |  11 +-
 tests/python/koops.py         |  17 +--
 tests/python/metrics.py       |  58 ++++++++-
 tests/python/python.py        |  15 +--
 tests/python/test_helpers.py  |   8 ++
 59 files changed, 1293 insertions(+), 881 deletions(-)
 create mode 100644 python/py_base_frame.c
 create mode 100644 python/py_base_frame.h
 create mode 100644 python/py_base_stacktrace.c
 create mode 100644 python/py_base_stacktrace.h
 create mode 100644 python/py_base_thread.c
 create mode 100644 python/py_base_thread.h

-- 
1.7.11.7



More information about the Crash-catcher mailing list