[PD-cvs] pd/src kernel.c,1.1.2.88,1.1.2.89
Mathieu Bouchard
matju at users.sourceforge.net
Sat Aug 18 20:12:45 CEST 2007
Update of /cvsroot/pure-data/pd/src
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28567
Modified Files:
Tag: desiredata
kernel.c
Log Message:
turn profiler off
Index: kernel.c
===================================================================
RCS file: /cvsroot/pure-data/pd/src/Attic/kernel.c,v
retrieving revision 1.1.2.88
retrieving revision 1.1.2.89
diff -C2 -d -r1.1.2.88 -r1.1.2.89
*** kernel.c 18 Aug 2007 07:06:10 -0000 1.1.2.88
--- kernel.c 18 Aug 2007 18:12:43 -0000 1.1.2.89
***************
*** 387,395 ****
static inline uint64 rdtsc() {uint64 x; __asm__ volatile (".byte 0x0f, 0x31":"=A"(x)); return x;}
#define ENTER(SELECTOR) if(pd_stackn >= STACKSIZE) {stackerror(x); return;} \
! pd_stack[pd_stackn].self = x; pd_stack[pd_stackn].s = SELECTOR; pd_stackn++; \
! uint64 t = rdtsc();
! #define LEAVE pd_stackn--; \
! if (x->_class->gobj) ((t_gobj *)x)->dix->elapsed += rdtsc() - t;
/* matju's 2007.07.14 inlet-based stack check needs to be implemented in:
--- 387,401 ----
static inline uint64 rdtsc() {uint64 x; __asm__ volatile (".byte 0x0f, 0x31":"=A"(x)); return x;}
+ #if 0
+ #define ENTER_PROF
+ #define LEAVE_PROF
+ #else
+ #define ENTER_PROF uint64 t = rdtsc();
+ #define LEAVE_PROF if (x->_class->gobj && ((t_gobj *)x)->dix) ((t_gobj *)x)->dix->elapsed += rdtsc() - t;
+ #endif
+
#define ENTER(SELECTOR) if(pd_stackn >= STACKSIZE) {stackerror(x); return;} \
! pd_stack[pd_stackn].self = x; pd_stack[pd_stackn].s = SELECTOR; pd_stackn++; ENTER_PROF
! #define LEAVE pd_stackn--; LEAVE_PROF
/* matju's 2007.07.14 inlet-based stack check needs to be implemented in:
More information about the Pd-cvs
mailing list