Merge "More Text related logging & clean-up" into tizen
[platform/core/uifw/dali-toolkit.git] / docs / content / programming-guide / resource-tracking.h
1 /*! \page resource-tracking Resource Tracking
2  *
3  *
4  * <h2 class="pg">Enable Logging</h2>
5  * Setting DALI_ENABLE_LOG environment variable to RESOURCE_LOG will enable resource usage logging in Dali applications.<br>
6  *
7  * On target resource logging utilizes dlog, but this can also be used on desktop by redirecting stderr to a file.<br>
8  *
9  * The generated information includes any image files that are loaded with their dimensions,<br>
10  *  GPU memory consumption, CPU RAM used and details of texture atlases created.
11  *
12  * <h2 class="pg">Viewing Resource Logs</h2>
13  * dalireslog.sh is installed as part of the dali-adaptor package and can be found in the adaptors/tizen/scripts folder.<br>
14  * The script shows a summary of memory used by resources.
15  *
16  * USAGE:
17  * ./dalireslog.sh [FILE]<br>
18  * if FILE isn't specified, the script will try to use dlogutil.
19  *
20  * Example:
21  *
22  * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sh-4.1$ ./dalireslog.sh<br>
23  *
24  * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>On a separate terminal:</i><br>
25  * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sh-4.1$ DALI_ENABLE_LOG=RESOURCE_LOG /opt/apps/com.samsung.dali-demo/bin/album.example
26  *
27  * Example on desktop:<br><br>
28  * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;jon-doe\@ws-1234$ DALI_ENABLE_LOG=RESOURCE_LOG blind-effect.example 2>/home/SERILOCAL/john.doe/log.txt<br>
29  *
30  * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<i>On a separate terminal:</i><br>
31  * &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dalireslog.sh ~/log.txt
32  *
33  * Displayed information:<br>
34  *
35  * <ul>
36  * <li>3D - amount of GPU memory used by application.<br>
37  * <li>MEM Atlas - amount of GPU memory used by texture atlases (usually this refers to font atlases). <br>
38  * <li>Number of atlases - how many texture atlases are present in memory.<br>
39  * </ul>
40  * A list of files is displayed in the main view, with different color codes representing different states:<br>
41  *
42  * <ul>
43  * <li>CPU - resource is in memory, but hasn't been uploaded to a GL texture.<br>
44  * <li>GPU - resource has been uploaded to a GL texture, bitmap buffer discarded.<br>
45  * <li>CPUGPU - resource has been uploaded to a GL texture, but still present in CPU memory as well.<br>
46  * <li>DISCARDED - resource has been discarded, memory freed up.
47  * </ul>
48  */