1 /*! \page resource-tracking Resource Tracking
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>
7 * On target resource logging utilizes dlog, but this can also be used on desktop by redirecting stderr to a file.<br>
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.
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.
17 * ./dalireslog.sh [FILE]<br>
18 * if FILE isn't specified, the script will try to use dlogutil.
22 * sh-4.1$ ./dalireslog.sh<br>
24 * <i>On a separate terminal:</i><br>
25 * sh-4.1$ DALI_ENABLE_LOG=RESOURCE_LOG /opt/apps/com.samsung.dali-demo/bin/album.example
27 * Example on desktop:<br><br>
28 * jon-doe\@ws-1234$ DALI_ENABLE_LOG=RESOURCE_LOG blind-effect.example 2>/home/SERILOCAL/john.doe/log.txt<br>
30 * <i>On a separate terminal:</i><br>
31 * dalireslog.sh ~/log.txt
33 * Displayed information:<br>
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>
40 * A list of files is displayed in the main view, with different color codes representing different states:<br>
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.