Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
9e3febb3
Commit
9e3febb3
authored
Jan 09, 2010
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better indentation for profiling macros.
parent
2621466b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
49 deletions
+51
-49
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+51
-49
No files found.
Cython/Compiler/Nodes.py
View file @
9e3febb3
...
...
@@ -5745,11 +5745,11 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
force_init_threads_utility_code
=
UtilityCode
(
proto
=
"""
#ifndef __PYX_FORCE_INIT_THREADS
#if PY_VERSION_HEX < 0x02040200
#define __PYX_FORCE_INIT_THREADS 1
#else
#define __PYX_FORCE_INIT_THREADS 0
#endif
#if PY_VERSION_HEX < 0x02040200
#define __PYX_FORCE_INIT_THREADS 1
#else
#define __PYX_FORCE_INIT_THREADS 0
#endif
#endif
"""
)
...
...
@@ -5760,62 +5760,64 @@ proto="""
profile_utility_code
=
UtilityCode
(
proto
=
"""
#ifndef CYTHON_PROFILE
#define CYTHON_PROFILE 1
#define CYTHON_PROFILE 1
#endif
#ifndef CYTHON_PROFILE_REUSE_FRAME
#define CYTHON_PROFILE_REUSE_FRAME 0
#define CYTHON_PROFILE_REUSE_FRAME 0
#endif
#if CYTHON_PROFILE
#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
#if CYTHON_PROFILE_REUSE_FRAME
#define CYTHON_FRAME_MODIFIER static
#define CYTHON_FRAME_DEL
#else
#define CYTHON_FRAME_MODIFIER
#define CYTHON_FRAME_DEL Py_DECREF(%(FRAME)s)
#endif
#define __Pyx_TraceDeclarations
\
\
static PyCodeObject *%(FRAME_CODE)s = NULL;
\
\
CYTHON_FRAME_MODIFIER PyFrameObject *%(FRAME)s = NULL;
\
\
int __Pyx_use_tracing = 0;
#include "compile.h"
#include "frameobject.h"
#include "traceback.h"
#define __Pyx_TraceCall(funcname, srcfile, firstlineno)
\
\
if (unlikely(PyThreadState_GET()->use_tracing && PyThreadState_GET()->c_profilefunc)) {
\
\
__Pyx_use_tracing = __Pyx_TraceSetupAndCall(&%(FRAME_CODE)s, &%(FRAME)s, funcname, srcfile, firstlineno);
\
\
}
#if CYTHON_PROFILE_REUSE_FRAME
#define CYTHON_FRAME_MODIFIER static
#define CYTHON_FRAME_DEL
#else
#define CYTHON_FRAME_MODIFIER
#define CYTHON_FRAME_DEL Py_DECREF(%(FRAME)s)
#endif
#define __Pyx_TraceException()
\
\
if (unlikely(__Pyx_use_tracing( && PyThreadState_GET()->use_tracing && PyThreadState_GET()->c_profilefunc) {
\
\
PyObject *exc_info = __Pyx_GetExceptionTuple();
\
\
if (exc_info) {
\
\
PyThreadState_GET()->c_profilefunc(
\
\
PyThreadState_GET()->c_profileobj, %(FRAME)s, PyTrace_EXCEPTION, exc_info);
\
\
Py_DECREF(exc_info);
\
\
}
\
\
}
#define __Pyx_TraceDeclarations
\
\
static PyCodeObject *%(FRAME_CODE)s = NULL;
\
\
CYTHON_FRAME_MODIFIER PyFrameObject *%(FRAME)s = NULL;
\
\
int __Pyx_use_tracing = 0;
#define __Pyx_TraceCall(funcname, srcfile, firstlineno)
\
\
if (unlikely(PyThreadState_GET()->use_tracing && PyThreadState_GET()->c_profilefunc)) {
\
\
__Pyx_use_tracing = __Pyx_TraceSetupAndCall(&%(FRAME_CODE)s, &%(FRAME)s, funcname, srcfile, firstlineno);
\
\
}
#define __Pyx_TraceException()
\
\
if (unlikely(__Pyx_use_tracing( && PyThreadState_GET()->use_tracing && PyThreadState_GET()->c_profilefunc) {
\
\
PyObject *exc_info = __Pyx_GetExceptionTuple();
\
\
if (exc_info) {
\
\
PyThreadState_GET()->c_profilefunc(
\
\
PyThreadState_GET()->c_profileobj, %(FRAME)s, PyTrace_EXCEPTION, exc_info);
\
\
Py_DECREF(exc_info);
\
\
}
\
\
}
#define __Pyx_TraceReturn(result)
\
\
if (unlikely(__Pyx_use_tracing) && PyThreadState_GET()->use_tracing && PyThreadState_GET()->c_profilefunc) {
\
\
PyThreadState_GET()->c_profilefunc(
\
\
PyThreadState_GET()->c_profileobj, %(FRAME)s, PyTrace_RETURN, (PyObject*)result);
\
\
CYTHON_FRAME_DEL;
\
\
}
static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno); /*proto*/
static int __Pyx_TraceSetupAndCall(PyCodeObject** code, PyFrameObject** frame, const char *funcname, const char *srcfile, int firstlineno); /*proto*/
#define __Pyx_TraceReturn(result)
\
\
if (unlikely(__Pyx_use_tracing) && PyThreadState_GET()->use_tracing && PyThreadState_GET()->c_profilefunc) {
\
\
PyThreadState_GET()->c_profilefunc(
\
\
PyThreadState_GET()->c_profileobj, %(FRAME)s, PyTrace_RETURN, (PyObject*)result);
\
\
CYTHON_FRAME_DEL;
\
\
}
#else
static PyCodeObject *__Pyx_createFrameCodeObject(const char *funcname, const char *srcfile, int firstlineno); /*proto*/
static int __Pyx_TraceSetupAndCall(PyCodeObject** code, PyFrameObject** frame, const char *funcname, const char *srcfile, int firstlineno); /*proto*/
#define __Pyx_TraceDeclarations
#define __Pyx_TraceCall(funcname, srcfile, firstlineno)
#define __Pyx_TraceException()
#define __Pyx_TraceReturn(result)
#else
#define __Pyx_TraceDeclarations
#define __Pyx_TraceCall(funcname, srcfile, firstlineno)
#define __Pyx_TraceException()
#define __Pyx_TraceReturn(result)
#endif /* CYTHON_PROFILE */
"""
%
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment