Changeset 288

Show
Ignore:
Timestamp:
02/13/07 15:54:41 (1 year ago)
Author:
bart
Message:

* Added a function to dump an eaccelerator class entry in debug.c
* Changed include order in mm.c because of eaccelerator.h include in debug.h

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • eaccelerator/trunk/ChangeLog

    r287 r288  
     12007-02-13  Bart Vanbrabant <bart.vanbrabant at zoeloelip.be> 
     2         
     3        * Added a function to dump an eaccelerator class entry in debug.c 
     4        * Changed include order in mm.c because of eaccelerator.h include in debug.h  
     5 
    162007-01-29  Bart Vanbrabant <bart.vanbrabant at zoeloelip.be> 
    27 
  • eaccelerator/trunk/debug.c

    r286 r288  
    251251                p = ht->arBuckets[i]; 
    252252                while (p != NULL) { 
    253                         fprintf(F_fp, "%s <==> 0x%lX\n", p->arKey, p->h); 
     253                        fprintf(F_fp, "\t%s <==> 0x%lX\n", p->arKey, p->h); 
    254254                        p = p->pNext; 
    255255                } 
    256256        } 
    257257 
    258         p = ht->pListTail; 
    259         while (p != NULL) { 
    260                 fprintf(F_fp, "%s <==> 0x%lX\n", p->arKey, p->h); 
    261                 p = p->pListLast; 
    262         } 
    263258        fflush(F_fp); 
    264259} 
    265260 
     261/* 
     262 *  Dump an eaccelerator class entry structure 
     263 */ 
     264void ea_debug_dump_ea_class_entry(ea_class_entry *ce) 
     265{ 
     266    fprintf(F_fp, "ea class entry: '%s' (len = %u)\n", ce->name, ce->name_length); 
     267    fprintf(F_fp, "\tparent: '%s'\n", ce->parent); 
     268    fprintf(F_fp, "\ttype: %d\n", ce->type); 
     269    fprintf(F_fp, "\tfunction_table: %u entries\n", ce->function_table.nNumOfElements); 
     270    fprintf(F_fp, "\tdefault_properties: %u entries\n", ce->default_properties.nNumOfElements); 
     271#ifdef ZEND_ENGINE_2 
     272    fprintf(F_fp, "\tproperties_info: %u entries\n", ce->properties_info.nNumOfElements); 
     273#  ifdef ZEND_ENGINE_2_1 
     274    fprintf(F_fp, "\tdefault_static_members: %u entries\n", ce->default_static_members.nNumOfElements); 
     275#  endif 
     276    fprintf(F_fp, "\tstatic_members: %u entries\n", ce->static_members->nNumOfElements); 
     277    fprintf(F_fp, "\tconstants_Table: %u entries\n", ce->constants_table.nNumOfElements); 
     278    fprintf(F_fp, "\tce_flags: %u\n", ce->ce_flags); 
     279    fprintf(F_fp, "\tnum_interfaces: %u\n", ce->num_interfaces); 
     280    fprintf(F_fp, "\tfilename: %s\n", ce->filename); 
     281    fprintf(F_fp, "\tline_start: %u\n", ce->line_start); 
     282    fprintf(F_fp, "\tline_end: %u\n", ce->line_end); 
     283#  ifdef INCLUDE_DOC_COMMENTS 
     284    fprintf(F_fp, "\tdoc_comment: %s\n", ce->doc_comment); 
     285    fprintf(F_fp, "\tdoc_comment_len: %u\n", ce->doc_comment_len); 
     286#  endif 
     287#endif 
     288    fflush(F_fp); 
     289} 
     290 
     291/* 
     292 *  Dump a zend class entry structure 
     293 */ 
     294void ea_debug_dump_zend_class_entry(zend_class_entry *ce) 
     295{ 
     296    fprintf(F_fp, "zend class entry: '%s' (len = %u)\n", ce->name, ce->name_length); 
     297    fprintf(F_fp, "\tparent: '%s'\n", ce->parent); 
     298    fprintf(F_fp, "\ttype: %d\n", ce->type); 
     299    fprintf(F_fp, "\tfunction_table: %u entries\n", ce->function_table.nNumOfElements); 
     300    fprintf(F_fp, "\tdefault_properties: %u entries\n", ce->default_properties.nNumOfElements); 
     301#ifdef ZEND_ENGINE_2 
     302    fprintf(F_fp, "\tproperties_info: %u entries\n", ce->properties_info.nNumOfElements); 
     303#  ifdef ZEND_ENGINE_2_1 
     304    fprintf(F_fp, "\tdefault_static_members: %u entries\n", ce->default_static_members.nNumOfElements); 
     305#  endif 
     306    fprintf(F_fp, "\tstatic_members: %u entries\n", ce->static_members->nNumOfElements); 
     307    fprintf(F_fp, "\tconstants_Table: %u entries\n", ce->constants_table.nNumOfElements); 
     308    fprintf(F_fp, "\tce_flags: %u\n", ce->ce_flags); 
     309    fprintf(F_fp, "\tnum_interfaces: %u\n", ce->num_interfaces); 
     310    fprintf(F_fp, "\tfilename: %s\n", ce->filename); 
     311    fprintf(F_fp, "\tline_start: %u\n", ce->line_start); 
     312    fprintf(F_fp, "\tline_end: %u\n", ce->line_end); 
     313#  ifdef INCLUDE_DOC_COMMENTS 
     314    fprintf(F_fp, "\tdoc_comment: %s\n", ce->doc_comment); 
     315    fprintf(F_fp, "\tdoc_comment_len: %u\n", ce->doc_comment_len); 
     316#  endif 
     317#endif 
     318    fflush(F_fp); 
     319} 
     320 
    266321#endif /* #ifdef HAVE_EACCELERATOR */ 
  • eaccelerator/trunk/debug.h

    r286 r288  
    2929#define INCLUDED_DEBUG_H 
    3030 
     31#include "eaccelerator.h" 
    3132#include "zend.h" 
    3233#include "zend_API.h" 
     
    6869 
    6970/* print out performance data (start - end time) */ 
    70  
    7171#define EA_TEST_PERFORMANCE     (1<<3L) 
    7272 
     
    8888 
    8989void ea_debug_hash_display(HashTable * ht); 
     90void ea_debug_dump_ea_class_entry(ea_class_entry *ce); 
     91void ea_debug_dump_zend_class_entry(zend_class_entry *ce); 
    9092 
    9193#endif /* INCLUDED_DEBUG_H */ 
  • eaccelerator/trunk/mm.c

    r286 r288  
    4545#endif 
    4646 
    47 #if !defined(MM_TEST_SEM) && !defined(MM_TEST_SHM) 
    48 # include "debug.h" 
    49 #endif 
    50  
    5147#include <sys/types.h> 
    5248#include <sys/stat.h> 
     
    129125#define MM_PRIVATE 
    130126#include "mm.h" 
     127 
     128#if !defined(MM_TEST_SEM) && !defined(MM_TEST_SHM) 
     129# include "debug.h" 
     130#endif 
    131131 
    132132typedef union mm_word {