Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only create activities during debug #1456

Merged
merged 1 commit into from
Apr 16, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion Source/Base/ASLog.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,11 @@ AS_EXTERN os_log_t ASLockingLog(void);
* reflected in the log whereas activities described by the newer
* os_activity_scope are. So unfortunately we must use these iOS 10
* APIs to get meaningful logging data.
*
* NOTE: Creating and tearing down activities require inter-process communication and can
* take dozens of microseconds on an A8. We do it quite often. Enable activities only during debugging.
*/
#if OS_LOG_TARGET_HAS_10_12_FEATURES
#if DEBUG && OS_LOG_TARGET_HAS_10_12_FEATURES

#define OS_ACTIVITY_NULLABLE nullable
#define AS_ACTIVITY_CURRENT OS_ACTIVITY_CURRENT
Expand Down