1/* 2 * Copyright (C) 2018 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17syntax = "proto2"; 18 19package perfetto.protos; 20 21// When editing entries here remember also to update "sys_stats_counters.h" with 22// the corresponding string definitions for the actual /proc files parser. 23 24// Counter definitions for Linux's /proc/meminfo. 25enum MeminfoCounters { 26 MEMINFO_UNSPECIFIED = 0; 27 MEMINFO_MEM_TOTAL = 1; 28 MEMINFO_MEM_FREE = 2; 29 MEMINFO_MEM_AVAILABLE = 3; 30 MEMINFO_BUFFERS = 4; 31 MEMINFO_CACHED = 5; 32 MEMINFO_SWAP_CACHED = 6; 33 MEMINFO_ACTIVE = 7; 34 MEMINFO_INACTIVE = 8; 35 MEMINFO_ACTIVE_ANON = 9; 36 MEMINFO_INACTIVE_ANON = 10; 37 MEMINFO_ACTIVE_FILE = 11; 38 MEMINFO_INACTIVE_FILE = 12; 39 MEMINFO_UNEVICTABLE = 13; 40 MEMINFO_MLOCKED = 14; 41 MEMINFO_SWAP_TOTAL = 15; 42 MEMINFO_SWAP_FREE = 16; 43 MEMINFO_DIRTY = 17; 44 MEMINFO_WRITEBACK = 18; 45 MEMINFO_ANON_PAGES = 19; 46 MEMINFO_MAPPED = 20; 47 MEMINFO_SHMEM = 21; 48 MEMINFO_SLAB = 22; 49 MEMINFO_SLAB_RECLAIMABLE = 23; 50 MEMINFO_SLAB_UNRECLAIMABLE = 24; 51 MEMINFO_KERNEL_STACK = 25; 52 MEMINFO_PAGE_TABLES = 26; 53 MEMINFO_COMMIT_LIMIT = 27; 54 MEMINFO_COMMITED_AS = 28; 55 MEMINFO_VMALLOC_TOTAL = 29; 56 MEMINFO_VMALLOC_USED = 30; 57 MEMINFO_VMALLOC_CHUNK = 31; 58 MEMINFO_CMA_TOTAL = 32; 59 MEMINFO_CMA_FREE = 33; 60} 61 62// Counter definitions for Linux's /proc/vmstat. 63enum VmstatCounters { 64 VMSTAT_UNSPECIFIED = 0; 65 VMSTAT_NR_FREE_PAGES = 1; 66 VMSTAT_NR_ALLOC_BATCH = 2; 67 VMSTAT_NR_INACTIVE_ANON = 3; 68 VMSTAT_NR_ACTIVE_ANON = 4; 69 VMSTAT_NR_INACTIVE_FILE = 5; 70 VMSTAT_NR_ACTIVE_FILE = 6; 71 VMSTAT_NR_UNEVICTABLE = 7; 72 VMSTAT_NR_MLOCK = 8; 73 VMSTAT_NR_ANON_PAGES = 9; 74 VMSTAT_NR_MAPPED = 10; 75 VMSTAT_NR_FILE_PAGES = 11; 76 VMSTAT_NR_DIRTY = 12; 77 VMSTAT_NR_WRITEBACK = 13; 78 VMSTAT_NR_SLAB_RECLAIMABLE = 14; 79 VMSTAT_NR_SLAB_UNRECLAIMABLE = 15; 80 VMSTAT_NR_PAGE_TABLE_PAGES = 16; 81 VMSTAT_NR_KERNEL_STACK = 17; 82 VMSTAT_NR_OVERHEAD = 18; 83 VMSTAT_NR_UNSTABLE = 19; 84 VMSTAT_NR_BOUNCE = 20; 85 VMSTAT_NR_VMSCAN_WRITE = 21; 86 VMSTAT_NR_VMSCAN_IMMEDIATE_RECLAIM = 22; 87 VMSTAT_NR_WRITEBACK_TEMP = 23; 88 VMSTAT_NR_ISOLATED_ANON = 24; 89 VMSTAT_NR_ISOLATED_FILE = 25; 90 VMSTAT_NR_SHMEM = 26; 91 VMSTAT_NR_DIRTIED = 27; 92 VMSTAT_NR_WRITTEN = 28; 93 VMSTAT_NR_PAGES_SCANNED = 29; 94 VMSTAT_WORKINGSET_REFAULT = 30; 95 VMSTAT_WORKINGSET_ACTIVATE = 31; 96 VMSTAT_WORKINGSET_NODERECLAIM = 32; 97 VMSTAT_NR_ANON_TRANSPARENT_HUGEPAGES = 33; 98 VMSTAT_NR_FREE_CMA = 34; 99 VMSTAT_NR_SWAPCACHE = 35; 100 VMSTAT_NR_DIRTY_THRESHOLD = 36; 101 VMSTAT_NR_DIRTY_BACKGROUND_THRESHOLD = 37; 102 VMSTAT_PGPGIN = 38; 103 VMSTAT_PGPGOUT = 39; 104 VMSTAT_PGPGOUTCLEAN = 40; 105 VMSTAT_PSWPIN = 41; 106 VMSTAT_PSWPOUT = 42; 107 VMSTAT_PGALLOC_DMA = 43; 108 VMSTAT_PGALLOC_NORMAL = 44; 109 VMSTAT_PGALLOC_MOVABLE = 45; 110 VMSTAT_PGFREE = 46; 111 VMSTAT_PGACTIVATE = 47; 112 VMSTAT_PGDEACTIVATE = 48; 113 VMSTAT_PGFAULT = 49; 114 VMSTAT_PGMAJFAULT = 50; 115 VMSTAT_PGREFILL_DMA = 51; 116 VMSTAT_PGREFILL_NORMAL = 52; 117 VMSTAT_PGREFILL_MOVABLE = 53; 118 VMSTAT_PGSTEAL_KSWAPD_DMA = 54; 119 VMSTAT_PGSTEAL_KSWAPD_NORMAL = 55; 120 VMSTAT_PGSTEAL_KSWAPD_MOVABLE = 56; 121 VMSTAT_PGSTEAL_DIRECT_DMA = 57; 122 VMSTAT_PGSTEAL_DIRECT_NORMAL = 58; 123 VMSTAT_PGSTEAL_DIRECT_MOVABLE = 59; 124 VMSTAT_PGSCAN_KSWAPD_DMA = 60; 125 VMSTAT_PGSCAN_KSWAPD_NORMAL = 61; 126 VMSTAT_PGSCAN_KSWAPD_MOVABLE = 62; 127 VMSTAT_PGSCAN_DIRECT_DMA = 63; 128 VMSTAT_PGSCAN_DIRECT_NORMAL = 64; 129 VMSTAT_PGSCAN_DIRECT_MOVABLE = 65; 130 VMSTAT_PGSCAN_DIRECT_THROTTLE = 66; 131 VMSTAT_PGINODESTEAL = 67; 132 VMSTAT_SLABS_SCANNED = 68; 133 VMSTAT_KSWAPD_INODESTEAL = 69; 134 VMSTAT_KSWAPD_LOW_WMARK_HIT_QUICKLY = 70; 135 VMSTAT_KSWAPD_HIGH_WMARK_HIT_QUICKLY = 71; 136 VMSTAT_PAGEOUTRUN = 72; 137 VMSTAT_ALLOCSTALL = 73; 138 VMSTAT_PGROTATED = 74; 139 VMSTAT_DROP_PAGECACHE = 75; 140 VMSTAT_DROP_SLAB = 76; 141 VMSTAT_PGMIGRATE_SUCCESS = 77; 142 VMSTAT_PGMIGRATE_FAIL = 78; 143 VMSTAT_COMPACT_MIGRATE_SCANNED = 79; 144 VMSTAT_COMPACT_FREE_SCANNED = 80; 145 VMSTAT_COMPACT_ISOLATED = 81; 146 VMSTAT_COMPACT_STALL = 82; 147 VMSTAT_COMPACT_FAIL = 83; 148 VMSTAT_COMPACT_SUCCESS = 84; 149 VMSTAT_COMPACT_DAEMON_WAKE = 85; 150 VMSTAT_UNEVICTABLE_PGS_CULLED = 86; 151 VMSTAT_UNEVICTABLE_PGS_SCANNED = 87; 152 VMSTAT_UNEVICTABLE_PGS_RESCUED = 88; 153 VMSTAT_UNEVICTABLE_PGS_MLOCKED = 89; 154 VMSTAT_UNEVICTABLE_PGS_MUNLOCKED = 90; 155 VMSTAT_UNEVICTABLE_PGS_CLEARED = 91; 156 VMSTAT_UNEVICTABLE_PGS_STRANDED = 92; 157 VMSTAT_NR_ZSPAGES = 93; 158 VMSTAT_NR_ION_HEAP = 94; 159 VMSTAT_NR_GPU_HEAP = 95; 160 VMSTAT_ALLOCSTALL_DMA = 96; 161 VMSTAT_ALLOCSTALL_MOVABLE = 97; 162 VMSTAT_ALLOCSTALL_NORMAL = 98; 163 VMSTAT_COMPACT_DAEMON_FREE_SCANNED = 99; 164 VMSTAT_COMPACT_DAEMON_MIGRATE_SCANNED = 100; 165 VMSTAT_NR_FASTRPC = 101; 166 VMSTAT_NR_INDIRECTLY_RECLAIMABLE = 102; 167 VMSTAT_NR_ION_HEAP_POOL = 103; 168 VMSTAT_NR_KERNEL_MISC_RECLAIMABLE = 104; 169 VMSTAT_NR_SHADOW_CALL_STACK_BYTES = 105; 170 VMSTAT_NR_SHMEM_HUGEPAGES = 106; 171 VMSTAT_NR_SHMEM_PMDMAPPED = 107; 172 VMSTAT_NR_UNRECLAIMABLE_PAGES = 108; 173 VMSTAT_NR_ZONE_ACTIVE_ANON = 109; 174 VMSTAT_NR_ZONE_ACTIVE_FILE = 110; 175 VMSTAT_NR_ZONE_INACTIVE_ANON = 111; 176 VMSTAT_NR_ZONE_INACTIVE_FILE = 112; 177 VMSTAT_NR_ZONE_UNEVICTABLE = 113; 178 VMSTAT_NR_ZONE_WRITE_PENDING = 114; 179 VMSTAT_OOM_KILL = 115; 180 VMSTAT_PGLAZYFREE = 116; 181 VMSTAT_PGLAZYFREED = 117; 182 VMSTAT_PGREFILL = 118; 183 VMSTAT_PGSCAN_DIRECT = 119; 184 VMSTAT_PGSCAN_KSWAPD = 120; 185 VMSTAT_PGSKIP_DMA = 121; 186 VMSTAT_PGSKIP_MOVABLE = 122; 187 VMSTAT_PGSKIP_NORMAL = 123; 188 VMSTAT_PGSTEAL_DIRECT = 124; 189 VMSTAT_PGSTEAL_KSWAPD = 125; 190 VMSTAT_SWAP_RA = 126; 191 VMSTAT_SWAP_RA_HIT = 127; 192 VMSTAT_WORKINGSET_RESTORE = 128; 193}