Detecting virtual memory faults

In this recipe, we will learn how to use the Activity Monitor Instrument to monitor performance of your operating system and computer's hard drive.

Getting ready

In this section, we will learn how to use the Instruments to check the virtual memory to see if thrashing (excessive paging) is occurring or if the VM size is growing excessively, indicating over-retained auto released objects.

How to do it...

To begin, follow the following outlined simple steps:

  1. Select the TwitterExample option from the Project Navigator window.
  2. Navigate to Product | Build For | Profiling, from the Product menu, or alternatively using the keyboard shortcut Shift + Command + I.
  3. Next, choose Profile from the Product menu to launch the Instruments application. Similarly, you can use the keyboard shortcut Command + I.
  4. Next, choose the Activity Monitor option from the list of available templates.
  5. Click on the Profile button to start profiling our TwitterExample application.

    After a number of seconds have passed, your trace information will be displayed, and this will contain information relating to the overall CPU, memory, disk, and network activity used by your application as shown in the following screenshot:

    How to do it...

You can choose to stop the application from profiling by clicking on the Stop button, since the Instruments application has already done its full analysis.

How it works...

In this recipe, we learned how to use the Activity Monitor Instruments component which enables us to check the virtual memory of the OS that can potentially cause the computer system to perform sluggishly. The previous screenshot displays information relating to the overall load which the system is currently undergoing, as well as the user applications performance and the total virtual memory that is currently being allocated to cache these operations.

See also

  • The Running and profiling an iOS project recipe
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset