Mac: Remove profiler marker macros

These are no longer supported by Instruments and the replacement
isn't drop-in.
This commit is contained in:
Jens Ayton 2017-06-06 12:34:00 +02:00
parent 020c8ac003
commit 61f1127039
4 changed files with 0 additions and 75 deletions

View File

@ -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

View File

@ -6820,8 +6820,6 @@ NSComparisonResult marketSorterByMassUnit(id a, id b, void *market);
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 @@ NSComparisonResult marketSorterByMassUnit(id a, id b, void *market);
- (void) docked
{
OOProfilerPointMarker(@"-docked called");
StationEntity *dockedStation = [self dockedStation];
if (dockedStation == nil)
{
@ -6956,8 +6952,6 @@ NSComparisonResult marketSorterByMassUnit(id a, id b, void *market);
// 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 @@ NSComparisonResult marketSorterByMassUnit(id a, id b, void *market);
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 @@ NSComparisonResult marketSorterByMassUnit(id a, id b, void *market);
[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 @@ NSComparisonResult marketSorterByMassUnit(id a, id b, void *market);
chart_centre_coordinates = galaxy_coordinates;
target_chart_centre = chart_centre_coordinates;
OOProfilerEndMarker(@"witchspace");
}

View File

@ -662,8 +662,6 @@ static void RemovePreference(NSString *key)
#if OOLITE_MAC_OS_X
[splashProgressTextField setStringValue:message];
[splashProgressTextField display];
OOProfilerPointMarker(message);
#endif
if([message length] > 0)
{

View File

@ -253,8 +253,6 @@ static GLfloat docked_light_specular[4] = { DOCKED_ILLUM_LEVEL, DOCKED_ILLUM_LEV
- (id) initWithGameView:(MyOpenGLView *)inGameView
{
OOProfilerStartMarker(@"startup");
if (gSharedUniverse != nil)
{
[self release];
@ -410,8 +408,6 @@ static GLfloat docked_light_specular[4] = { DOCKED_ILLUM_LEVEL, DOCKED_ILLUM_LEV
[player startUpComplete];
_doingStartUp = NO;
OOProfilerEndMarker(@"startup");
return self;
}