Instruments

RSS for tag

Instruments is a performance-analysis and testing tool for iOS, iPadOS, watchOS, tvOS, and macOS apps.

Instruments Documentation

Posts under Instruments subtopic

Post

Replies

Boosts

Views

Activity

How to symbolicate .xchanglog traces locally for hangs reported via xcode organiser
Hello, I am trying to analyse the hang logs stacktrace which are reported via xcode organiser for my app. The json .xchanglog files which are generated are not symbolicated. I was trying out the the recommendations which are used to symbolicate .crash logs but it did not work for me. Is there an apple recommendation on how we can symbolicate/analyse .xchanglog logs locally? Note: I have dSYM files available on my mac. The uuid are matched. Command i am using is replacing the correct values: % atos -arch BinaryArchitecture -o PathToDSYMFile/Contents/Resources/DWARF/BinaryName -l LoadAddress AddressesToSymbolicate Things tried: https://developer.apple.com/documentation/xcode/interpreting-the-json-format-of-a-crash-report https://developer.apple.com/documentation/xcode/adding-identifiable-symbol-names-to-a-crash-report Thanks!
0
0
1.2k
Feb ’23
16GB memory limit for iPad apps running on Apple Silicon Macs
I seem to be hitting a 16GB memory limit for my iPadOS app running under macOS on Apple Silicon. I can't find this limit documented or discussed anywhere else, so I'm posting here in the hopes of getting confirmation that it's official (as opposed to coincidental) and seeing if there's a way to lift or remove this limit. Background I have an iOS / iPadOS app that uses concurrency to solve puzzles. I have a Torture Test Puzzle that I use to stress-test the app. The Torture Test Puzzle results in millions of NSBlockOperations on a NSOperationQueue with a concurrency limit of ProcessInfo.processInfo.activeProcessorCount - 1 The app also uses Swift "copy on write" semantics to give each operation its own variation of the game model struct, so there are corresponding Swift.***Storage objects as well. Each of these objects is small (272 bytes for the block operations) but collectively, they add up to several GB. During a successful run, the peak memory usage of the app exceeds 50GB, as measured by Instruments and macOS Activity Monitor. When running the iPad app on the Apple Silicon Mac, it receives a memory warning (AppDelegate.applicationDidReceiveMemoryWarning) when usage hits 16GB. The app normally halts the solver and displays an error when that happens, but if I disable the watchdog, it crashes just as it would on a real iPad. Where it works and doesn't The app does not run out of memory when I build for Mac Catalyst or the Xcode Simulator: Hardware  Xcode Simulator   Mac Catalyst   "Designed for iPad"  2018 Mac mini, Core i3, 64GB RAM   ✓   ✓   (n/a)  2023 MacBook Pro, M2, 96GB RAM   ✓   ✓   ❌ Note: the choice of simulator is irrelevant. Even an iPod touch simulator runs to completion. What does the kernel say? In both the Catalyst and Simulator scenarios, os_proc_available_memory() reports 0 which I assume means "no limit." Whereas, under "Designed for iPad" it reports 17164220800 i.e. 16GB. So I assume this is a deliberate limit… I just see no documentation around it. What I've tried Increased Memory Limit I've tried adding the com.apple.developer.kernel.increased-memory-limit entitlement to the app. No change. — I've verified that the entitlement shows up in Xcode under Signing & Capabilities. — I've verified that the entitlement shows up in my developer account under Certificates, Identifiers & Profiles. — I've tried Quinn's trick of adding the additional Private VPN entitlement to the Mac build just to make sure Xcode picks it up. Extended Virtual Addressing I've tried adding the com.apple.developer.kernel.extended-virtual-addressing entitlement to the app. Made it worse. The app now runs out of memory at ~3.2GB. Note I don't see a forum tag specifically for questions related to "Designed for iPad apps running on Apple Silicon Macs," but please educate me if I missed one.
2
1
3.2k
Feb ’23
What's the difference between 'Profile' and 'Total PMC Aggregation'?
After logging trace for 'CPU Counters' template, we can see two views (Profile and Total PMC Aggregation) from detail area. We got some different data from these two views. For example: Samples: 'Total PMC Aggregation' has more samples than 'Profile' Process: We can see more process from 'Total PMC Aggregation' than 'Profile'. For example, Unknown(0) is shown on 'Total PMC Aggregation' but not on 'Profile'. Other than above, the same counter value between these two views are also different. Can anyone guide us what's the difference and why? Thanks.
0
0
769
Jan ’23
Strategies for minimizing OOM crashes?
Hello, We are facing many memory related crashes. Right now this is our top crash reason and after reading through many other useful posts in the forums, such as "how Xcode to calculate Memory" where @eskimo provided lots of useful info, and talks such as iOS Memory Deep Dive I figured out it was time to post a new thread to see if anyone can help. Our crashes generally happen when drawing a PDF (using PDFKit's draw(with:to:)), although they also happen in other places where memory is needed such as Array.insert (which ends up calling swift_slowAlloc and swift_slowAlloc.cold), or std::bad_alloc. The exceptions are either EXC_BREAKPOINT on CFRetain, NSMallocException (Failed to grow buffer), or the previously mentioned std:bad_alloc. In addition to this, we have many other OOM that are not tracked by our crash reporting tool. For crashes that are reported, the average free RAM our users have ranges from 30 MB to 120 MB. In other cases the user seems to have 400 MB of free RAM or even more. I have a few questions around this that I hope are also useful for other folks. Besides general recommendations of using less memory in general, what's the recommended approach for minimizing these memory issues? Most of our disposable memory is in held in NSCaches (with reasonable total cost limits and properly calculated cost per object). On this case, is it recommended to handle the NSMallocExceptions, try to free memory, and retry the operation? As mentioned, in many cases we don't even get memory warnings prior to the crashes. I'm wondering if memory fragmentation is also affecting us, but I don't think there's much we can do about this. I noticed PDFKit requesting allocations as large as 30 MB to render a 100x100 thumbnail (when I simulated a situation where I ran out of VM, I caught that with the ASAN, which reports the memory that was attempted to be allocated). Another alternative I could think of is to try to use os_proc_available_memory() and try to free some memory if memory is low. The reasoning behind this is that since we have no way to know how much memory the operation it's going to use, but we have data of free memory of users with crashes, we could try to free up memory to be above that. I'm not sure how effective would that be though. As some of these users seem to have enough RAM, they might be running out of virtual memory. What's the best way to track Virtual Memory, to use it as a hint in our crash reports? Reading the virtual_size from task_vm_info in my iPad returns over 400 GB. I was expecting this to be the virtual used size, like the size that gets reported on the VM Tracker instrument. I mention this because I was able to reproduce these crashes by memory mapping ~50 GB of a 200 MB file in a 2017 iPad Pro, and then doing other unrelated memory operations. For apps that are document based, with arbitrary-sized documents, is it recommended to ask for the extended virtual addressing entitlement and the increased memory limit one? Could these help on lower end devices? Would listening to memory pressure events help at all? There's a .warning and .critical memory pressure events. I'm wondering wether the system wide warnings only are sent when the memory pressure is critical, although it doesn't look like it looking at the names of the constants. If I'm using NSCache, is it safe (memory compression wise) to empty the cache under some circumstances? Put it in a different way: does emptying an NSCache causes the memory compressor to decompress the data? Are there any other recommendations or things that I might have missed? Thanks a lot in advance!
0
1
2.2k
Dec ’22
XCode 14 & Firebase Crashlytics
I have not been able to find much chatter at all about the impact of not having dsym files via TestFlight to support Crashlytics reporting. Currently, I download the files from TestFlight and then upload them to Firebase. Then, a Slack integration is used to notify me when there is a new crash that needs to be investigated. Does the new change to XCode 14 basically remove Crashlytics from equation? Since I rely on Apple to sign the apps, I'm assuming that nothing local can be used. But, I'm also "still learning". Any insights/suggestions are appreciated.
7
0
7.1k
Dec ’22
xctrace does not collect any data and stuck infinitly
➜ ~ xcrun xctrace record --template 'App Launch' --device 'xxxxxx' --output ~/Downloads/test.trace --launch 'yyyyy.app' Waiting for device to boot Starting recording with the App Launch template. Launching process: NOW研发版.app.  Ctrl-C to stop the recording Reached specified time limit, ending recording... xctrace could not ending recording in 30 minutes, it seems it will not ending at all.
1
0
917
Dec ’22
Embedding existing lane/track in custom Instrument
I have a custom Instrument that is generally paired with Apple's HTTP Traffic instrument. Combining them in a template is inconvenient because there is no way to automatically filter to just the URLSession I want. The user must drill down into a long list of sessions and servers every time the instrument is run. The layout is also awkward because my Instrument's output is a long way from the specific HTTP track I want. Pinning these specific tracks is good, but has to be done every time and cannot be saved as a template. I would like to extract the relevant information directly into my custom instrument, so just the information I want is visible, and in an order that is useful. I can import the data from HTTPTracing and build my own tables, but is there a way to import the plot itself and reuse it? I would rather not have to re-implement Apple's fairly complex plot. If not, is there a way to access Apple's code for the HTTPTracing plots so that I can add it in my own instrument?
0
0
1.2k
Nov ’22
In custom Instrument, how can I include the duration in a value
I have a custom Instrument with a os-signpost-interval-schema that captures a "state" string. I would like the final plot value to be <state>: <duration>, but I don't know how to get the duration into the string. My working schema is the following, which just stores the state itself in the column: <os-signpost-interval-schema> <id>state-interval</id> <title>State Interval</title> <subsystem>"..."</subsystem> <category>"..."</category> <name>"state"</name> <start-pattern> <message>?state</message> </start-pattern> <column> <mnemonic>state</mnemonic> <title>State</title> <type>string</type> <expression>?state</expression> </column> </os-signpost-interval-schema> I would like to change the expression in the column to (str-cat ?state ": " ?duration), but that fails with: Variable '?duration' must appear in a pattern element to be used in a later expression. I don't see any way to compute this later in the graph, lane, or plot. I've also tried explicitly creating a <duration-column>, but that doesn't seem to change anything. The rest of the pieces include the table: <create-table> <id>state-table</id> <schema-ref>state-interval</schema-ref> </create-table> And the lane, which I would like to display as <state>: <duration> rather than just the duration: <lane> <title>State</title> <table-ref>state-table</table-ref> <plot> <value-from>state</value-from> </plot> </lane>
1
1
1.3k
Nov ’22
Activity Monitor and Instruments show different memory usage
While doing some persistent testing against our product (the target is a system extension), we noticed huge memory usage (1Gig+) reported by the Activity Monitor. However when we sat down to actually profile the memory usage, we noticed Intruments tool only reported ~200MB overall usage against the same process (same PID). These 2 numbers were observed at the same time. We knew that our system extension had processed some intense events during the persistent testing and its heap usage peaked at around 800 or perhaps 900MB at a time in the memory profiling; But since at the end of profiling the heap usage dropped to ~200MB I'd say we are good (we trust the Instruments result mostly). However how do we explain the fact Activity Monitor still reported the 1Gig usage (and I knew there were also confusion around the "real memory" or "private memory" stuff, the "1Gig" number referred here was from the "Memory" column from Activity Monitor)? Mostly, our concern is that since the Activity Monitor is an end user facing utility, they'd potentially look at the big number and come back complaining about our memory usage. If this happens is it ok for us to explain that the actual memory usage by our program is less than what Activity Monitor shows?
0
0
1.5k
Nov ’22
Instruments App Launch: What's being initialized in Static Initializer
I'd like to know if there's a way to determine what's being initialized in the Static Initializer Calls Section of the App Launch Template in Instruments. I see large blocks of stuff being initialized but it only gives me a hex reference, I'd like to know exactly what's the problem (what's being initialized) so I can move it elsewhere.
1
0
1.3k
Nov ’22
Media Stream Validator on iPad(9th generation)
Hello, i want to make some tests with the Media Stream Validator (present on HTTP Live Streaming Tools), i have read already a few times that is not possible since it's a .dmg file. Can you please confirm if it's possible or not to have this tool on an iPad? if it's possible can you let me know if there is any documentation or some extra steps to do? Thank you in advance! Regards.
1
0
710
Oct ’22
Can't find my Apple TV device at my Xcode Instruments tool
I can use Xcode 13.1 to install/run my tvOS App on an Apple TV Device (with tvOS 15.1.1) (i.e. Xcode has paired with my Apple TV wirelessly), but the instrument tool (13.0) can't detect my Apple TV and only shows my Mac and my iPhone (which is connected via cable). Anyone has any idea whether wireless instrumentation is supported or not? If not supported, any alternative hack? Thx ahead.
8
0
3.6k
Sep ’22
Points of Interest for iOS targets in Xcode 11.4 not working?
I use “Points of Interest” signposts and ranges all the time. But with Xcode 11.4, I’m no longer seeing signposts for my iOS targets. Is this a known issue?import os.log private let pointsOfInterest = OSLog(subsystem: "PointsOfInterestDemo", category: .pointsOfInterest) class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() os_signpost(.event, log: pointsOfInterest, name: "viewDidLoad") } @IBAction func didTapStartRange(_ sender: Any) { let id = OSSignpostID(log: pointsOfInterest) os_signpost(.begin, log: pointsOfInterest, name: "didTapStartRange", signpostID: id) DispatchQueue.main.asyncAfter(deadline: .now() + 3) { os_signpost(.end, log: pointsOfInterest, name: "didTapStartRange", signpostID: id) } os_log("didTapStartRange") } @IBAction func didTapSignpost(_ sender: Any) { os_signpost(.event, log: pointsOfInterest, name: #function) os_log("didTapSignpost") } }It works in Xcode 11.3.1 (11C505), but not Xcode 11.4 (11E146). And in Xcode 11.4, it works for macOS targets, but not iOS targets. I’m running Catalina 10.15.4 (19E266) on MacBook Pro (15-inch, 2018). I tried deferred recording, and 13.2 simulator target, all with no joy.
4
0
2.8k
Sep ’22
Understanding System Trace's Main Thread 'Blocked'
We've lots and lots going on at startup, but in particular we've some items which can for a very short period of time block the main thread, causing a UITableView stutter on scroll.https://imgur.com/a/RWDvFJzUsing the 'System Trace' tool, we can clearly see on the Main Thread some 'blocked' states. However, I'm finding it difficult to pinpoint down in code where this happens.If I find the 'mach_msg_trap' associated with a particular blocking item, the Stack on the right has a basic stack (see: https://imgur.com/a/tNnXQvh), but double clicking on main brings a function which couldn't possibly be the cause of a blocker (as it's a ViewModel which in this case doesn't get initialized in this flow).Is it possible to fixture out, even what thread is blocking, so I can find that thread at the time, and look at it's call stack?
2
0
7.6k
Sep ’22
Razer mouse won't connect
I bought a Razer Basilisk X Hypersped mouse to be able to upgrade my experience in my Mac device. I've tried to make the settings in the mouse change according to what Mac lets me do. I'm trying downloading different softwares to help it do its functions, also I've tried downloading the original software from Razer and still doesn't work. I've also tried to connect the mouse via bluetooth and still the mouse won't be recognized. I believe this can be fixed by just pure software adjustments by MacOs. Please help me! Its sad to have an apple device and HAVING to buy an apple peripheral for it to work properly.!!!
0
0
1.7k
Sep ’22
How to symbolicate .xchanglog traces locally for hangs reported via xcode organiser
Hello, I am trying to analyse the hang logs stacktrace which are reported via xcode organiser for my app. The json .xchanglog files which are generated are not symbolicated. I was trying out the the recommendations which are used to symbolicate .crash logs but it did not work for me. Is there an apple recommendation on how we can symbolicate/analyse .xchanglog logs locally? Note: I have dSYM files available on my mac. The uuid are matched. Command i am using is replacing the correct values: % atos -arch BinaryArchitecture -o PathToDSYMFile/Contents/Resources/DWARF/BinaryName -l LoadAddress AddressesToSymbolicate Things tried: https://developer.apple.com/documentation/xcode/interpreting-the-json-format-of-a-crash-report https://developer.apple.com/documentation/xcode/adding-identifiable-symbol-names-to-a-crash-report Thanks!
Replies
0
Boosts
0
Views
1.2k
Activity
Feb ’23
16GB memory limit for iPad apps running on Apple Silicon Macs
I seem to be hitting a 16GB memory limit for my iPadOS app running under macOS on Apple Silicon. I can't find this limit documented or discussed anywhere else, so I'm posting here in the hopes of getting confirmation that it's official (as opposed to coincidental) and seeing if there's a way to lift or remove this limit. Background I have an iOS / iPadOS app that uses concurrency to solve puzzles. I have a Torture Test Puzzle that I use to stress-test the app. The Torture Test Puzzle results in millions of NSBlockOperations on a NSOperationQueue with a concurrency limit of ProcessInfo.processInfo.activeProcessorCount - 1 The app also uses Swift "copy on write" semantics to give each operation its own variation of the game model struct, so there are corresponding Swift.***Storage objects as well. Each of these objects is small (272 bytes for the block operations) but collectively, they add up to several GB. During a successful run, the peak memory usage of the app exceeds 50GB, as measured by Instruments and macOS Activity Monitor. When running the iPad app on the Apple Silicon Mac, it receives a memory warning (AppDelegate.applicationDidReceiveMemoryWarning) when usage hits 16GB. The app normally halts the solver and displays an error when that happens, but if I disable the watchdog, it crashes just as it would on a real iPad. Where it works and doesn't The app does not run out of memory when I build for Mac Catalyst or the Xcode Simulator: Hardware  Xcode Simulator   Mac Catalyst   "Designed for iPad"  2018 Mac mini, Core i3, 64GB RAM   ✓   ✓   (n/a)  2023 MacBook Pro, M2, 96GB RAM   ✓   ✓   ❌ Note: the choice of simulator is irrelevant. Even an iPod touch simulator runs to completion. What does the kernel say? In both the Catalyst and Simulator scenarios, os_proc_available_memory() reports 0 which I assume means "no limit." Whereas, under "Designed for iPad" it reports 17164220800 i.e. 16GB. So I assume this is a deliberate limit… I just see no documentation around it. What I've tried Increased Memory Limit I've tried adding the com.apple.developer.kernel.increased-memory-limit entitlement to the app. No change. — I've verified that the entitlement shows up in Xcode under Signing & Capabilities. — I've verified that the entitlement shows up in my developer account under Certificates, Identifiers & Profiles. — I've tried Quinn's trick of adding the additional Private VPN entitlement to the Mac build just to make sure Xcode picks it up. Extended Virtual Addressing I've tried adding the com.apple.developer.kernel.extended-virtual-addressing entitlement to the app. Made it worse. The app now runs out of memory at ~3.2GB. Note I don't see a forum tag specifically for questions related to "Designed for iPad apps running on Apple Silicon Macs," but please educate me if I missed one.
Replies
2
Boosts
1
Views
3.2k
Activity
Feb ’23
What's the difference between 'Profile' and 'Total PMC Aggregation'?
After logging trace for 'CPU Counters' template, we can see two views (Profile and Total PMC Aggregation) from detail area. We got some different data from these two views. For example: Samples: 'Total PMC Aggregation' has more samples than 'Profile' Process: We can see more process from 'Total PMC Aggregation' than 'Profile'. For example, Unknown(0) is shown on 'Total PMC Aggregation' but not on 'Profile'. Other than above, the same counter value between these two views are also different. Can anyone guide us what's the difference and why? Thanks.
Replies
0
Boosts
0
Views
769
Activity
Jan ’23
Xcode Instruments "App Launch". App Life Cycle timeline not shown
I watched WWDC 2019 - Session 423 - Optimizing App Launch and read documentation page "Reducing Your App's Launch Time" so I want to see my application launch metrics along with App Life Cycle timeline but I can't see it.Steps:- Launch Profile on simulator- Select App Launch- Wait...I can see metrics but not App Life Cycle timeline.
Replies
2
Boosts
1
Views
4.6k
Activity
Jan ’23
FREE TRIALS IF I GOT MY MAC
Hi guys I recently bought a new macbook air and i was wondering what free trials do i have with this purchase
Replies
0
Boosts
0
Views
696
Activity
Jan ’23
Strategies for minimizing OOM crashes?
Hello, We are facing many memory related crashes. Right now this is our top crash reason and after reading through many other useful posts in the forums, such as "how Xcode to calculate Memory" where @eskimo provided lots of useful info, and talks such as iOS Memory Deep Dive I figured out it was time to post a new thread to see if anyone can help. Our crashes generally happen when drawing a PDF (using PDFKit's draw(with:to:)), although they also happen in other places where memory is needed such as Array.insert (which ends up calling swift_slowAlloc and swift_slowAlloc.cold), or std::bad_alloc. The exceptions are either EXC_BREAKPOINT on CFRetain, NSMallocException (Failed to grow buffer), or the previously mentioned std:bad_alloc. In addition to this, we have many other OOM that are not tracked by our crash reporting tool. For crashes that are reported, the average free RAM our users have ranges from 30 MB to 120 MB. In other cases the user seems to have 400 MB of free RAM or even more. I have a few questions around this that I hope are also useful for other folks. Besides general recommendations of using less memory in general, what's the recommended approach for minimizing these memory issues? Most of our disposable memory is in held in NSCaches (with reasonable total cost limits and properly calculated cost per object). On this case, is it recommended to handle the NSMallocExceptions, try to free memory, and retry the operation? As mentioned, in many cases we don't even get memory warnings prior to the crashes. I'm wondering if memory fragmentation is also affecting us, but I don't think there's much we can do about this. I noticed PDFKit requesting allocations as large as 30 MB to render a 100x100 thumbnail (when I simulated a situation where I ran out of VM, I caught that with the ASAN, which reports the memory that was attempted to be allocated). Another alternative I could think of is to try to use os_proc_available_memory() and try to free some memory if memory is low. The reasoning behind this is that since we have no way to know how much memory the operation it's going to use, but we have data of free memory of users with crashes, we could try to free up memory to be above that. I'm not sure how effective would that be though. As some of these users seem to have enough RAM, they might be running out of virtual memory. What's the best way to track Virtual Memory, to use it as a hint in our crash reports? Reading the virtual_size from task_vm_info in my iPad returns over 400 GB. I was expecting this to be the virtual used size, like the size that gets reported on the VM Tracker instrument. I mention this because I was able to reproduce these crashes by memory mapping ~50 GB of a 200 MB file in a 2017 iPad Pro, and then doing other unrelated memory operations. For apps that are document based, with arbitrary-sized documents, is it recommended to ask for the extended virtual addressing entitlement and the increased memory limit one? Could these help on lower end devices? Would listening to memory pressure events help at all? There's a .warning and .critical memory pressure events. I'm wondering wether the system wide warnings only are sent when the memory pressure is critical, although it doesn't look like it looking at the names of the constants. If I'm using NSCache, is it safe (memory compression wise) to empty the cache under some circumstances? Put it in a different way: does emptying an NSCache causes the memory compressor to decompress the data? Are there any other recommendations or things that I might have missed? Thanks a lot in advance!
Replies
0
Boosts
1
Views
2.2k
Activity
Dec ’22
XCode 14 & Firebase Crashlytics
I have not been able to find much chatter at all about the impact of not having dsym files via TestFlight to support Crashlytics reporting. Currently, I download the files from TestFlight and then upload them to Firebase. Then, a Slack integration is used to notify me when there is a new crash that needs to be investigated. Does the new change to XCode 14 basically remove Crashlytics from equation? Since I rely on Apple to sign the apps, I'm assuming that nothing local can be used. But, I'm also "still learning". Any insights/suggestions are appreciated.
Replies
7
Boosts
0
Views
7.1k
Activity
Dec ’22
xctrace does not collect any data and stuck infinitly
➜ ~ xcrun xctrace record --template 'App Launch' --device 'xxxxxx' --output ~/Downloads/test.trace --launch 'yyyyy.app' Waiting for device to boot Starting recording with the App Launch template. Launching process: NOW研发版.app.  Ctrl-C to stop the recording Reached specified time limit, ending recording... xctrace could not ending recording in 30 minutes, it seems it will not ending at all.
Replies
1
Boosts
0
Views
917
Activity
Dec ’22
Hitches duration 37s,how find my problem
Hitches duration is 37s. Hitches type is "delay frame swap". Render do noting. GPU do noting. Main Thread is ok,touch screen can print,but the frame not update.
Replies
1
Boosts
2
Views
1.7k
Activity
Nov ’22
Embedding existing lane/track in custom Instrument
I have a custom Instrument that is generally paired with Apple's HTTP Traffic instrument. Combining them in a template is inconvenient because there is no way to automatically filter to just the URLSession I want. The user must drill down into a long list of sessions and servers every time the instrument is run. The layout is also awkward because my Instrument's output is a long way from the specific HTTP track I want. Pinning these specific tracks is good, but has to be done every time and cannot be saved as a template. I would like to extract the relevant information directly into my custom instrument, so just the information I want is visible, and in an order that is useful. I can import the data from HTTPTracing and build my own tables, but is there a way to import the plot itself and reuse it? I would rather not have to re-implement Apple's fairly complex plot. If not, is there a way to access Apple's code for the HTTPTracing plots so that I can add it in my own instrument?
Replies
0
Boosts
0
Views
1.2k
Activity
Nov ’22
In custom Instrument, how can I include the duration in a value
I have a custom Instrument with a os-signpost-interval-schema that captures a "state" string. I would like the final plot value to be <state>: <duration>, but I don't know how to get the duration into the string. My working schema is the following, which just stores the state itself in the column: <os-signpost-interval-schema> <id>state-interval</id> <title>State Interval</title> <subsystem>"..."</subsystem> <category>"..."</category> <name>"state"</name> <start-pattern> <message>?state</message> </start-pattern> <column> <mnemonic>state</mnemonic> <title>State</title> <type>string</type> <expression>?state</expression> </column> </os-signpost-interval-schema> I would like to change the expression in the column to (str-cat ?state ": " ?duration), but that fails with: Variable '?duration' must appear in a pattern element to be used in a later expression. I don't see any way to compute this later in the graph, lane, or plot. I've also tried explicitly creating a <duration-column>, but that doesn't seem to change anything. The rest of the pieces include the table: <create-table> <id>state-table</id> <schema-ref>state-interval</schema-ref> </create-table> And the lane, which I would like to display as <state>: <duration> rather than just the duration: <lane> <title>State</title> <table-ref>state-table</table-ref> <plot> <value-from>state</value-from> </plot> </lane>
Replies
1
Boosts
1
Views
1.3k
Activity
Nov ’22
Activity Monitor and Instruments show different memory usage
While doing some persistent testing against our product (the target is a system extension), we noticed huge memory usage (1Gig+) reported by the Activity Monitor. However when we sat down to actually profile the memory usage, we noticed Intruments tool only reported ~200MB overall usage against the same process (same PID). These 2 numbers were observed at the same time. We knew that our system extension had processed some intense events during the persistent testing and its heap usage peaked at around 800 or perhaps 900MB at a time in the memory profiling; But since at the end of profiling the heap usage dropped to ~200MB I'd say we are good (we trust the Instruments result mostly). However how do we explain the fact Activity Monitor still reported the 1Gig usage (and I knew there were also confusion around the "real memory" or "private memory" stuff, the "1Gig" number referred here was from the "Memory" column from Activity Monitor)? Mostly, our concern is that since the Activity Monitor is an end user facing utility, they'd potentially look at the big number and come back complaining about our memory usage. If this happens is it ok for us to explain that the actual memory usage by our program is less than what Activity Monitor shows?
Replies
0
Boosts
0
Views
1.5k
Activity
Nov ’22
Instruments App Launch: What's being initialized in Static Initializer
I'd like to know if there's a way to determine what's being initialized in the Static Initializer Calls Section of the App Launch Template in Instruments. I see large blocks of stuff being initialized but it only gives me a hex reference, I'd like to know exactly what's the problem (what's being initialized) so I can move it elsewhere.
Replies
1
Boosts
0
Views
1.3k
Activity
Nov ’22
Media Stream Validator on iPad(9th generation)
Hello, i want to make some tests with the Media Stream Validator (present on HTTP Live Streaming Tools), i have read already a few times that is not possible since it's a .dmg file. Can you please confirm if it's possible or not to have this tool on an iPad? if it's possible can you let me know if there is any documentation or some extra steps to do? Thank you in advance! Regards.
Replies
1
Boosts
0
Views
710
Activity
Oct ’22
How to get the cpu frequency for iPhone
I want to monitoring the realtime cpu frequency while debuging my application, Is there any way to get the ios cpu frequency?
Replies
0
Boosts
0
Views
1.3k
Activity
Oct ’22
Watch OS 9 Russian keyboard in iMessage
Hello, earlier in watchos 8 there was an unofficial opportunity to include the Russian and Spanish layout on the watch. with the update to watch os 9, this feature has disappeared. I would like to return it. to use the Russian and Spanish layout directly on the watch
Replies
0
Boosts
0
Views
1.3k
Activity
Oct ’22
Can't find my Apple TV device at my Xcode Instruments tool
I can use Xcode 13.1 to install/run my tvOS App on an Apple TV Device (with tvOS 15.1.1) (i.e. Xcode has paired with my Apple TV wirelessly), but the instrument tool (13.0) can't detect my Apple TV and only shows my Mac and my iPhone (which is connected via cable). Anyone has any idea whether wireless instrumentation is supported or not? If not supported, any alternative hack? Thx ahead.
Replies
8
Boosts
0
Views
3.6k
Activity
Sep ’22
Points of Interest for iOS targets in Xcode 11.4 not working?
I use “Points of Interest” signposts and ranges all the time. But with Xcode 11.4, I’m no longer seeing signposts for my iOS targets. Is this a known issue?import os.log private let pointsOfInterest = OSLog(subsystem: "PointsOfInterestDemo", category: .pointsOfInterest) class ViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() os_signpost(.event, log: pointsOfInterest, name: "viewDidLoad") } @IBAction func didTapStartRange(_ sender: Any) { let id = OSSignpostID(log: pointsOfInterest) os_signpost(.begin, log: pointsOfInterest, name: "didTapStartRange", signpostID: id) DispatchQueue.main.asyncAfter(deadline: .now() + 3) { os_signpost(.end, log: pointsOfInterest, name: "didTapStartRange", signpostID: id) } os_log("didTapStartRange") } @IBAction func didTapSignpost(_ sender: Any) { os_signpost(.event, log: pointsOfInterest, name: #function) os_log("didTapSignpost") } }It works in Xcode 11.3.1 (11C505), but not Xcode 11.4 (11E146). And in Xcode 11.4, it works for macOS targets, but not iOS targets. I’m running Catalina 10.15.4 (19E266) on MacBook Pro (15-inch, 2018). I tried deferred recording, and 13.2 simulator target, all with no joy.
Replies
4
Boosts
0
Views
2.8k
Activity
Sep ’22
Understanding System Trace's Main Thread 'Blocked'
We've lots and lots going on at startup, but in particular we've some items which can for a very short period of time block the main thread, causing a UITableView stutter on scroll.https://imgur.com/a/RWDvFJzUsing the 'System Trace' tool, we can clearly see on the Main Thread some 'blocked' states. However, I'm finding it difficult to pinpoint down in code where this happens.If I find the 'mach_msg_trap' associated with a particular blocking item, the Stack on the right has a basic stack (see: https://imgur.com/a/tNnXQvh), but double clicking on main brings a function which couldn't possibly be the cause of a blocker (as it's a ViewModel which in this case doesn't get initialized in this flow).Is it possible to fixture out, even what thread is blocking, so I can find that thread at the time, and look at it's call stack?
Replies
2
Boosts
0
Views
7.6k
Activity
Sep ’22
Razer mouse won't connect
I bought a Razer Basilisk X Hypersped mouse to be able to upgrade my experience in my Mac device. I've tried to make the settings in the mouse change according to what Mac lets me do. I'm trying downloading different softwares to help it do its functions, also I've tried downloading the original software from Razer and still doesn't work. I've also tried to connect the mouse via bluetooth and still the mouse won't be recognized. I believe this can be fixed by just pure software adjustments by MacOs. Please help me! Its sad to have an apple device and HAVING to buy an apple peripheral for it to work properly.!!!
Replies
0
Boosts
0
Views
1.7k
Activity
Sep ’22