KISS 🇺🇦

Stop the war!

Stop the war in Ukraine! Fuck putin!

More information is at: https://war.ukraine.ua/.

There is a fund to support the Ukrainian Army: https://savelife.in.ua/en/donate/, and there is a special bank account that accepts funds in multiple currencies: https://bank.gov.ua/en/about/support-the-armed-forces. I donated to them. Please donate if you can!

Killer putin

Killer putin. Source: politico.eu.

Arrested putin

"It hasn't happened yet, but it will happen sooner or later. Beautiful photo, isn't it?" Source: twitter.

A few tips about Xcode's Instruments

| comments

Time Profiler in Instruments (along with other instruments) is a great tool for profiling iOS application. It has a number of options, which are not described anywhere. The official documentation only touches the surface of Instruments; there is more information in WWDC videos, but it’s not quickly accessible in that form. Here’s a short list of findings that I inferred myself:

Time Profiler samples

If you zoom in close enough on the application’s time profile results, you’ll see individual samples, which look like letters in a circle. Apparently they describe the thread state: B — blocked, blue R — running, red R — runnable:

At least this was true in Xcode 11.7, but now I can’t see red R symbols anymore in Xcode 12.4, the runnable state is also represented by blue Rs.

More visible information

The Signposts instrument is helpful to get more information about what logic the program is doing. The result strip may display a bunch of regions close to one another:

If you expand the instrument’s vertical space (by dragging the divider between it and the next instrument down), you’ll see more information, including some region descriptions:

Signposts overview

When you hover over the timeline at the top, Instruments displays details for every event at that time:

(The cursor image is from https://micheljansen.org/blog/entry/1317).

Allocations: heap + VM regions.

The Allocations instrument is used to track memory usage of a program. The resulting statistics shows kinds of objects which were allocated during the run, however the first three items aren’t so clear. They are “All Heap & Anonymous VM”, “All Heap Allocations” and “All Anonymous VM”:

First, the item “All Heap & Anonymous VM” is the sum of the other two items. Second, the VM (Virtual Memory) regions are probably memory allocated by the system like dynamically-loaded libraries, textures and memory-mapped files.

Busted: PoI’s lines

Based on signpost results of another program, I thought that the Points of Interest’s lines correspond to worker threads where one line corresponds to a specific thread. But a quick prototype showed that this was not the case:

PS

Here’s a couple of useful WWDC videos about using Instruments:

Comments