From 61f11270393566845534b8b1f1c7538fc35d4163 Mon Sep 17 00:00:00 2001 From: Jens Ayton Date: Tue, 6 Jun 2017 12:34:00 +0200 Subject: [PATCH] Mac: Remove profiler marker macros These are no longer supported by Instruments and the replacement isn't drop-in. --- src/Core/Debug/OODebugSupport.h | 56 -------------------------------- src/Core/Entities/PlayerEntity.m | 13 -------- src/Core/GameController.m | 2 -- src/Core/Universe.m | 4 --- 4 files changed, 75 deletions(-) diff --git a/src/Core/Debug/OODebugSupport.h b/src/Core/Debug/OODebugSupport.h index 9eddca810..0a99111d0 100644 --- a/src/Core/Debug/OODebugSupport.h +++ b/src/Core/Debug/OODebugSupport.h @@ -36,59 +36,3 @@ void OOInitDebugSupport(void); #define OOInitDebugSupport() do {} while (0) #endif - - -#if OOLITE_MAC_OS_X -#import - -/** - * Set a point flag in Instruments. - * - * Signal flags are hidden by default. To show them, select "Manage Flags..." - * from the Window menu, and select "Signal Flags" from the "Displayed Flags" - * dropdown menu. - * - * @param string An NSString identifying the context of the flag. This will be - * displayed as "from oolite [point]". - */ -#define OOProfilerPointMarker(string) \ - OODTSendSignalFlag(string, DT_POINT_SIGNAL, NO) - -/** - * Set a start flag in Instruments. - * - * A start flag should be balanced with a matching end flag. - * - * @param string An NSString identifying the context of the flag. This will be - * displayed as "from oolite [point]". The start flag - * is matched with the following end flag with the same string. - */ -#define OOProfilerStartMarker(string) \ - OODTSendSignalFlag(string, DT_START_SIGNAL, NO) - -/** - * Set an end flag in Instruments. - * - * An end flag should be balanced with a matching start flag. - * - * @param string An NSString identifying the context of the flag. This will be - * displayed as "from oolite [point]". The end flag - * is matched with the previous start flag with the same string. - */ -#define OOProfilerEndMarker(string) \ - OODTSendSignalFlag(string, DT_END_SIGNAL, NO) - -#define OODTSendSignalFlag(string, signal, includeBacktrace) \ - do { const char *stringC = [[@"oolite " stringByAppendingString:string] UTF8String]; DTSendSignalFlag(stringC, signal, includeBacktrace); } while (0) - -#else - -#define OOProfilerPointMarker(string) \ - do {} while (0) - -#define OOProfilerStartMarker(string) \ - do {} while (0) - -#define OOProfilerEndMarker(string) \ - do {} while (0) -#endif diff --git a/src/Core/Entities/PlayerEntity.m b/src/Core/Entities/PlayerEntity.m index 93ebe6830..40334431b 100644 --- a/src/Core/Entities/PlayerEntity.m +++ b/src/Core/Entities/PlayerEntity.m @@ -6820,8 +6820,6 @@ - (void) enterDock:(StationEntity *)station NSParameterAssert(station != nil); if ([self status] == STATUS_DEAD) return; - OOProfilerStartMarker(@"dock"); - [self setStatus:STATUS_DOCKING]; [self setDockedStation:station]; [self doScriptEvent:OOJSID("shipWillDockWithStation") withArgument:station]; @@ -6858,8 +6856,6 @@ - (void) enterDock:(StationEntity *)station - (void) docked { - OOProfilerPointMarker(@"-docked called"); - StationEntity *dockedStation = [self dockedStation]; if (dockedStation == nil) { @@ -6956,8 +6952,6 @@ - (void) docked // When a mission screen is started, any on-screen message is removed immediately. [self doWorldEventUntilMissionScreen:OOJSID("missionScreenOpportunity")]; // also displays docking reports first. - - OOProfilerEndMarker(@"dock"); } @@ -6966,8 +6960,6 @@ - (void) leaveDock:(StationEntity *)station if (station == nil) return; NSParameterAssert(station == [self dockedStation]); - OOProfilerStartMarker(@"undock"); - // ensure we've not left keyboard entry on [[UNIVERSE gameView] allowStringInput: NO]; @@ -7056,16 +7048,12 @@ - (void) leaveDock:(StationEntity *)station [demoShip release]; demoShip = nil; - OOProfilerEndMarker(@"undock"); - [self playLaunchFromStation]; } - (void) witchStart { - OOProfilerStartMarker(@"witchspace"); - // chances of entering witchspace with autopilot on are very low, but as Berlios bug #18307 has shown us, entirely possible // so in such cases we need to ensure that at least the docking music stops playing if (autopilot_engaged) [self disengageAutopilot]; @@ -7120,7 +7108,6 @@ - (void) witchEnd chart_centre_coordinates = galaxy_coordinates; target_chart_centre = chart_centre_coordinates; - OOProfilerEndMarker(@"witchspace"); } diff --git a/src/Core/GameController.m b/src/Core/GameController.m index 3742ce263..874457a29 100644 --- a/src/Core/GameController.m +++ b/src/Core/GameController.m @@ -662,8 +662,6 @@ - (void) logProgress:(NSString *)message #if OOLITE_MAC_OS_X [splashProgressTextField setStringValue:message]; [splashProgressTextField display]; - - OOProfilerPointMarker(message); #endif if([message length] > 0) { diff --git a/src/Core/Universe.m b/src/Core/Universe.m index 16d8f7bad..82def99ad 100644 --- a/src/Core/Universe.m +++ b/src/Core/Universe.m @@ -253,8 +253,6 @@ @implementation Universe - (id) initWithGameView:(MyOpenGLView *)inGameView { - OOProfilerStartMarker(@"startup"); - if (gSharedUniverse != nil) { [self release]; @@ -410,8 +408,6 @@ - (id) initWithGameView:(MyOpenGLView *)inGameView [player startUpComplete]; _doingStartUp = NO; - OOProfilerEndMarker(@"startup"); - return self; }