Using swaplogger

The swaplogger tool measures application frame update/drawing rate. For GL applications FPS (frames per second) is measured by timing GL SwapBuffers calls that are made after each frame is completed, for non-GL applications FPS is deduced from image copy operations. SwapBuffers based FPS values are usually reliable, whereas the reliability of image copy based FPS values depend on the actions of the application.

As swaplogger uses LD_PRELOAD to track the functions signifying frame completion, you need to restart the application with it.

Packages

source: swaplogger

binary: swaplogger

Installing swaplogger on the Harmattan device

Install swaplogger through the developer mode applet.

Prerequisite: Developer mode must be enabled.

Select Settings > Security > Developer mode.

Install the Performance bundle package by clicking Install.

You get a notification screen that lists all the applications to be installed in the bundle package. To install, click OK.

Enter the Executable path, for example /opt/apnews/bin/apnews and click OK.

Click Start on the tool bar. This launches the AP Mobile application on the device and starts updating the Dump View, Frame duration View and AFPS_N View in the Intrumentation Dashboard window.

swaplogger visualisation

After the required data is collected, click Stop.

Use the different views to analyse the aquired data. You can select the required view using the Views menu at any time.

The following table presents the button elements in the example figure.

Element in the example figure

Description

Opens the Target Application Selector window. The button is disabled if an application is running.

Start button launches the application on Harmattan device and shows the collected XDMG, EGL or XShmPutImage information in dump, frame duration and AFPS_N view. The button is disabled if no application has been specified, or when an application is already running.

Stop button stops the collecting of application profiling data and stops updating the visualisations. The button is disabled if the application is not running.

Settings button launches the swaplogger settings window.

Slider controls the number of lines the dump view stores. The minimum value is 500 and the maximum value is 9000.

The Clear button clears the content of the dump view.

The Save button saves the dump view data to a persistent file system.

Help button launches the tool help.

Using the tool on the Harmattan device

For more detailed instructions for using the tool, enter the following command:

swaplogger -h

Note: To use this tool with the developer account, run the swaplogger tool with the aegis-exec command. For example:

aegis-exec -u user swaplogger -i <process> <options for the process>

Starting swaplogger

Measuring FPS of applications with a status bar

If an application shows a status bar, its charging animation can cause application FPS fluctuations. To prevent sysuid from updating the application status bar contents, stop it temporarily. Enter the following command:

killall -STOP sysuid

After the tool has taken the measurements, enter the following command: