ASSignpost: Add support for the os_signpost API, fixes (#1501)

* ASSignpost: Add support for the os_signpost API

- Removes support for colored intervals. These weren't really useful and they aren't part of the signpost api.
- Fixes an issue with range controller interval logging.
- Adds an interval for interface orientation changes.

* Rename

* Support Xcode 9

* Commentary
This commit is contained in:
Adlai Holler
2019-05-08 19:59:13 -07:00
committed by GitHub
parent 6e1600571c
commit 4cd8e82996
11 changed files with 121 additions and 63 deletions
+4 -4
View File
@@ -215,7 +215,7 @@ static void runLoopSourceCallback(void *info) {
return;
}
ASSignpostStart(ASSignpostRunLoopQueueBatch);
ASSignpostStart(RunLoopQueueBatch, self, "%s", object_getClassName(self));
// Snatch the next batch of items.
NSInteger maxCountToProcess = MIN(internalQueueCount, self.batchSize);
@@ -278,7 +278,7 @@ static void runLoopSourceCallback(void *info) {
CFRunLoopWakeUp(_runLoop);
}
ASSignpostEnd(ASSignpostRunLoopQueueBatch);
ASSignpostEnd(RunLoopQueueBatch, self, "count: %d", (int)count);
}
- (void)enqueue:(id)object
@@ -440,7 +440,7 @@ dispatch_once_t _ASSharedCATransactionQueueOnceToken;
return;
}
as_activity_scope_verbose(as_activity_create("Process run loop queue batch", _rootActivity, OS_ACTIVITY_FLAG_DEFAULT));
ASSignpostStart(ASSignpostRunLoopQueueBatch);
ASSignpostStart(RunLoopQueueBatch, self, "CATransactionQueue");
// Swap buffers, clear our hash table.
_internalQueue.swap(_batchBuffer);
@@ -455,7 +455,7 @@ dispatch_once_t _ASSharedCATransactionQueueOnceToken;
}
_batchBuffer.clear();
as_log_verbose(ASDisplayLog(), "processed %lu items", (unsigned long)count);
ASSignpostEnd(ASSignpostRunLoopQueueBatch);
ASSignpostEnd(RunLoopQueueBatch, self, "count: %d", (int)count);
}
- (void)enqueue:(id<ASCATransactionQueueObserving>)object