- Timestamp:
- 07/19/2012 05:57:56 AM (10 months ago)
- Location:
- trunk
- Files:
-
- 1 added
- 3 removed
- 9 modified
- 1 copied
- 1 moved
-
. (modified) (1 prop)
-
.cvsignore (deleted)
-
Makefile.frag (modified) (3 diffs)
-
devel (modified) (1 prop)
-
devel/make (added)
-
devel/prepare (modified) (1 diff)
-
devel/prepare.cfg.example (moved) (moved from trunk/devel/prepare.inc.example) (1 diff)
-
devel/run (modified) (7 diffs)
-
devel/test.mak (modified) (2 diffs)
-
make (deleted)
-
processor/head.m4 (modified) (1 diff)
-
run (deleted)
-
xcache.c (modified) (1 diff)
-
xcache/xc_mem.c (modified) (5 diffs)
-
xcache/xc_processor.c (copied) (copied from trunk/xcache/xc_processor.c) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:ignore
-
old new 1 1 acinclude.m4 2 2 aclocal.m4 3 autom4te.cache 3 4 build 4 5 config.cache … … 15 16 conftest.c 16 17 .deps 18 devel.ini 19 devel.php 20 .gdb_history 17 21 include 18 22 includes.i … … 27 31 mkinstalldirs 28 32 modules 29 processor.h 30 processor.out 31 processor_real.c 33 prepare.devel.inc 32 34 run-tests.php 33 35 structinfo.m4 34 autom4te.cache36 .svnignore 35 37 tags 36 prepare.devel.inc 38 xc_processor.c 39 xc_processor.h 40 xc_processor.out.c
-
- Property svn:ignore
-
trunk/Makefile.frag
r997 r998 1 1 XCACHE_PROC_SRC=$(srcdir)/processor/main.m4 2 XCACHE_PROC_OUT=$(builddir)/processor.out 3 XCACHE_PROC_C=$(builddir)/xc ache/xc_processor_real.c4 XCACHE_PROC_H=$(builddir)/xc ache/xc_processor.h2 XCACHE_PROC_OUT=$(builddir)/processor.out.c 3 XCACHE_PROC_C=$(builddir)/xc_processor.c.h 4 XCACHE_PROC_H=$(builddir)/xc_processor.h 5 5 XCACHE_INCLUDES_SRC=$(srcdir)/includes.c 6 6 XCACHE_INCLUDES_I=$(builddir)/includes.i … … 26 26 -$(XCACHE_INDENT) < $(XCACHE_PROC_OUT) > $(XCACHE_PROC_C).tmp && mv $(XCACHE_PROC_C).tmp $(XCACHE_PROC_C) 27 27 28 $(builddir)/xcache/xc_processor.lo: $(XCACHE_PROC_C) $(XCACHE_PROC_H) $(srcdir)/xcache/xc_processor.c28 $(builddir)/xcache/xc_processor.lo: $(XCACHE_PROC_C) $(XCACHE_PROC_H) 29 29 30 $(builddir)/submodules/xc_disassembler.lo: $(XCACHE_PROC_H) $(srcdir)/xcache/xc_processor.c30 $(builddir)/submodules/xc_disassembler.lo: $(XCACHE_PROC_H) 31 31 32 32 $(builddir)/xc_opcode_spec.lo: $(srcdir)/xcache.h $(srcdir)/xc_opcode_spec.c $(srcdir)/xc_opcode_spec_def.h $(srcdir)/xc_const_string.h … … 35 35 36 36 xcachesvnclean: clean 37 cat $(srcdir)/.cvsignore | grep -v ^Makefile | grep -v ^config.nice | xargs rm -rf 37 -svn propget svn:ignore . > .svnignore.tmp 2>/dev/null && mv .svnignore.tmp .svnignore 38 cat .svnignore | grep -v devel | grep -v svnignore | grep -v ^Makefile | grep -v ^config.nice | xargs rm -rf 38 39 39 40 xcachetest: all -
trunk/devel
-
Property
svn:ignore set
to
run.cfg
prepare.cfg
-
Property
svn:ignore set
to
-
trunk/devel/prepare
r988 r998 2 2 SELF="$0" 3 3 4 if test -e prepare.inc ; then5 . prepare.inc4 if test -e devel/prepare.inc ; then 5 . devel/prepare.inc 6 6 else 7 echo prepare.inc is required, seeprepare.inc.example >&27 echo devel/prepare.inc is required, see devel/prepare.inc.example >&2 8 8 exit 9 9 fi -
trunk/devel/prepare.cfg.example
r988 r998 1 # copy this file as ../devel.prepare.incbefore modifying1 # copy this file as prepare.cfg before modifying 2 2 PHP4_x_DIR= 3 3 PHP5_0_DIR= -
trunk/devel/run
r995 r998 1 1 #!/bin/bash 2 2 # this script is for developers only 3 set -e 3 4 4 case "$1" in 5 . devel/run.cfg 6 if [[ ! -z $1 ]]; then 7 type=$1 8 fi 9 10 case "$type" in 5 11 prep*) 6 12 exec ./devel/prepare 13 ;; 14 xtest) 15 exec /usr/bin/make -f devel/test.mak 7 16 ;; 8 17 tags) … … 11 20 esac 12 21 13 . run.cfg14 15 22 basename=$(basename $(pwd)) 16 23 if echo $basename | grep -- - >/dev/null; then :; else 24 svn propget svn:ignore . > .svnignore 25 17 26 dirs=${dirs:-php5-debug} 18 19 27 for dir in $dirs; do 28 mkdir -p ../${basename}-${dir} 20 29 cd ../${basename}-${dir} || exit 30 lndir ../${basename} > /dev/null 21 31 22 32 pwd … … 30 40 xcachesrcdir=../$xcachebasename 31 41 32 rm -f php-src33 find -L . -type l | xargs rm -f34 lndir "$xcachesrcdir" >/dev/null35 find . -iname .\*.swp | xargs rm -f36 ln -sf ~/src/php/$phpbasename php-src37 for i in ~/src/php/$phpbasename/sapi/cgi/php{,-cgi}; do38 [[ -r $i ]] && ln -sf "$i" php-cgi39 done40 ln -sf ~/src/php/$phpbasename/sapi/cli/php php-cli41 42 42 if [[ ! -z $1 ]]; then 43 43 type=$1 … … 47 47 args=("$@") 48 48 elif [[ -z $args ]]; then 49 args=( test.php)49 args=(devel.php) 50 50 fi 51 51 fi 52 53 case "$type" in 54 reb*) 55 if [[ -r Makefile ]]; then 56 make xcachesvnclean 57 fi 58 ;; 59 esac 60 61 rm -f php-src 62 find -L . -type l | xargs rm -f 63 lndir "$xcachesrcdir" >/dev/null 64 find . -iname .\*.swp | xargs rm -f 65 ln -sf ~/src/php/$phpbasename php-src 66 for i in ~/src/php/$phpbasename/sapi/cgi/php{,-cgi}; do 67 if [[ -r $i ]]; then 68 ln -sf "$i" php-cgi 69 fi 70 done 71 ln -sf ~/src/php/$phpbasename/sapi/cli/php php-cli 52 72 53 73 case "$type" in … … 59 79 fi 60 80 export PATH=$PHPDIRS/$phpbasename/bin:$PATH 61 [[ -r Makefile ]] && make xcachesvnclean62 81 phpize --clean \ 63 82 && phpize \ … … 87 106 ;; 88 107 *) 89 cmd=(./php-cgi -q -c php.ini)108 cmd=(./php-cgi -q -c devel.ini) 90 109 "${cmd[@]}" -v 91 110 ;; … … 116 135 ;; 117 136 dc) 118 exec ./php-cli -c php.ini ./bin/phpdc.phpr "${args[@]}" | tee decompiled.php137 exec ./php-cli -c devel.ini ./bin/phpdc.phpr "${args[@]}" | tee decompiled.php 119 138 ;; 120 139 dop) 121 exec ./php-cli -c php.ini ./bin/phpdop.phpr "${args[@]}"140 exec ./php-cli -c devel.ini ./bin/phpdop.phpr "${args[@]}" 122 141 ;; 123 142 retest) -
trunk/devel/test.mak
r982 r998 4 4 OBJS=mem.o 5 5 CC=gcc 6 CFLAGS=-g -O0 - D TEST -Wall6 CFLAGS=-g -O0 -I. -D TEST -Wall 7 7 TEST=valgrind 8 8 9 9 all: mem 10 10 11 mem_test: mem.c12 $(CC) $(CFLAGS) -o mem_test mem.c11 mem_test: xcache/xc_mem.c xcache/xc_mem.h util/xc_trace.c util/xc_trace.h 12 $(CC) $(CFLAGS) -o mem_test xcache/xc_mem.c util/xc_trace.c 13 13 14 14 mem: mem_test … … 17 17 clean: 18 18 rm -f $(OBJS) $(EXES) 19 20 leakcheck:21 valgrind php -c test.ini test.ini -
trunk/processor/head.m4
r994 r998 13 13 #include "util/xc_align.h" 14 14 #include "xcache/xc_const_string.h" 15 #include "xc ache/xc_processor.h"15 #include "xc_processor.h" 16 16 #include "xcache_globals.h" 17 17 -
trunk/xcache.c
r997 r998 45 45 46 46 #include "xcache_globals.h" 47 #include "xc ache/xc_processor.h"47 #include "xc_processor.h" 48 48 #include "xcache/xc_const_string.h" 49 49 #include "xcache/xc_opcode_spec.h" -
trunk/xcache/xc_mem.c
r989 r998 1 1 #ifdef TEST 2 # include <limits.h>3 # include <stdio.h>2 # include <limits.h> 3 # include <stdio.h> 4 4 # define XCACHE_DEBUG 5 typedef int zend_bool; 6 # define ZEND_ATTRIBUTE_PTR_FORMAT(a, b, c) 7 # define zend_error(type, error) fprintf(stderr, "%s", error) 5 8 #else 6 # include <php.h>9 # include <php.h> 7 10 #endif 8 11 … … 18 21 #define XC_MEM_IMPL _xc_mem_mem_t 19 22 #include "xc_shm.h" 20 #include "xc_utils.h"23 // #include "xc_utils.h" 21 24 #include "util/xc_align.h" 22 25 #include "util/xc_trace.h" … … 323 326 /* {{{ testing */ 324 327 #undef CHECK 325 #define CHECK(a, msg) do { if ((a) == NULL) { puts(msg); return -1; } } while (0) 328 #define CHECK(a, msg) do { \ 329 if (!(a)) { \ 330 fprintf(stderr, "%s\n", msg); return -1; \ 331 } \ 332 } while (0) 333 326 334 #include <time.h> 327 335 … … 331 339 void *p; 332 340 void *memory; 333 xc_mem_t *mem;334 341 void **ptrs; 342 xc_mem_t mem_holder, *mem = &mem_holder; 335 343 int size, i; 336 344 … … 342 350 #endif 343 351 CHECK(memory = malloc(size), "OOM"); 344 CHECK(ptrs = malloc(size * sizeof(void *)), "OOM");345 CHECK(mem = xc_mem_init(memory, size), "Failed init memory allocator");352 CHECK(ptrs = malloc(size * sizeof(void *)), "OOM"); 353 CHECK(mem = xc_mem_init(memory, mem, size), "Failed init memory allocator"); 346 354 347 355 while ((p = xc_mem_malloc(mem, 1))) { 356 fprintf(stderr, "%d %p\n", count, ptrs); 348 357 ptrs[count ++] = p; 349 358 } -
trunk/xcache/xc_processor.c
r982 r998 1 #include " xc_processor_real.c"1 #include "../xc_processor.c.h"

