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