ceval.c.ed   [plain text]


/^#include <ctype.h>/a

#ifdef ENABLE_DTRACE

#include "pydtrace.h"

#define PYTHON_DTRACE_ENTRY(py_frame)					\
	if (PYTHON_FUNCTION_ENTRY_ENABLED()) {				\
		char *fl_name = ((PyStringObject *)py_frame->f_code->	\
				 co_filename)->ob_sval;			\
		char *fn_name = ((PyStringObject *)py_frame->f_code->	\
				 co_name)->ob_sval;			\
									\
		PYTHON_FUNCTION_ENTRY(fl_name, fn_name, py_frame->f_lineno,	\
			      py_frame->f_code->co_argcount);		\
	}

#define PYTHON_DTRACE_RETURN(py_frame, object)				\
	if (PYTHON_FUNCTION_RETURN_ENABLED()) {				\
		char *fl_name = ((PyStringObject *)py_frame->f_code->	\
				 co_filename)->ob_sval;			\
		char *fn_name = ((PyStringObject *)py_frame->f_code->	\
				 co_name)->ob_sval;			\
									\
		PYTHON_FUNCTION_RETURN(fl_name, fn_name, object);	\
	}

#else

#define PYTHON_DTRACE_ENTRY(py_frame) /* nothing */
#define PYTHON_DTRACE_RETURN(py_frame, object) /* nothing */

#endif /* ENABLE_DTRACE */
.
/case CALL_FUNCTION:/a
.
/#ifdef WITH_TSC/i

			PYTHON_DTRACE_ENTRY(f);

.
/if (x != NULL)/c
			if (x != NULL) {
				PYTHON_DTRACE_RETURN(f, (char *)x->ob_type->tp_name);
.
/continue;/a
			}

			PYTHON_DTRACE_RETURN(f, "error");

.
w