ANDROID: GKI: fix ABI diffs caused by GPU heap and pool vmstat additions

New nr_gpu_heap fields in vmstat file cause ABI differences.
Fix them by adding the fields and we don't print it to vmstat now
as it's out-of-tree.

Bug: 128254966
Bug: 130198686

Test: boot and check /proc/vmstat has nr_gpu_heap
Change-Id: Idb322f80dbfde785720f01b3ad9954eb4feb7326
Signed-off-by: Minchan Kim <minchan@google.com>
Signed-off-by: Kyle Lin <kylelin@google.com>
Signed-off-by: Martin Liu <liumartin@google.com>
This commit is contained in:
Minchan Kim 2019-03-11 15:19:08 +09:00 committed by Martin Liu
parent 3965f10a4a
commit 1cf3a7305e
2 changed files with 5 additions and 0 deletions

View File

@ -191,6 +191,7 @@ enum node_stat_item {
NR_UNRECLAIMABLE_PAGES,
NR_ION_HEAP,
NR_ION_HEAP_POOL,
NR_GPU_HEAP,
NR_VM_NODE_STAT_ITEMS
};

View File

@ -1171,6 +1171,7 @@ const char * const vmstat_text[] = {
"nr_ion_heap",
"nr_ion_heap_pool",
"nr_gpu_heap",
/* enum writeback_stat_item counters */
"nr_dirty_threshold",
"nr_dirty_background_threshold",
@ -1704,6 +1705,9 @@ static void *vmstat_start(struct seq_file *m, loff_t *pos)
static void *vmstat_next(struct seq_file *m, void *arg, loff_t *pos)
{
(*pos)++;
//nr_gpu_heap is out-of-tree now so we don't want to export it.
if (*pos == NR_VM_ZONE_STAT_ITEMS + NR_VM_NUMA_STAT_ITEMS + NR_GPU_HEAP)
(*pos)++;
if (*pos >= ARRAY_SIZE(vmstat_text))
return NULL;
return (unsigned long *)m->private + *pos;