Skip to content

Commit

Permalink
Mac: Remove profiler marker macros
Browse files Browse the repository at this point in the history
These are no longer supported by Instruments and the replacement
isn't drop-in.
  • Loading branch information
JensAyton committed Jun 6, 2017
1 parent 020c8ac commit 61f1127
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 75 deletions.
56 changes: 0 additions & 56 deletions src/Core/Debug/OODebugSupport.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,59 +36,3 @@ void OOInitDebugSupport(void);
#define OOInitDebugSupport() do {} while (0)

#endif


#if OOLITE_MAC_OS_X
#import <DTPerformanceSession/DTSignalFlag.h>

/**
* 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 <string> [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 <string> [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 <string> [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
13 changes: 0 additions & 13 deletions src/Core/Entities/PlayerEntity.m
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down Expand Up @@ -6858,8 +6856,6 @@ - (void) enterDock:(StationEntity *)station

- (void) docked
{
OOProfilerPointMarker(@"-docked called");

StationEntity *dockedStation = [self dockedStation];
if (dockedStation == nil)
{
Expand Down Expand Up @@ -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");
}


Expand All @@ -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];

Expand Down Expand Up @@ -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];
Expand Down Expand Up @@ -7120,7 +7108,6 @@ - (void) witchEnd

chart_centre_coordinates = galaxy_coordinates;
target_chart_centre = chart_centre_coordinates;
OOProfilerEndMarker(@"witchspace");
}


Expand Down
2 changes: 0 additions & 2 deletions src/Core/GameController.m
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
4 changes: 0 additions & 4 deletions src/Core/Universe.m
Original file line number Diff line number Diff line change
Expand Up @@ -253,8 +253,6 @@ @implementation Universe

- (id) initWithGameView:(MyOpenGLView *)inGameView
{
OOProfilerStartMarker(@"startup");

if (gSharedUniverse != nil)
{
[self release];
Expand Down Expand Up @@ -410,8 +408,6 @@ - (id) initWithGameView:(MyOpenGLView *)inGameView
[player startUpComplete];
_doingStartUp = NO;

OOProfilerEndMarker(@"startup");

return self;
}

Expand Down

0 comments on commit 61f1127

Please sign in to comment.