Instruments in Xcode 4 Open GL Driver Tiler/Renderer Utilization Gone? - ios

The OpenGL ES Driver Instrument in XCode 4 no longer has Tiler and Renderer Utilization, the two most useful statistics for measuring OpenGL ES bottlenecks. Did they get renamed? I noticed there are two new measurable stats, GPU Core Utilization and GPU Video Engine Utilization; do these now track tiling an rendering utilization, respectively?

As it turns out, the latest version of XCode (4.2) restored Tiler and Renderer Utilization to Instruments. I believe they were only missing during the initial release of XCode 4.

Related

Preload texture to GPU memory in D3D11

How I can preload updated managed 2D texture to GPU memory in Direct3D11?
In Direct3D9 I called IDirect3DBaseTexture9::PreLoad to guarantee that texture will be ready for rendering.
Direct3D9Ex and Direct3D 10 through DirectX 12 has no concept of D3DPOOL_MANAGED. This is because these versions of Direct3D do not have "lost device" in the sense that Direct3D 9 did. They only have "device removed" which happens when the GPU crashes or the driver is updated while your game/app is running. See Microsoft Docs.
Starting in Windows Vista, Video Memory is managed by the OS. Textures are paged in and out of video memory, and backed by system memory automatically. You can provide hints by using the SetEvictionPriority method.

XCode Instruments 6 (by far) not reflecting the correct amount of memory

I've a huge difference between the amount of used memory displayed in XCode debug panel and the same info in Instruments.
XCode shows 400 MB of allocated memory when Instruments only shows 42MB. I'm certainly closer to 400 than 42 as I've multiples 32MB textures loaded... (And this time, 42 is not the answer, btw)
XCode 6.0.1, iPad 3, iPhone 5S, iOS 7.1.2 on both, Profiling on real devices, but no problem doing the same thing on simulator.
Not an ideal situation to track memory consumption.
What goes wrong? Did I miss something? I filter on "All allocations" and "All heap and anonymous".
Any idea ? Thx
The Allocations instrument doesn't record OpenGL ES texture memory allocations. If your app is allocating multiple 32 MB textures, that would explain why Xcode is reporting memory usage of 400 MB and the Allocations instrument is reporting 42 MB.
Use the OpenGL ES Analysis template to look at your texture memory allocations. Use the Allocations instrument to look at the rest of your app's memory allocations.
Found: https://stackoverflow.com/a/15536861/2292348
I think the activity monitor can be used to show real memory usage: https://developer.apple.com/library/mac/Documentation/DeveloperTools/Conceptual/InstrumentsUserGuide/MemoryManagementforYouriOSApp/MemoryManagementforYouriOSApp.html

How to understand CPU and memory consumption in xcode debug

In Xcode 5, there's a new debug panel that shows the CPU and memory consumption in % and MB respectively. How do we make use of this? Is there a CPU % threshold I should try to stay below? I sometimes see my apps goes to 100% or over.. does that mean I am doing too much processing in my app and should try to optimize?
Any tips?
(PS. I'm developing on iOS)
A modern iPhone or iPad has 1024Mb memory.
But how much of that is available for apps is something that Apple has never divulged.
Just use as little memory as possible, and release non essential memory when the OS notifies your app about low memory.
Similarly, use as little CPU as possible, but more importantly, do not block the UI thread.
Use the profiler to find hot spots for CPU use and try to optimize those.

AMD 7970 reporting incorrect DEVICE_GLOBAL_MEM_SIZE

I'm testing some OpenCL image processing on an AMD HD 7970 (Sapphire GHz edition). This particular card has 6GB of RAM onboard, however this call:
clGetDeviceInfo(device, CL_DEVICE_GLOBAL_MEM_SIZE, sizeof(buf_ulong), &buf_ulong, NULL);
returns a value of 2,147,483,648.
Is there an issue with this OpenCL call for returning the actual memory size of a card? Is there some sort of setting for this card that limits the amount of OpenCL memory that can be used?
Any insight would be helpful!
My HD7970 (3GB version, Sapphire GHz edition) reports 2GB of free memory too. It is quite normal to reports less memory than the total amount (OS and driver have to reserve some memory) however your value looks really too low for a 6GB version.
On older AMD drivers was possible to set the amount of memory reserved to OpenCL via a couple of env. variables. However, it is a features that has never been officially supported and I'm afraid it is not available anymore on the latest drivers.

iOS and Cocos2d: received low memory warning with only 20 MB of allocation and no ther app running

I am getting low memory warnings even if my App is allocating only 20 MB of memory and there are apparently no leaks (See photo below). I am wondering whether this is due to some iOS version I am using (deployment target iOS 5.0 and running on an iPod touch 4th gen Version 5.0.1 (9A405)).
In the simulator this doesn't seem to appear.
Any suggestion?
EDIT: This is a similar question I found but not using Cocos2D. There is no answer to that quesiton to date.
From the screenshots its clear that the allocations spike noticably, I would say by a factor of 5 or more. That means for a short time your app is using 100+ MB of memory while most of the time it may only be using 20 MB.
Click on the time graph above one of the spikes to see what the memory usage at that point was, and which objects were using the most memory. Memory warnings can occur a bit later than the spikes so don't rely on their exact timing, but you can see that the alerts happened shortly after a memory usage spike.
Read this article to learn a few tricks to decrease memory usage spikes. Specifically loading the textures in the order from largest to smallest helps, as does using the .pvr.ccz image file format. Avoid using JPG images, they add a lot of memory overhead when loading (and because of that also load a lot slower than the other formats).

Resources