libmemtrack: Fix the kgsl memory flag to determine usermapped buffers
The flag is the last character in 'flags' field array. It was wrongly
indexed at flags[6] causing all entries to be marked as unaccounted.
The correct check should be for flags[5] to be equal to 'Y'.
Change-Id: I9f9af884b697363186d6315e5fb7c5673c22a495
diff --git a/libmemtrack/kgsl.c b/libmemtrack/kgsl.c
index b120246..6dc9774 100644
--- a/libmemtrack/kgsl.c
+++ b/libmemtrack/kgsl.c
@@ -107,7 +107,7 @@
if (type == MEMTRACK_TYPE_GL && strcmp(line_type, "gpumem") == 0) {
- if (flags[6] == 'Y')
+ if (flags[5] == 'Y')
accounted_size += size;
else
unaccounted_size += size;