mirror of
https://git.freebsd.org/ports.git
synced 2025-06-02 19:36:28 -04:00
DTrace consumer for Python based on libdtrace. Currently this package provides two modules: one wraps libdtrace using ctypes. The other one uses cython. WWW: http://tmetsch.github.com/python-dtrace/ PR: 217419 Submitted by: Graeme Jenkinson <gcj21@cl.cam.ac.uk> (with changes)
43 lines
1.4 KiB
Cython
43 lines
1.4 KiB
Cython
--- dtrace_cython/dtrace_h.pxd.orig 2015-01-24 23:30:44 UTC
|
|
+++ dtrace_cython/dtrace_h.pxd
|
|
@@ -7,7 +7,7 @@ cdef extern from "libelf_workaround.h":
|
|
pass
|
|
|
|
|
|
-IF UNAME_SYSNAME == "Darwin":
|
|
+IF UNAME_SYSNAME == "Darwin" or UNAME_SYSNAME == "FreeBSD":
|
|
cdef extern from "stdint.h":
|
|
# needed for quantize mths.
|
|
cdef int64_t INT64_MAX
|
|
@@ -18,7 +18,6 @@ ELSE:
|
|
cdef int64_t INT64_MAX
|
|
cdef int64_t INT64_MIN
|
|
|
|
-
|
|
cdef extern from "sys/dtrace.h":
|
|
|
|
ctypedef enum agg_actions:
|
|
@@ -34,10 +33,12 @@ cdef extern from "sys/dtrace.h":
|
|
DTRACEAGG_QUANTIZE = (DTRACEACT_AGGREGATION + 7)
|
|
DTRACEAGG_LQUANTIZE = (DTRACEACT_AGGREGATION + 8)
|
|
|
|
- ctypedef enum quantize_types:
|
|
+ cdef int DTRACE_QUANTIZE_NBUCKETS
|
|
+ cdef int DTRACE_QUANTIZE_ZEROBUCKET
|
|
+ #ctypedef enum quantize_types:
|
|
# NBBY = 8
|
|
- DTRACE_QUANTIZE_NBUCKETS = (((sizeof (uint64_t) * 8) - 1) * 2 + 1)
|
|
- DTRACE_QUANTIZE_ZEROBUCKET = ((sizeof (uint64_t) * 8) - 1)
|
|
+ # DTRACE_QUANTIZE_NBUCKETS = (((sizeof (uint64_t) * 8) - 1) * 2 + 1)
|
|
+ # DTRACE_QUANTIZE_ZEROBUCKET = ((sizeof (uint64_t) * 8) - 1)
|
|
|
|
ctypedef struct dtrace_recdesc_t:
|
|
# Taken from sys/dtrace.h:931
|
|
@@ -56,7 +57,6 @@ cdef extern from "sys/dtrace.h":
|
|
cdef int32_t DTRACE_LQUANTIZE_BASE(long x)
|
|
cdef int64_t DTRACE_QUANTIZE_BUCKETVAL(long buck)
|
|
|
|
-
|
|
cdef extern from "dtrace.h":
|
|
|
|
ctypedef enum dtrace_probespec_t:
|