File: profile.h

package info (click to toggle)
psyco 1.5.1-3
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 1,864 kB
  • ctags: 3,295
  • sloc: ansic: 24,491; python: 5,573; perl: 1,309; makefile: 166; sh: 1
file content (41 lines) | stat: -rw-r--r-- 1,280 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
 /***************************************************************/
/***             Profilers to collect statistics               ***/
 /***************************************************************/

#ifndef _PROFILE_H
#define _PROFILE_H


#include "psyco.h"
#include "Python/frames.h"
#include <compile.h>
#include <frameobject.h>


/* enable profiling, see comments in profile.c for the various methods */
EXTERNFN bool psyco_set_profiler(void (*rs)(void*, int));
/* where 'rs' may be: */
EXTERNFN void psyco_rs_profile(void*, int);
#if HAVE_DYN_COMPILE
EXTERNFN void psyco_rs_fullcompile(void*, int);
EXTERNFN void psyco_rs_nocompile(void*, int);
#endif

/* enable the same profiling feature on all threads */
EXTERNFN void psyco_profile_threads(int start);

#if HAVE_DYN_COMPILE
/* call this when it is detected to be worthwhile to give a frame a
   little Psyco help */
EXTERNFN bool psyco_turbo_frame(PyFrameObject* frame);

/* call this to mark the code object as being worthwhile to
   systematically accelerate */
EXTERNFN void psyco_turbo_code(PyCodeObject* code, int recursion);

/* call this to accelerate all frames currently executing the given code */
EXTERNFN void psyco_turbo_frames(PyCodeObject* code);
#endif /* HAVE_DYN_COMPILE */


#endif /* _PROFILE_H */