peachsim 0.1.1728 → 0.1.1738
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/cli/commands/control.ts +1 -0
- package/cli/commands/coverage-swift.ts +112 -4
- package/cli/commands/package.ts +11 -1
- package/cli/commands/shell-url.ts +4 -0
- package/cli/scene-video.ts +24 -7
- package/detox/index.ts +9 -1
- package/dist-lib/agent-daemon-client.cjs +1 -1
- package/dist-lib/agent-events.cjs +1 -1
- package/dist-lib/attached-projects.cjs +5 -2
- package/dist-lib/auth/shared-session.cjs +5 -2
- package/dist-lib/backend-origin.cjs +1 -1
- package/dist-lib/beta.cjs +1 -1
- package/dist-lib/beta.mjs +1 -1
- package/dist-lib/bridge-constants.cjs +1 -1
- package/dist-lib/bridge-contract-input.cjs +1 -1
- package/dist-lib/bridge-contract-input.mjs +1 -1
- package/dist-lib/bridge-contract.cjs +1 -1
- package/dist-lib/bridge-contract.mjs +1 -1
- package/dist-lib/bundle-channel.cjs +3592 -1918
- package/dist-lib/capture-contract.cjs +1 -1
- package/dist-lib/capture-contract.mjs +1 -1
- package/dist-lib/cloud-contract.cjs +1 -1
- package/dist-lib/cloud-contract.mjs +1 -1
- package/dist-lib/cloud-test-args.cjs +1 -1
- package/dist-lib/cloud-test-args.mjs +1 -1
- package/dist-lib/cloud.cjs +1 -1
- package/dist-lib/cloud.mjs +1 -1
- package/dist-lib/config.cjs +1 -1
- package/dist-lib/config.mjs +1 -1
- package/dist-lib/detox/index.cjs +13 -5
- package/dist-lib/dev-bundle-resolution.cjs +1 -1
- package/dist-lib/expo-swift-bundle.cjs +1329 -1022
- package/dist-lib/expo-swift-metadata.cjs +2 -2
- package/dist-lib/expo-swift-metadata.mjs +2 -2
- package/dist-lib/home-paths.cjs +7 -2
- package/dist-lib/host/bridge-host.cjs +3773 -2149
- package/dist-lib/host/fetch-proxy-handler.cjs +16 -5
- package/dist-lib/host/fetch-proxy-overrides.cjs +1 -1
- package/dist-lib/host/fetch-proxy-overrides.mjs +1 -1
- package/dist-lib/host/replacement-module-handler.cjs +1 -1
- package/dist-lib/host/websocket-proxy.cjs +1 -1
- package/dist-lib/index.cjs +97 -68
- package/dist-lib/jump-to-source-babel.cjs +1 -1
- package/dist-lib/jump-to-source-native.cjs +1 -1
- package/dist-lib/kotlin-host.cjs +209 -32
- package/dist-lib/menu.cjs +7 -1
- package/dist-lib/menu.mjs +7 -1
- package/dist-lib/metro-fingerprint-registry.cjs +1 -1
- package/dist-lib/metro-fingerprint-registry.mjs +1 -1
- package/dist-lib/metro-production-bundle.cjs +1 -1
- package/dist-lib/metro-production-bundle.mjs +1 -1
- package/dist-lib/metro.cjs +93 -65
- package/dist-lib/native-app-identity-project.cjs +37 -31
- package/dist-lib/native-app-identity-project.mjs +37 -31
- package/dist-lib/native-app-identity.cjs +1 -1
- package/dist-lib/native-app-identity.mjs +1 -1
- package/dist-lib/native-firebase-metadata.cjs +1 -1
- package/dist-lib/native-firebase-metadata.mjs +1 -1
- package/dist-lib/plist.cjs +1 -1
- package/dist-lib/plist.mjs +1 -1
- package/dist-lib/profiles.cjs +5 -2
- package/dist-lib/public-brand.cjs +1 -1
- package/dist-lib/public-origins-lib-esm.json +23 -23
- package/dist-lib/public-origins-lib.json +79 -53
- package/dist-lib/react-native-host-modules.cjs +5 -2
- package/dist-lib/react-native-host-modules.mjs +5 -2
- package/dist-lib/reap-browser.cjs +1 -1
- package/dist-lib/scripts/dev-server-scanner.cjs +1 -1
- package/dist-lib/sdk.cjs +1 -1
- package/dist-lib/sdk.mjs +1 -1
- package/dist-lib/skills.cjs +4486 -2789
- package/dist-lib/swift-compile.cjs +53 -60
- package/dist-lib/swift-compile.mjs +52 -60
- package/dist-lib/swift-package.cjs +1 -1
- package/dist-lib/swift-package.mjs +1 -1
- package/dist-lib/swift-submit.cjs +2 -2
- package/dist-lib/swift-submit.mjs +2 -2
- package/dist-lib/swift-toolchain.cjs +17 -17
- package/dist-lib/swift.cjs +1 -1
- package/dist-lib/vite-swift.cjs +1056 -870
- package/dist-lib/vite.cjs +20 -8
- package/dist-lib/worklet-executable.cjs +1 -1
- package/dist-lib/worklet-executable.mjs +1 -1
- package/dist-types/packages/peach-engine/src/engine/font-config.d.ts +7 -4
- package/dist-types/packages/peach-engine/src/engine/image-loader.d.ts +2 -1
- package/dist-types/packages/peach-engine/src/engine/liquid-glass.d.ts +0 -5
- package/dist-types/packages/peach-engine/src/engine/memory-counts.d.ts +8 -0
- package/dist-types/packages/peach-engine/src/engine/node.d.ts +4 -1
- package/dist-types/packages/peach-engine/src/engine/render-damage.d.ts +2 -2
- package/dist-types/packages/peach-engine/src/engine/text-first-baseline.d.ts +5 -0
- package/dist-types/packages/peach-engine/src/engine/text-paragraph.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/native-preview-bundle.d.ts +2 -0
- package/dist-types/packages/peach-engine/src/render-worker/protocol.d.ts +7 -2
- package/dist-types/packages/peach-engine/src/render-worker/shell-protocol.d.ts +1 -0
- package/dist-types/packages/peach-engine/src/render-worker/worklet-runtime.d.ts +13 -1
- package/dist-types/packages/peach-kit/src/capabilities.d.ts +1 -0
- package/kotlin/README.md +3 -0
- package/kotlin/sdk.tar.gz +0 -0
- package/package.json +1 -1
- package/runtime-companion.json +1 -1
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccount.h +55 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountCredential.h +35 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountStore.h +94 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACAccountType.h +53 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/ACError.h +37 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/Accounts.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Headers/AccountsDefines.h +13 -0
- package/sdk/ios/System/Library/Frameworks/Accounts.framework/Modules/module.modulemap +5 -0
- package/sdk/ios/System/Library/Frameworks/CoreGraphics.framework/Headers/CoreGraphics.h +1 -1
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes +58 -3
- package/sdk/ios/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h +636 -37
- package/sdk/ios/usr/include/os/signpost.h +414 -0
- package/sdk/ios/usr/include/os.modulemap +5 -0
- package/sdk/ios/wasm/include/errno.h +4 -20
- package/sdk/ios/wasm/include/pthread.h +3 -0
- package/sdk/ios/wasm/include/setjmp.h +57 -0
- package/sdk/ios/wasm/include/sys/resource.h +2 -2
- package/sdk/native-hashes.json +3 -3
- package/skills/peach-debug/SKILL.md +0 -1
- package/skills/peach-perf/SKILL.md +0 -1
- package/skills/peach-setup/SKILL.md +0 -1
- package/skills/peach-test/SKILL.md +0 -1
- package/skills/peach-visual/SKILL.md +0 -1
- package/src/android-autolinking.ts +1 -0
- package/src/android-bridge-packages.ts +279 -0
- package/src/appPackageContract.ts +2 -0
- package/src/bundle-channel.mjs +20 -2
- package/src/cli-runtime.ts +9 -5
- package/src/expo-discovery-cache.ts +7 -3
- package/src/expo-kotlin-host.ts +97 -26
- package/src/expo-native-workspace.ts +135 -40
- package/src/expo-swift-host.ts +93 -20
- package/src/expo-swift-ready.ts +5 -1
- package/src/expoKotlinContract.ts +12 -2
- package/src/expoSwiftContract.ts +9 -2
- package/src/generated/swift-c-predefines.json +1 -1
- package/src/home-paths.ts +6 -1
- package/src/host/bridge-host.ts +5 -0
- package/src/host/fetch-proxy-handler.ts +10 -0
- package/src/kotlin-host.ts +204 -30
- package/src/kotlinSdkContract.ts +2 -1
- package/src/menu.ts +7 -0
- package/src/native-prebuilt.ts +154 -0
- package/src/nitro-adapter.lock.json +251 -251
- package/src/nitro-adapter.ts +56 -50
- package/src/nitro-bundle.ts +84 -74
- package/src/nitro-compile.ts +10 -5
- package/src/nitro-dependencies.ts +43 -28
- package/src/nitro-source.ts +60 -26
- package/src/nitroAdapterContract.ts +146 -98
- package/src/nitroContract.ts +64 -21
- package/src/react-native-bridge-modules.ts +2 -0
- package/src/react-native-host-modules.ts +4 -1
- package/src/settingsContract.ts +11 -0
- package/src/storageSnapshotContract.ts +29 -81
- package/src/swift-compile.ts +49 -50
- package/src/swift-coverage/indexdump.ts +22 -6
- package/src/swift-coverage/indexing.ts +4 -4
- package/src/swift-coverage/sdk.ts +104 -20
- package/src/swift-coverage/types.ts +34 -0
- package/src/swift-coverage/xcode.ts +9 -1
- package/src/swift-distribution.lock.json +15 -12
- package/src/swift-host.ts +3 -0
- package/src/swift-standin-emit.ts +6 -1
- package/src/swift-standins.ts +172 -10
- package/src/swift-submit.ts +5 -1
- package/src/swift-toolchain.ts +16 -16
- package/src/turbo-bundle.ts +81 -0
- package/src/turbo-compile.ts +120 -0
- package/src/turbo-runtime.lock.json +69 -0
- package/src/turbo-source.ts +754 -0
- package/src/vite-plugin-one.ts +4 -3
|
@@ -0,0 +1,414 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 2017-2018 Apple Inc. All rights reserved.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
#ifndef __OS_SIGNPOST_H__
|
|
6
|
+
#define __OS_SIGNPOST_H__
|
|
7
|
+
|
|
8
|
+
#include <os/log.h>
|
|
9
|
+
|
|
10
|
+
__BEGIN_DECLS
|
|
11
|
+
|
|
12
|
+
OS_ASSUME_NONNULL_BEGIN
|
|
13
|
+
|
|
14
|
+
/*!
|
|
15
|
+
* @header os_signpost
|
|
16
|
+
*
|
|
17
|
+
* The os_signpost APIs let clients add lightweight instrumentation to
|
|
18
|
+
* code for collection and visualization by performance analysis tooling.
|
|
19
|
+
*
|
|
20
|
+
* Clients of os_signpost can instrument interesting periods of time
|
|
21
|
+
* ('intervals') and single points in time ('events'). Intervals can span
|
|
22
|
+
* processes, be specific to one process, or be specific to a single thread.
|
|
23
|
+
*
|
|
24
|
+
* Intervals and events include an os_log-style format string and arguments
|
|
25
|
+
* which can be used to convey contextual information.
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
#pragma mark - Interval Matching Scope
|
|
29
|
+
|
|
30
|
+
/*!
|
|
31
|
+
* The matching scope for signpost intervals logged with a given os_log_t is
|
|
32
|
+
* specified in that log handles's configuration plist using the
|
|
33
|
+
* 'Signpost-Scope' key and defaults to process-wide scope (i.e. 'Process'
|
|
34
|
+
* value) if unspecified.
|
|
35
|
+
*
|
|
36
|
+
* Signpost interval begin and end matching can have 3 different scopes:
|
|
37
|
+
*
|
|
38
|
+
* - Thread-wide: The search scope for matching begins and ends is restricted to
|
|
39
|
+
* single threads. To set this as the search scope for an os_log_t, set
|
|
40
|
+
* 'Thread' as the string value for the 'Signpost-Scope' key in the
|
|
41
|
+
* os_log_t's configuration plist.
|
|
42
|
+
*
|
|
43
|
+
* - Process-wide (Default value): The search scope for matching begins and ends
|
|
44
|
+
* is restricted to a single process. (i.e. no cross-process intervals)
|
|
45
|
+
* To set this as the search scope for an os_log_t, set
|
|
46
|
+
* 'Process' as the string value for the 'Signpost-Scope' key in the
|
|
47
|
+
* os_log_t's configuration plist or do not specify any 'Signpost-Scope' key-
|
|
48
|
+
* value pair.
|
|
49
|
+
*
|
|
50
|
+
* - System-wide: The search scope for matching begins and ends is not
|
|
51
|
+
* restricted. (i.e. cross-process intervals are possible)
|
|
52
|
+
* To set this as the search scope for an os_log_t, set
|
|
53
|
+
* 'System' as the string value for the 'Signpost-Scope' key in the
|
|
54
|
+
* os_log_t's configuration plist.
|
|
55
|
+
*
|
|
56
|
+
*/
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
#pragma mark - Signpost IDs
|
|
60
|
+
|
|
61
|
+
/*!
|
|
62
|
+
* Disambiguating intervals with signpost IDs
|
|
63
|
+
*
|
|
64
|
+
* Intervals with the same log handle and interval name can be in flight
|
|
65
|
+
* simultaneously. In order for tools to correctly match begin signposts with
|
|
66
|
+
* end signposts, it is necessary to identify each interval with an
|
|
67
|
+
* os_signpost_id_t.
|
|
68
|
+
*
|
|
69
|
+
* If only one interval with a given os_log_t and interval name will ever be in
|
|
70
|
+
* flight at a time, use the os_signpost_t convenience value
|
|
71
|
+
* OS_SIGNPOST_ID_EXCLUSIVE. This can avoid having to share state between begin
|
|
72
|
+
* and end callsites.
|
|
73
|
+
*
|
|
74
|
+
* If there exists some non-pointer uint64_t value that uniquely identifies
|
|
75
|
+
* begin/end pairs, that value can be cast directly to an os_signpost_id_t.
|
|
76
|
+
* Note that the values OS_SIGNPOST_ID_NULL and OS_SIGNPOST_ID_INVALID are
|
|
77
|
+
* reserved and identical values may not be used in this manner.
|
|
78
|
+
*
|
|
79
|
+
* If there exists a pointer which can identify begin/end pairs, an
|
|
80
|
+
* os_signpost_id_t can be generated from that pointer with
|
|
81
|
+
* os_signpost_id_make_with_pointer(). This approach is not applicable to
|
|
82
|
+
* signposts that span process boundaries.
|
|
83
|
+
*
|
|
84
|
+
* If no existing pointer or value is applicable, a new unique value can be
|
|
85
|
+
* generated using the os_signpost_id_generate() function. The returned value
|
|
86
|
+
* is guaranteed to be unique within the matching scope specified on the log
|
|
87
|
+
* handle.
|
|
88
|
+
*/
|
|
89
|
+
|
|
90
|
+
/*!
|
|
91
|
+
* @typedef os_signpost_id_t
|
|
92
|
+
*
|
|
93
|
+
* @brief
|
|
94
|
+
* The type to represent a signpost ID.
|
|
95
|
+
*
|
|
96
|
+
* @discussion.
|
|
97
|
+
* Any 64-bit value can be cast to an os_signpost_id_t except for the
|
|
98
|
+
* OS_SIGNPOST_ID_NULL and OS_SIGNPOST_ID_INVALID reserved values.
|
|
99
|
+
*
|
|
100
|
+
* @const OS_SIGNPOST_ID_NULL
|
|
101
|
+
* Represents the null (absent) signpost ID. It is used by the signpost
|
|
102
|
+
* subsystem when a given signpost is disabled.
|
|
103
|
+
*
|
|
104
|
+
* @const OS_SIGNPOST_ID_INVALID
|
|
105
|
+
* Represents an invalid signpost ID, which signals that an error has occurred.
|
|
106
|
+
*
|
|
107
|
+
* @const OS_SIGNPOST_ID_EXCLUSIVE
|
|
108
|
+
* A convenience value for signpost intervals that will never occur
|
|
109
|
+
* concurrently.
|
|
110
|
+
*/
|
|
111
|
+
typedef uint64_t os_signpost_id_t;
|
|
112
|
+
#ifndef __swift__
|
|
113
|
+
#define OS_SIGNPOST_ID_NULL ((os_signpost_id_t)0)
|
|
114
|
+
#define OS_SIGNPOST_ID_INVALID ((os_signpost_id_t)~0)
|
|
115
|
+
#define OS_SIGNPOST_ID_EXCLUSIVE ((os_signpost_id_t)0xEEEEB0B5B2B2EEEE)
|
|
116
|
+
#endif
|
|
117
|
+
|
|
118
|
+
/*!
|
|
119
|
+
* @function os_signpost_id_make_with_pointer
|
|
120
|
+
*
|
|
121
|
+
* @abstract
|
|
122
|
+
* Make an os_signpost_id from a pointer value.
|
|
123
|
+
*
|
|
124
|
+
* @discussion
|
|
125
|
+
* Mangles the pointer to create a valid os_signpost_id, including removing
|
|
126
|
+
* address randomization. Checks that the signpost matching scope is not
|
|
127
|
+
* system-wide.
|
|
128
|
+
*
|
|
129
|
+
* @param log
|
|
130
|
+
* Log handle previously created with os_log_create.
|
|
131
|
+
*
|
|
132
|
+
* @param ptr
|
|
133
|
+
* Any pointer that disambiguates among concurrent intervals with the same
|
|
134
|
+
* os_log_t and interval names.
|
|
135
|
+
*
|
|
136
|
+
* @result
|
|
137
|
+
* Returns a valid os_signpost_id_t. Returns OS_SIGNPOST_ID_NULL if signposts
|
|
138
|
+
* are turned off. Returns OS_SIGNPOST_ID_INVALID if the log handle is
|
|
139
|
+
* system-scoped.
|
|
140
|
+
*/
|
|
141
|
+
API_AVAILABLE(macos(10.14), ios(12.0), tvos(12.0), watchos(5.0))
|
|
142
|
+
OS_EXPORT OS_NOTHROW
|
|
143
|
+
os_signpost_id_t
|
|
144
|
+
os_signpost_id_make_with_pointer(os_log_t log, const void *_Nullable ptr);
|
|
145
|
+
|
|
146
|
+
#if __OBJC__
|
|
147
|
+
/*!
|
|
148
|
+
* @function os_signpost_id_make_with_id
|
|
149
|
+
*
|
|
150
|
+
* @abstract
|
|
151
|
+
* Make an os_signpost_id from an Objective-C id, as in
|
|
152
|
+
* os_signpost_id_make_with_pointer.
|
|
153
|
+
*/
|
|
154
|
+
#define os_signpost_id_make_with_id(log, ptr) \
|
|
155
|
+
os_signpost_id_make_with_pointer(log, (__bridge const void *_Nullable)(ptr))
|
|
156
|
+
#endif /* __OBJC__ */
|
|
157
|
+
|
|
158
|
+
/*!
|
|
159
|
+
* @function os_signpost_id_generate
|
|
160
|
+
*
|
|
161
|
+
* @abstract
|
|
162
|
+
* Generates an ID guaranteed to be unique within the matching scope of the
|
|
163
|
+
* provided log handle.
|
|
164
|
+
*
|
|
165
|
+
* @discussion
|
|
166
|
+
* Each call to os_signpost_id_generate() with a given log handle and its
|
|
167
|
+
* matching scope will return a different os_signpost_id_t.
|
|
168
|
+
*
|
|
169
|
+
* @param log
|
|
170
|
+
* Log handle previously created with os_log_create.
|
|
171
|
+
*
|
|
172
|
+
* @result
|
|
173
|
+
* Returns a valid os_signpost_id_t. Returns OS_SIGNPOST_ID_NULL if signposts
|
|
174
|
+
* are disabled.
|
|
175
|
+
*/
|
|
176
|
+
API_AVAILABLE(macos(10.14), ios(12.0), tvos(12.0), watchos(5.0))
|
|
177
|
+
OS_EXPORT OS_NOTHROW OS_WARN_RESULT
|
|
178
|
+
os_signpost_id_t
|
|
179
|
+
os_signpost_id_generate(os_log_t log);
|
|
180
|
+
|
|
181
|
+
#pragma mark - Signpost Enablement
|
|
182
|
+
|
|
183
|
+
/*!
|
|
184
|
+
* @function os_signpost_enabled
|
|
185
|
+
*
|
|
186
|
+
* @abstract
|
|
187
|
+
* Returns true if signpost log messages are enabled for a particular log
|
|
188
|
+
* handle.
|
|
189
|
+
*
|
|
190
|
+
* @discussion
|
|
191
|
+
* Returns true if signpost log messages are enabled for a particular log.
|
|
192
|
+
* Use this to avoid doing expensive argument marshalling leading into a call
|
|
193
|
+
* to os_signpost_*
|
|
194
|
+
*
|
|
195
|
+
* @param log
|
|
196
|
+
* Log handle previously created with os_log_create.
|
|
197
|
+
*
|
|
198
|
+
* @result
|
|
199
|
+
* Returns ‘true’ if signpost log messages are enabled.
|
|
200
|
+
*/
|
|
201
|
+
API_AVAILABLE(macos(10.14), ios(12.0), tvos(12.0), watchos(5.0))
|
|
202
|
+
OS_EXPORT OS_NOTHROW OS_PURE OS_WARN_RESULT
|
|
203
|
+
bool
|
|
204
|
+
os_signpost_enabled(os_log_t log);
|
|
205
|
+
#pragma mark - Interval begin/end
|
|
206
|
+
|
|
207
|
+
/*!
|
|
208
|
+
* @function os_signpost_interval_begin
|
|
209
|
+
*
|
|
210
|
+
* @abstract
|
|
211
|
+
* Begins a signposted interval.
|
|
212
|
+
*
|
|
213
|
+
* @param log
|
|
214
|
+
* Log handle previously created with os_log_create.
|
|
215
|
+
*
|
|
216
|
+
* @param interval_id
|
|
217
|
+
* An ID for the event, see Signpost IDs above.
|
|
218
|
+
*
|
|
219
|
+
* @param name
|
|
220
|
+
* The name of this event. This must be a string literal.
|
|
221
|
+
*
|
|
222
|
+
* @param ... (format + arguments)
|
|
223
|
+
* Additional information to include with this signpost. This format string
|
|
224
|
+
* must be a string literal, as with the os_log family of functions.
|
|
225
|
+
*/
|
|
226
|
+
#define os_signpost_interval_begin(log, interval_id, name, ...) \
|
|
227
|
+
os_signpost_emit_with_type(log, OS_SIGNPOST_INTERVAL_BEGIN, \
|
|
228
|
+
interval_id, name, ##__VA_ARGS__)
|
|
229
|
+
|
|
230
|
+
/*!
|
|
231
|
+
* @function os_signpost_animation_interval_begin
|
|
232
|
+
*
|
|
233
|
+
* @abstract
|
|
234
|
+
* Begins a signposted interval that is tagged as an animation.
|
|
235
|
+
*
|
|
236
|
+
* @param log
|
|
237
|
+
* Log handle previously created with os_log_create.
|
|
238
|
+
*
|
|
239
|
+
* @param interval_id
|
|
240
|
+
* An ID for the event, see Signpost IDs above.
|
|
241
|
+
*
|
|
242
|
+
* @param name
|
|
243
|
+
* The name of this event. This must be a string literal.
|
|
244
|
+
*
|
|
245
|
+
* @param ... (format + arguments)
|
|
246
|
+
* Additional information to include with this signpost. This format string
|
|
247
|
+
* must be a string literal, as with the os_log family of functions.
|
|
248
|
+
*/
|
|
249
|
+
#define os_signpost_animation_interval_begin(log, interval_id, name, ...) \
|
|
250
|
+
_os_signpost_animation_interval_begin(log, interval_id, name, \
|
|
251
|
+
"" __VA_ARGS__)
|
|
252
|
+
|
|
253
|
+
/*!
|
|
254
|
+
* @function os_signpost_interval_end
|
|
255
|
+
*
|
|
256
|
+
* @abstract
|
|
257
|
+
* Ends a signposted interval.
|
|
258
|
+
*
|
|
259
|
+
* @param log
|
|
260
|
+
* The log handle which was provided to os_signpost_interval_begin,
|
|
261
|
+
*
|
|
262
|
+
* @param interval_id
|
|
263
|
+
* The ID for the event which was provided to os_signpost_interval_begin. See
|
|
264
|
+
* Signpost IDs above.
|
|
265
|
+
*
|
|
266
|
+
* @param name
|
|
267
|
+
* The name of the event provided to os_signost_interval_begin. This must be a
|
|
268
|
+
* string literal.
|
|
269
|
+
*
|
|
270
|
+
* @param ... (format + arguments)
|
|
271
|
+
* Additional information to include with this signpost. This format string
|
|
272
|
+
* must be a string literal, as with the os_log family of functions.
|
|
273
|
+
*/
|
|
274
|
+
#define os_signpost_interval_end(log, interval_id, name, ...) \
|
|
275
|
+
os_signpost_emit_with_type(log, OS_SIGNPOST_INTERVAL_END, \
|
|
276
|
+
interval_id, name, ##__VA_ARGS__)
|
|
277
|
+
|
|
278
|
+
#pragma mark - Signpost event marking
|
|
279
|
+
|
|
280
|
+
/*!
|
|
281
|
+
* @function os_signpost_event_emit
|
|
282
|
+
*
|
|
283
|
+
* @abstract
|
|
284
|
+
* os_signpost_event_emit marks a point of interest in time with no duration.
|
|
285
|
+
*
|
|
286
|
+
* @param log
|
|
287
|
+
* Log handle previously created with os_log_create.
|
|
288
|
+
*
|
|
289
|
+
* @param event_id
|
|
290
|
+
* An ID for the event, see Signpost IDs above. This ID can be used to convey
|
|
291
|
+
* additional information about the event that is being emitted without
|
|
292
|
+
* incurring extra performance overhead.
|
|
293
|
+
*
|
|
294
|
+
* @param name
|
|
295
|
+
* The name of this event. This must be a string literal.
|
|
296
|
+
*
|
|
297
|
+
* @param ... (format + arguments)
|
|
298
|
+
* Additional information to include with this signpost. This format string
|
|
299
|
+
* must be a string literal, as with the os_log family of functions.
|
|
300
|
+
*/
|
|
301
|
+
#define os_signpost_event_emit(log, event_id, name, ...) \
|
|
302
|
+
os_signpost_emit_with_type(log, OS_SIGNPOST_EVENT, \
|
|
303
|
+
event_id, name, ##__VA_ARGS__)
|
|
304
|
+
|
|
305
|
+
#pragma mark - Points of Interest
|
|
306
|
+
|
|
307
|
+
/*!
|
|
308
|
+
* @const OS_LOG_CATEGORY_POINTS_OF_INTEREST
|
|
309
|
+
*
|
|
310
|
+
* Provide this value as the category to os_log_create to indicate that
|
|
311
|
+
* signposts on the resulting log handle provide high-level events that can be
|
|
312
|
+
* used to orient a developer looking at performance data. These will be
|
|
313
|
+
* displayed by default by performance tools like Instruments.app.
|
|
314
|
+
*/
|
|
315
|
+
#ifndef __swift__
|
|
316
|
+
#define OS_LOG_CATEGORY_POINTS_OF_INTEREST "PointsOfInterest"
|
|
317
|
+
#endif
|
|
318
|
+
|
|
319
|
+
#pragma mark - Dynamic Tracing
|
|
320
|
+
|
|
321
|
+
/*!
|
|
322
|
+
* @const OS_LOG_CATEGORY_DYNAMIC_TRACING
|
|
323
|
+
*
|
|
324
|
+
* Provide this value as the category to os_log_create to indicate that
|
|
325
|
+
* signposts emitted to the resulting log handle should be disabled by
|
|
326
|
+
* default, reducing the runtime overhead. os_signpost_enabled calls on
|
|
327
|
+
* the resulting log handle will only return 'true' when a performance
|
|
328
|
+
* tool like Instruments.app is recording.
|
|
329
|
+
*/
|
|
330
|
+
#if OS_LOG_TARGET_HAS_10_15_FEATURES
|
|
331
|
+
#ifndef __swift__
|
|
332
|
+
#define OS_LOG_CATEGORY_DYNAMIC_TRACING "DynamicTracing"
|
|
333
|
+
#endif
|
|
334
|
+
#endif
|
|
335
|
+
|
|
336
|
+
/*!
|
|
337
|
+
* @const OS_LOG_CATEGORY_DYNAMIC_STACK_TRACING
|
|
338
|
+
*
|
|
339
|
+
* Provide this value as the category to os_log_create to indicate that
|
|
340
|
+
* signposts emitted to the resulting log handle should capture user
|
|
341
|
+
* backtraces. This behavior is more expensive, so os_signpost_enabled
|
|
342
|
+
* will only return 'true' when a performance tool like Instruments.app
|
|
343
|
+
* is recording.
|
|
344
|
+
*/
|
|
345
|
+
#if OS_LOG_TARGET_HAS_10_15_FEATURES
|
|
346
|
+
#ifndef __swift__
|
|
347
|
+
#define OS_LOG_CATEGORY_DYNAMIC_STACK_TRACING "DynamicStackTracing"
|
|
348
|
+
#endif
|
|
349
|
+
#endif
|
|
350
|
+
|
|
351
|
+
#pragma mark - Signpost Internals
|
|
352
|
+
|
|
353
|
+
/*!
|
|
354
|
+
* @typedef os_signpost_type_t
|
|
355
|
+
*
|
|
356
|
+
* @brief
|
|
357
|
+
* The type of a signpost tracepoint, do not use directly.
|
|
358
|
+
*/
|
|
359
|
+
OS_ENUM(os_signpost_type, uint8_t,
|
|
360
|
+
OS_SIGNPOST_EVENT = 0x00,
|
|
361
|
+
OS_SIGNPOST_INTERVAL_BEGIN = 0x01,
|
|
362
|
+
OS_SIGNPOST_INTERVAL_END = 0x02,
|
|
363
|
+
);
|
|
364
|
+
#ifndef __swift__
|
|
365
|
+
#define OS_SIGNPOST_TYPE_MASK 0x03
|
|
366
|
+
#endif
|
|
367
|
+
|
|
368
|
+
#define _OS_SIGNPOST_ANIMATION_INTERVAL_TAG "isAnimation=YES"
|
|
369
|
+
|
|
370
|
+
#define _os_signpost_animation_interval_begin(log, spid, name, fmt, ...) \
|
|
371
|
+
os_signpost_interval_begin(log, spid, name, \
|
|
372
|
+
fmt " " _OS_SIGNPOST_ANIMATION_INTERVAL_TAG, \
|
|
373
|
+
##__VA_ARGS__)
|
|
374
|
+
|
|
375
|
+
API_AVAILABLE(macos(10.14), ios(12.0), tvos(12.0), watchos(5.0))
|
|
376
|
+
OS_EXPORT OS_NOTHROW OS_NOT_TAIL_CALLED
|
|
377
|
+
void
|
|
378
|
+
_os_signpost_emit_with_name_impl(void *dso, os_log_t log,
|
|
379
|
+
os_signpost_type_t type, os_signpost_id_t spid, const char *name,
|
|
380
|
+
const char *format, uint8_t *buf, uint32_t size);
|
|
381
|
+
|
|
382
|
+
#define _os_signpost_emit_with_type(emitfn, log, type, spid, name, ...) \
|
|
383
|
+
__extension__({ \
|
|
384
|
+
os_log_t _log_tmp = (log); \
|
|
385
|
+
os_signpost_type_t _type_tmp = (type); \
|
|
386
|
+
os_signpost_id_t _spid_tmp = (spid); \
|
|
387
|
+
if (_spid_tmp != OS_SIGNPOST_ID_NULL && \
|
|
388
|
+
_spid_tmp != OS_SIGNPOST_ID_INVALID && \
|
|
389
|
+
os_signpost_enabled(_log_tmp)) { \
|
|
390
|
+
OS_LOG_CALL_WITH_FORMAT_NAME((emitfn), \
|
|
391
|
+
(&__dso_handle, _log_tmp, _type_tmp, _spid_tmp), \
|
|
392
|
+
name, "" __VA_ARGS__); \
|
|
393
|
+
} \
|
|
394
|
+
})
|
|
395
|
+
|
|
396
|
+
#if OS_LOG_TARGET_HAS_10_14_FEATURES
|
|
397
|
+
#define os_signpost_emit_with_type(log, type, spid, name, ...) \
|
|
398
|
+
_os_signpost_emit_with_type(_os_signpost_emit_with_name_impl, log, \
|
|
399
|
+
type, spid, name, ##__VA_ARGS__)
|
|
400
|
+
#else
|
|
401
|
+
#define os_signpost_emit_with_type(log, type, spid, name, ...) \
|
|
402
|
+
__extension__({ \
|
|
403
|
+
if (_os_signpost_emit_with_name_impl != NULL) { \
|
|
404
|
+
_os_signpost_emit_with_type(_os_signpost_emit_with_name_impl, log, \
|
|
405
|
+
type, spid, name, ##__VA_ARGS__); \
|
|
406
|
+
} \
|
|
407
|
+
})
|
|
408
|
+
#endif
|
|
409
|
+
|
|
410
|
+
OS_ASSUME_NONNULL_END
|
|
411
|
+
|
|
412
|
+
__END_DECLS
|
|
413
|
+
|
|
414
|
+
#endif // __OS_SIGNPOST_H__
|
|
@@ -1,22 +1,6 @@
|
|
|
1
1
|
#pragma once
|
|
2
|
-
// the installed libc owns errno
|
|
3
|
-
//
|
|
4
|
-
//
|
|
5
|
-
//
|
|
2
|
+
// the installed libc owns errno, a thread-local where darwin's sys/errno.h
|
|
3
|
+
// reads __error(). its numbers are darwin's, every name of darwin's
|
|
4
|
+
// sys/errno.h at darwin's value, so this overlay only routes darwin's
|
|
5
|
+
// errno.h to it.
|
|
6
6
|
#include_next <errno.h>
|
|
7
|
-
#define EFTYPE 79
|
|
8
|
-
#define EAUTH 80
|
|
9
|
-
#define ENEEDAUTH 81
|
|
10
|
-
#define EPWROFF 82
|
|
11
|
-
#define EDEVERR 83
|
|
12
|
-
#define EBADEXEC 85
|
|
13
|
-
#define EBADARCH 86
|
|
14
|
-
#define ESHLIBVERS 87
|
|
15
|
-
#define EBADMACHO 88
|
|
16
|
-
#define ENOATTR 93
|
|
17
|
-
#define ENODATA 96
|
|
18
|
-
#define ENOSR 98
|
|
19
|
-
#define ENOSTR 99
|
|
20
|
-
#define ETIME 101
|
|
21
|
-
#define ENOPOLICY 103
|
|
22
|
-
#define EQFULL 106
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
#undef pthread_setname_np
|
|
7
7
|
#include <sys/_pthread/_pthread_types.h>
|
|
8
8
|
#include <peach/pthread.h>
|
|
9
|
+
#include <pthread/pthread_impl.h>
|
|
9
10
|
#include <pthread/qos.h>
|
|
10
11
|
|
|
11
12
|
// darwin numbers its cancel states and types its own way, keeps cleanup
|
|
@@ -31,6 +32,8 @@
|
|
|
31
32
|
#define PTHREAD_RECURSIVE_MUTEX_INITIALIZER {{{PTHREAD_MUTEX_RECURSIVE}}}
|
|
32
33
|
|
|
33
34
|
__BEGIN_DECLS
|
|
35
|
+
// wasi hides scheduling parameters, but its attribute owns their stored value.
|
|
36
|
+
int pthread_attr_setschedparam(pthread_attr_t *__restrict, const struct sched_param *__restrict);
|
|
34
37
|
int pthread_is_threaded_np(void);
|
|
35
38
|
int pthread_main_np(void);
|
|
36
39
|
// the installed libc's pthread_t is an integer, so it takes no nullability.
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
// darwin's setjmp.h over the installed libc's. setjmp, longjmp, _setjmp and
|
|
2
|
+
// _longjmp are the compiler backend's under -mllvm -wasm-enable-sjlj, which
|
|
3
|
+
// every native target passes; the backend lowers those direct calls by name
|
|
4
|
+
// and -lsetjmp carries the four primitives. sigsetjmp and siglongjmp add the
|
|
5
|
+
// real emulated signal mask around them.
|
|
6
|
+
//
|
|
7
|
+
// sigsetjmp must be a macro: only a setjmp call in the caller's own
|
|
8
|
+
// translation unit captures the caller's machine state. a plain function
|
|
9
|
+
// would capture its own frame, which has returned by the time siglongjmp
|
|
10
|
+
// runs. statement expressions evaluate env and the value operand exactly
|
|
11
|
+
// once, as the native functions do. the mask lives in the musl-ABI __ss
|
|
12
|
+
// words of jmp_buf, which nothing else on this target uses, and __fl records
|
|
13
|
+
// whether this buffer saved one, as musl does.
|
|
14
|
+
//
|
|
15
|
+
// boundary, matching upstream WASI: only direct calls lower. indirect uses
|
|
16
|
+
// fail loudly: the backend refuses address-taken setjmp, and every other
|
|
17
|
+
// address-taking fails at link time, as it does today. there is no
|
|
18
|
+
// addressable setjmp symbol on this target or upstream. direct calls have
|
|
19
|
+
// full native semantics, proved against the macOS oracle.
|
|
20
|
+
#ifndef __peach_darwin_setjmp_h
|
|
21
|
+
#define __peach_darwin_setjmp_h
|
|
22
|
+
|
|
23
|
+
#include_next <setjmp.h>
|
|
24
|
+
|
|
25
|
+
#ifdef __cplusplus
|
|
26
|
+
extern "C" {
|
|
27
|
+
#endif
|
|
28
|
+
|
|
29
|
+
// mask round-trip through the real sigprocmask provider. declared here so
|
|
30
|
+
// this header needs no signal types; defined beside the signal provider.
|
|
31
|
+
void __peach_sigmask_save(unsigned long *slot);
|
|
32
|
+
void __peach_sigmask_restore(const unsigned long *slot);
|
|
33
|
+
|
|
34
|
+
#ifdef __cplusplus
|
|
35
|
+
}
|
|
36
|
+
#endif
|
|
37
|
+
|
|
38
|
+
#undef sigsetjmp
|
|
39
|
+
#define sigsetjmp(env, savesigs) \
|
|
40
|
+
({ \
|
|
41
|
+
__typeof__((env)[0]) *_e = &(env)[0]; \
|
|
42
|
+
int _s = (savesigs); \
|
|
43
|
+
_s ? (__peach_sigmask_save(_e->__ss), _e->__fl = 1, setjmp(_e)) \
|
|
44
|
+
: (_e->__fl = 0, setjmp(_e)); \
|
|
45
|
+
})
|
|
46
|
+
|
|
47
|
+
#undef siglongjmp
|
|
48
|
+
#define siglongjmp(env, val) \
|
|
49
|
+
({ \
|
|
50
|
+
__typeof__((env)[0]) *_e = &(env)[0]; \
|
|
51
|
+
int _v = (val); \
|
|
52
|
+
_e->__fl ? (__peach_sigmask_restore((const unsigned long *)_e->__ss), \
|
|
53
|
+
longjmp(_e, _v)) \
|
|
54
|
+
: longjmp(_e, _v); \
|
|
55
|
+
})
|
|
56
|
+
|
|
57
|
+
#endif
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#pragma once
|
|
2
2
|
// darwin's resource limit numbers and record, and the rusage_info_t handle,
|
|
3
3
|
// which the installed libc leaves out because wasi has no resource limits.
|
|
4
|
-
// getrlimit and setrlimit bind to
|
|
5
|
-
//
|
|
4
|
+
// getrlimit and setrlimit bind to the descriptor table's darwin provider.
|
|
5
|
+
// only RLIMIT_NOFILE has a resource owner in this single wasm instance.
|
|
6
6
|
#include_next <sys/resource.h>
|
|
7
7
|
#include <sys/cdefs.h>
|
|
8
8
|
#include <stdint.h>
|
package/sdk/native-hashes.json
CHANGED
|
@@ -66,9 +66,9 @@
|
|
|
66
66
|
{
|
|
67
67
|
"path": "System/Library/Frameworks/Foundation.framework/Headers/Foundation.apinotes",
|
|
68
68
|
"nativeSha256": "025956c54d34391f2c422b736710641a860694436f5b8a34d719ade2d9ed3220",
|
|
69
|
-
"sha256": "
|
|
70
|
-
"change": "
|
|
71
|
-
"reason": "the
|
|
69
|
+
"sha256": "7664ec9d007c75aef5647b354cb3e21445723ed39ec3790adafd8e8dc15a2195",
|
|
70
|
+
"change": "hide NSArray arrayWithObjects:count: from Swift, nest FileManager sync control and URLSession delayed request and multipath enums, import networking singleton and selector names, and hide native members whose Swift implementation supplies the existing typed declaration",
|
|
71
|
+
"reason": "the Objective-C header owns the networking classes and categories; their Swift implementation must use the native imported names without the obsolete moved-type aliases or duplicate Swift-owned session classes"
|
|
72
72
|
},
|
|
73
73
|
{
|
|
74
74
|
"path": "wasm/include/AvailabilityInternal.h",
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: peach-debug
|
|
3
|
-
model: sm
|
|
4
3
|
description: Debug rendering, animation, gesture, performance, and accessibility issues in a React Native app under Peach. Use when an animation janks, snaps, or stalls, a gesture misbehaves, scrolling drops frames, the tree or props look wrong, or a screen reader cannot reach something. Use the peach CLI first.
|
|
5
4
|
---
|
|
6
5
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: peach-perf
|
|
3
|
-
model: sm
|
|
4
3
|
description: Optimize Peach engine and app performance: scroll jank, dropped frames, slow animation, idle CPU, memory growth, and lag under load. Covers measuring on the right thread, proving perf tiers engage via counters, a CPU-contention harness, and perf machinery. For debugging load peach-debug first.
|
|
5
4
|
---
|
|
6
5
|
|