libmemtrack: track surface memory in the app process for msm8996
App surface memory can be tracked in either the app process as an EGL surface or in the SF process as an EGL image. This change follows the convention of tracking surface memory in the app process as an EGL image since this approach was adopted by legacy devices for L. Bug: 30635019 Bug: 23894626 Change-Id: Ibc4774f3f3fcf8f5f63a93e60a203ebb0c641364
This commit is contained in:
parent
8c8c8d0c52
commit
1ef783b760
|
@ -97,7 +97,7 @@ int kgsl_memtrack_get_memory(pid_t pid, enum memtrack_type type,
|
|||
* gpuaddr useraddr size id flags type usage sglen mapsize
|
||||
* 545ba000 545ba000 4096 1 -----pY gpumem arraybuffer 1 4096
|
||||
*/
|
||||
ret = sscanf(line, "%*x %*x %lu %*d %8s %6s %18s %*d %lu\n",
|
||||
ret = sscanf(line, "%*x %*lx %lu %*d %8s %6s %18s %*d %lu\n",
|
||||
&size, flags, line_type, line_usage, &mapsize);
|
||||
if (ret != 5) {
|
||||
continue;
|
||||
|
@ -112,7 +112,7 @@ int kgsl_memtrack_get_memory(pid_t pid, enum memtrack_type type,
|
|||
unaccounted_size += size;
|
||||
|
||||
} else if (type == MEMTRACK_TYPE_GRAPHICS && strcmp(line_type, "ion") == 0) {
|
||||
if ( !(is_surfaceflinger == false && strcmp(line_usage, "egl_surface") == 0)) {
|
||||
if (!is_surfaceflinger || strcmp(line_usage, "egl_image") != 0) {
|
||||
unaccounted_size += size;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue