4 # Resource Tracking {#resourcetracking}
8 Setting DALI_ENABLE_LOG environment variable to RESOURCE_LOG will enable resource usage logging in DALi applications.
9 On target resource logging utilizes dlog, but this can also be used on desktop by redirecting stderr to a file.
10 The generated information includes any image files that are loaded with their dimensions,
11 GPU memory consumption, CPU RAM used and details of texture atlases created.
13 ## Viewing Resource Logs
15 dalireslog.sh is installed as part of the DALi Adaptor package and can be found in the adaptors/tizen/scripts folder.
16 The script shows a summary of memory used by resources.
18 ./dalireslog.sh [FILE]
19 if FILE isn't specified, the script will try to use dlogutil.
23 sh-4.1$ ./dalireslog.sh
25 **On a separate terminal:**
27 sh-4.1$ DALI_ENABLE_LOG=RESOURCE_LOG /opt/apps/com.samsung.dali-demo/bin/album.example
31 jon-doe\@ws-1234$ DALI_ENABLE_LOG=RESOURCE_LOG blind-effect.example 2>/home/SERILOCAL/john.doe/log.txt
33 **On a separate terminal:**
35 dalireslog.sh ~/log.txt
39 ### Displayed information:
43 | 3D | amount of GPU memory used by application |
44 | MEM Atlas | amount of GPU memory used by texture atlases (usually this refers to font atlases)
45 | Number of atlases | how many texture atlases are present in memory.|
47 A list of files is displayed in the main view, with different color codes representing different states:
51 |CPU | resource is in memory, but hasn't been uploaded to a GL texture.|
52 |GPU | resource has been uploaded to a GL texture, bitmap buffer discarded.|
53 |CPUGPU | resource has been uploaded to a GL texture, but still present in CPU memory as well.|
54 |DISCARDED | resource has been discarded, memory freed up |
56 @class _Guide_ResourceTracking