From 2cb875fb99e0c017b545b8e8427eb565e15cca1e Mon Sep 17 00:00:00 2001 From: Max Date: Fri, 9 Oct 2015 00:18:09 +0200 Subject: Add timing info for _scrollViewDidChangeBounds: --- Source/SPObjectAdditions.m | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Source/SPObjectAdditions.m b/Source/SPObjectAdditions.m index f29aa3b4..5f7c73ab 100644 --- a/Source/SPObjectAdditions.m +++ b/Source/SPObjectAdditions.m @@ -50,7 +50,9 @@ static NSMutableDictionary *gScrollViewDealloc; { NSMutableString *msg = [NSMutableString string]; - [msg appendFormat:@"%s tripped!\n\n",__PRETTY_FUNCTION__]; + [msg appendFormat:@"%s tripped!\n",__PRETTY_FUNCTION__]; + + [msg appendFormat:@" at %@ (mach time: %lf)\n\n",[NSDate date],[NSDate monotonicTimeInterval]]; retryDescribe: [msg appendFormat:@"passed object (class <%@>): %@\n\n",[obj className],obj]; @@ -136,6 +138,7 @@ retryDescribe: if(notificationSelector == @selector(_scrollViewDidChangeBounds:) && [notificationName isEqualToString:NSViewBoundsDidChangeNotification]) { NSString *key = [NSString stringWithFormat:@"snd=%p,obs=%p",notificationSender,notificationObserver]; NSMutableString *val = [NSMutableString string]; + [val appendFormat:@"at %@ (mach time: %lf)\n",[NSDate date],[NSDate monotonicTimeInterval]]; [val appendFormat:@"observer: %1$p (class %2$@) description: %1$@\n",notificationObserver,[notificationObserver className]]; if([notificationObserver isKindOfClass:[NSView class]]) { [val appendFormat:@" view info: id=%@, tag=%ld\n",[(NSView *)notificationObserver identifier], [(NSView *)notificationObserver tag]]; @@ -176,7 +179,7 @@ retryDescribe: - (void)sp_dealloc { NSString *key = [NSString stringWithFormat:@"=%p",self]; - NSString *val = [NSString stringWithFormat:@"\ndealloc backtrace:\n%@\n\n",[NSThread callStackSymbols]]; + NSString *val = [NSString stringWithFormat:@"\n%p dealloc\n at %@ (mach time: %lf)\n backtrace:\n%@\n\n",self,[NSDate date],[NSDate monotonicTimeInterval],[NSThread callStackSymbols]]; [gScrollViewDealloc setObject:val forKey:key]; -- cgit v1.2.3