From 50e17ea3048f700d6d9d4f640f5150555f190bf6 Mon Sep 17 00:00:00 2001 From: helge Date: Mon, 14 Mar 2005 12:49:41 +0000 Subject: [PATCH] added some profiling code from OGo git-svn-id: http://svn.opengroupware.org/SOPE/trunk@651 e4a50df8-12e2-0310-a44c-efbce7f8a7e3 --- sope-appserver/NGObjWeb/ChangeLog | 5 +++++ sope-appserver/NGObjWeb/Version | 2 +- sope-appserver/NGObjWeb/WOApplication.m | 17 ++++++++++++++++- 3 files changed, 22 insertions(+), 2 deletions(-) diff --git a/sope-appserver/NGObjWeb/ChangeLog b/sope-appserver/NGObjWeb/ChangeLog index 807f93c8..8295b363 100644 --- a/sope-appserver/NGObjWeb/ChangeLog +++ b/sope-appserver/NGObjWeb/ChangeLog @@ -1,3 +1,8 @@ +2005-03-13 Helge Hess + + * WOApplication.m: added some ObjC runtime profiling support (moved in + from OGo main object) (v4.5.137) + 2005-03-14 Helge Hess * SoObjects/SoSubContext.m: updated superclass version check (v4.5.136) diff --git a/sope-appserver/NGObjWeb/Version b/sope-appserver/NGObjWeb/Version index 075f893f..0958e2d6 100644 --- a/sope-appserver/NGObjWeb/Version +++ b/sope-appserver/NGObjWeb/Version @@ -1,6 +1,6 @@ # version file -SUBMINOR_VERSION:=136 +SUBMINOR_VERSION:=137 # v4.5.122 requires libNGExtensions v4.5.153 # v4.5.91 requires libNGExtensions v4.5.134 diff --git a/sope-appserver/NGObjWeb/WOApplication.m b/sope-appserver/NGObjWeb/WOApplication.m index 61bca098..7685f4d8 100644 --- a/sope-appserver/NGObjWeb/WOApplication.m +++ b/sope-appserver/NGObjWeb/WOApplication.m @@ -33,10 +33,14 @@ #include #include #include -#import +#include #include "common.h" #include +#if GNU_RUNTIME +# include +#endif + @interface WOApplication(PrivateMethods) + (id)logger; - (id)_loadComponentDefinitionWithName:(NSString *)_name @@ -885,6 +889,17 @@ static NSString *defaultCompRqHandlerClassName = @"WOComponentRequestHandler"; - (void)awake { } - (void)sleep { +#if DEBUG && PRINT_NSSTRING_STATISTICS + if ([NSString respondsToSelector:@selector(printStatistics)]) + [NSString printStatistics]; +#endif + +#if DEBUG && PRINT_OBJC_STATISTICS +extern int __objc_selector_max_index; + printf("nbuckets=%i, nindices=%i, narrays=%i, idxsize=%i\n", +nbuckets, nindices, narrays, idxsize); + printf("maxsel=%i\n", __objc_selector_max_index); +#endif } /* responder */ -- 2.39.5