1 /* 2 * Copyright (c) 2021 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef TRACE_STREAMER_CONFIG_H 17 #define TRACE_STREAMER_CONFIG_H 18 #include <map> 19 #include <string> 20 #include "memory_plugin_common.pb.h" 21 #include "ts_common.h" 22 namespace SysTuning { 23 namespace TraceCfg { 24 // all supported events should be defined here 25 #define CPU_IDEL_INVALID_KEY 4294967295 26 #define CPU_IDEL_INVALID_VALUE 4 27 enum SupportedTraceEventType { 28 TRACE_EVENT_START = 0, 29 TRACE_EVENT_BINDER_TRANSACTION = TRACE_EVENT_START, 30 TRACE_EVENT_BINDER_TRANSACTION_RECEIVED, 31 TRACE_EVENT_BINDER_TRANSACTION_ALLOC_BUF, 32 TRACE_EVENT_BINDER_TRANSACTION_LOCK, 33 TRACE_EVENT_BINDER_TRANSACTION_LOCKED, 34 TRACE_EVENT_BINDER_TRANSACTION_UNLOCK, 35 TRACE_EVENT_SCHED_SWITCH, 36 TRACE_EVENT_TASK_RENAME, 37 TRACE_EVENT_TASK_NEWTASK, 38 TRACE_EVENT_TRACING_MARK_WRITE, 39 TRACE_EVENT_PRINT, 40 TRACE_EVENT_SCHED_WAKEUP, 41 TRACE_EVENT_SCHED_WAKING, 42 TRACE_EVENT_CPU_IDLE, 43 TRACE_EVENT_CPU_FREQUENCY, 44 TRACE_EVENT_CPU_FREQUENCY_LIMITS, 45 TRACE_EVENT_SUSPEND_RESUME, 46 TRACE_EVENT_WORKQUEUE_EXECUTE_START, 47 TRACE_EVENT_WORKQUEUE_EXECUTE_END, 48 TRACE_EVENT_CLOCK_SET_RATE, 49 TRACE_EVENT_CLOCK_ENABLE, 50 TRACE_EVENT_CLOCK_DISABLE, 51 TRACE_EVENT_CLK_SET_RATE, 52 TRACE_EVENT_CLK_ENABLE, 53 TRACE_EVENT_CLK_DISABLE, 54 TRACE_EVENT_SYS_ENTRY, 55 TRACE_EVENT_SYS_EXIT, 56 TRACE_EVENT_REGULATOR_SET_VOLTAGE, 57 TRACE_EVENT_REGULATOR_SET_VOLTAGE_COMPLETE, 58 TRACE_EVENT_REGULATOR_DISABLE, 59 TRACE_EVENT_REGULATOR_DISABLE_COMPLETE, 60 TRACE_EVENT_IPI_ENTRY, 61 TRACE_EVENT_IPI_EXIT, 62 TRACE_EVENT_IRQ_HANDLER_ENTRY, 63 TRACE_EVENT_IRQ_HANDLER_EXIT, 64 TRACE_EVENT_SOFTIRQ_RAISE, 65 TRACE_EVENT_SOFTIRQ_ENTRY, 66 TRACE_EVENT_SOFTIRQ_EXIT, 67 TRACE_EVENT_OOM_SCORE_ADJ_UPDATE, 68 TRACE_EVENT_SCHED_WAKEUP_NEW, 69 TRACE_EVENT_PROCESS_EXIT, 70 TRACE_EVENT_PROCESS_FREE, 71 TRACE_EVENT_CLOCK_SYNC, 72 TRACE_EVENT_SIGNAL_GENERATE, 73 TRACE_EVENT_SIGNAL_DELIVER, 74 TRACE_EVENT_BLOCK_BIO_BACKMERGE, 75 TRACE_EVENT_BLOCK_BIO_BOUNCE, 76 TRACE_EVENT_BLOCK_BIO_COMPLETE, 77 TRACE_EVENT_BLOCK_BIO_FRONTMERGE, 78 TRACE_EVENT_BLOCK_BIO_QUEUE, 79 TRACE_EVENT_BLOCK_BIO_REMAP, 80 TRACE_EVENT_BLOCK_DIRTY_BUFFER, 81 TRACE_EVENT_BLOCK_GETRQ, 82 TRACE_EVENT_BLOCK_PLUG, 83 TRACE_EVENT_BLOCK_RQ_COMPLETE, 84 TRACE_EVENT_BLOCK_RQ_INSERT, 85 TRACE_EVENT_BLOCK_RQ_REMAP, 86 TRACE_EVENT_BLOCK_RQ_ISSUE, 87 TRACE_MEMORY, 88 TRACE_HILOG, 89 TRACE_HIDUMP_FPS, 90 TRACE_NATIVE_HOOK_MALLOC, 91 TRACE_NATIVE_HOOK_FREE, 92 TRACE_NATIVE_HOOK_MMAP, 93 TRACE_NATIVE_HOOK_MUNMAP, 94 TRACE_SYS_MEMORY, 95 TRACE_SYS_VIRTUAL_MEMORY, 96 TRACE_DISKIO, 97 TRACE_PROCESS, 98 TRACE_CPU_USAGE, 99 TRACE_NETWORK, 100 TRACE_PERF, 101 TRACE_EVENT_EBPF, 102 TRACE_EVENT_EBPF_FILE_SYSTEM, 103 TRACE_EVENT_EBPF_PAGED_MEMORY, 104 TRACE_EVENT_EBPF_BIO_LATENCY, 105 TRACE_HISYSEVENT, 106 TRACE_SMAPS, 107 TRACE_EVENT_OTHER, 108 TRACE_EVENT_MAX 109 }; 110 enum MemInfoType { 111 MEM_VM_SIZE, 112 MEM_VM_RSS, 113 MEM_VM_ANON, 114 MEM_RSS_FILE, 115 MEM_RSS_SHMEM, 116 MEM_VM_SWAP, 117 MEM_VM_LOCKED, 118 MEM_VM_HWM, 119 MEM_OOM_SCORE_ADJ, 120 MEM_MAX 121 }; 122 enum StatType { 123 STAT_EVENT_START = 0, 124 STAT_EVENT_RECEIVED = STAT_EVENT_START, 125 STAT_EVENT_DATA_LOST, 126 STAT_EVENT_NOTMATCH, 127 STAT_EVENT_NOTSUPPORTED, 128 STAT_EVENT_DATA_INVALID, 129 STAT_EVENT_MAX 130 }; 131 132 // there maybe some error while parser trace msgs, here defined the error levels 133 enum StatSeverityLevel { 134 STAT_SEVERITY_LEVEL_START = 0, 135 STAT_SEVERITY_LEVEL_INFO = STAT_SEVERITY_LEVEL_START, 136 STAT_SEVERITY_LEVEL_WARN, 137 STAT_SEVERITY_LEVEL_ERROR, 138 STAT_SEVERITY_LEVEL_FATAL, 139 STAT_SEVERITY_LEVEL_MAX 140 }; 141 142 // the supported metadata 143 enum MetaDataItem { 144 METADATA_ITEM_START = 0, 145 METADATA_ITEM_DATASIZE = METADATA_ITEM_START, 146 METADATA_ITEM_PARSETOOL_NAME, 147 METADATA_ITEM_PARSERTOOL_VERSION, 148 METADATA_ITEM_PARSERTOOL_PUBLISH_DATETIME, 149 METADATA_ITEM_SOURCE_FILENAME, 150 METADATA_ITEM_OUTPUT_FILENAME, 151 METADATA_ITEM_PARSERTIME, // the data time while the data parsed 152 METADATA_ITEM_TRACE_DURATION, 153 METADATA_ITEM_SOURCE_DATETYPE, // proto-based-trace or txt-based-trace 154 METADATA_ITEM_MAX 155 }; 156 157 class TraceStreamerConfig { 158 public: 159 TraceStreamerConfig(); 160 ~TraceStreamerConfig() = default; 161 void PrintInfo() const; 162 uint32_t GetStateValue(uint32_t state) const; 163 public: 164 std::map<SupportedTraceEventType, std::string> eventNameMap_ = {}; 165 std::map<StatType, std::string> eventErrorDescMap_ = {}; 166 std::map<StatSeverityLevel, std::string> serverityLevelDescMap_ = {}; 167 // different msg may have STAT_EVENT_MAX types of exception when parse, and they have different error level 168 // if you think some error level should be improve or depress, you can edit this map 169 std::map<SupportedTraceEventType, std::map<StatType, StatSeverityLevel>> eventParserStatSeverityDescMap_ = {}; 170 // process mem info desc 171 std::map<MemInfoType, std::string> memNameMap_ = {}; 172 // sys memorty info desc 173 std::map<SysMeminfoType, std::string> sysMemNameMap_ = {}; 174 // sys virtual memorty info desc 175 std::map<SysVMeminfoType, std::string> sysVirtualMemNameMap_ = {}; 176 private: 177 void InitEventNameMap(); 178 void InitSysMemMap(); 179 void InitSysVmemMap(); 180 void InitSecurityMap(); 181 // all supported events should be defined here, these str can be find in text-based trace 182 const std::string TRACE_ACTION_BINDER_TRANSACTION = "binder_transaction"; 183 const std::string TRACE_ACTION_BINDER_TRANSACTION_RECEIVED = "binder_transaction_received"; 184 const std::string TRACE_ACTION_SCHED_SWITCH = "sched_switch"; 185 const std::string TRACE_ACTION_TASK_RENAME = "task_rename"; 186 const std::string TRACE_ACTION_TASK_NEWTASK = "task_newtask"; 187 const std::string TRACE_ACTION_TRACING_MARK_WRITE = "tracing_mark_write"; 188 const std::string TRACE_ACTION_PRINT = "print"; 189 const std::string TRACE_ACTION_SCHED_WAKEUP = "sched_wakeup"; 190 const std::string TRACE_ACTION_SCHED_WAKING = "sched_waking"; 191 const std::string TRACE_ACTION_CPU_IDLE = "cpu_idle"; 192 const std::string TRACE_ACTION_CPU_FREQUENCY = "cpu_frequency"; 193 const std::string TRACE_ACTION_CPU_FREQUENCY_LIMITS = "cpu_frequency_limits"; 194 const std::string TRACE_ACTION_SUSPEND_RESUME = "suspend_resume"; 195 const std::string TRACE_ACTION_WORKQUEUE_EXECUTE_START = "workqueue_execute_start"; 196 const std::string TRACE_ACTION_WORKQUEUE_EXECUTE_END = "workqueue_execute_end"; 197 198 const std::string TRACE_ACTION_CLOCK_SET_RATE = "clock_set_rate"; 199 const std::string TRACE_ACTION_CLOCK_ENABLE = "clock_enable"; 200 const std::string TRACE_ACTION_CLOCK_DISABLE = "clock_disable"; 201 const std::string TRACE_ACTION_CLK_SET_RATE = "clk_set_rate"; 202 const std::string TRACE_ACTION_CLK_ENABLE = "clk_enable"; 203 const std::string TRACE_ACTION_CLK_DISABLE = "clk_disable"; 204 const std::string TRACE_ACTION_SYS_ENTRY = "sys_enter"; 205 const std::string TRACE_ACTION_SYS_EXIT = "sys_exit"; 206 const std::string TRACE_ACTION_OOM_SCORE_ADJ_UPDATE = "oom_score_adj_update"; 207 const std::string TRACE_ACTION_REGULATOR_SET_VOLTAGE = "regulator_set_voltage"; 208 const std::string TRACE_ACTION_REGULATOR_SET_VOLTAGE_COMPLETE = "regulator_set_voltage_complete"; 209 const std::string TRACE_ACTION_REGULATOR_DISABLE = "regulator_disable"; 210 const std::string TRACE_ACTION_REGULATOR_DISABLE_COMPLETE = "regulator_disable_complete"; 211 const std::string TRACE_ACTION_IPI_ENTRY = "ipi_entry"; 212 const std::string TRACE_ACTION_IPI_EXIT = "ipi_exit"; 213 const std::string TRACE_ACTION_IRQ_HANDLER_ENTRY = "irq_handler_entry"; 214 const std::string TRACE_ACTION_IRQ_HANDLER_EXIT = "irq_handler_exit"; 215 const std::string TRACE_ACTION_SOFTIRQ_RAISE = "softirq_raise"; 216 const std::string TRACE_ACTION_SOFTIRQ_ENTRY = "softirq_entry"; 217 const std::string TRACE_ACTION_SOFTIRQ_EXIT = "softirq_exit"; 218 const std::string TRACE_ACTION_BINDER_TRANSACTION_ALLOC_BUF = "binder_transaction_alloc_buf"; 219 const std::string TRACE_ACTION_BINDER_TRANSACTION_LOCK = "binder_transaction_lock"; 220 const std::string TRACE_ACTION_BINDER_TRANSACTION_LOCKED = "binder_transaction_locked"; 221 const std::string TRACE_ACTION_BINDER_TRANSACTION_UNLOCK = "binder_transaction_unlock"; 222 const std::string TRACE_ACTION_SCHED_WAKEUP_NEW = "sched_wakeup_new"; 223 const std::string TRACE_ACTION_PROCESS_EXIT = "sched_process_exit"; 224 const std::string TRACE_ACTION_PROCESS_FREE = "sched_process_free"; 225 const std::string TRACE_ACTION_CLOCK_SYNC = "trace_event_clock_sync"; 226 const std::string TRACE_ACTION_MEMORY = "memory"; 227 const std::string TRACE_ACTION_HILOG = "hilog"; 228 const std::string TRACE_ACTION_HIDUMP_FPS = "hidump_fps"; 229 const std::string TRACE_ACTION_NATIVE_HOOK_MALLOC = "native_hook_malloc"; 230 const std::string TRACE_ACTION_NATIVE_HOOK_FREE = "native_hook_free"; 231 const std::string TRACE_ACTION_NATIVE_HOOK_MMAP = "native_hook_mmap"; 232 const std::string TRACE_ACTION_NATIVE_HOOK_MUNMAP = "native_hook_munmap"; 233 const std::string TRACE_ACTION_SIGNAL_GENERATE = "signal_generate"; 234 const std::string TRACE_ACTION_SIGNAL_DELIVER = "signal_deliver"; 235 const std::string TRACE_ACTION_BLOCK_BIO_BACKMERGE = "trace_block_bio_backmerge"; 236 const std::string TRACE_ACTION_BLOCK_BIO_BOUNCE = "trace_block_bio_bounce"; 237 const std::string TRACE_ACTION_BLOCK_BIO_COMPLETE = "trace_block_bio_complete"; 238 const std::string TRACE_ACTION_BLOCK_BIO_FRONTMERGE = "trace_block_bio_frontmerge"; 239 const std::string TRACE_ACTION_BLOCK_BIO_QUEUE = "trace_bblock_bio_queue"; 240 const std::string TRACE_ACTION_BLOCK_BIO_REMAP = "trace_block_bio_remap"; 241 const std::string TRACE_ACTION_BLOCK_DIRTY_BUFFER = "trace_block_dirty_buffer"; 242 const std::string TRACE_ACTION_BLOCK_GETRQ = "trace_block_getrq"; 243 const std::string TRACE_ACTION_BLOCK_PLUG = "trace_block_plug"; 244 const std::string TRACE_ACTION_BLOCK_RQ_COMPLETE = "trace_block_rq_complete"; 245 const std::string TRACE_ACTION_BLOCK_RQ_INSERT = "trace_block_rq_insert"; 246 const std::string TRACE_ACTION_BLOCK_RQ_REMAP = "trace_block_rq_remap"; 247 const std::string TRACE_ACTION_BLOCK_RQ_ISSUE = "trace_block_rq_issue"; 248 249 const std::string TRACE_ACTION_SYS_MEMORY = "sys_memory"; 250 const std::string TRACE_ACTION_SYS_VIRTUAL_MEMORY = "sys_virtual_memory"; 251 const std::string TRACE_ACTION_DISKIO = "trace_diskio"; 252 const std::string TRACE_ACTION_PROCESS = "trace_process"; 253 const std::string TRACE_ACTION_CPU_USAGE = "trace_cpu_usage"; 254 const std::string TRACE_ACTION_NETWORK = "trace_network"; 255 const std::string TRACE_ACTION_PERF = "trace_perf"; 256 const std::string TRACE_ACTION_EBPF = "trace_ebpf"; 257 const std::string TRACE_ACTION_EBPF_FILE_SYSTEM = "trace_ebpf_file_system"; 258 const std::string TRACE_ACTION_EBPF_PAGED_MEMORY = "trace_ebpf_paged_memory"; 259 const std::string TRACE_ACTION_EBPF_BIO_LATENCY = "trace_ebpf_bio_latency"; 260 const std::string TRACE_ACTION_HISYS_EVENT = "trace_hisys_event"; 261 const std::string TRACE_ACTION_SMAPS = "trace_smaps"; 262 const std::string TRACE_ACTION_OTHER = "other"; 263 264 const std::string MEM_INFO_VM_SIZE_DESC = "mem.vm.size"; 265 const std::string MEM_INFO_LOCKED_DESC = "mem.locked"; 266 const std::string MEM_INFO_RSS_DESC = "mem.rss"; 267 const std::string MEM_INFO_RSS_ANON_DESC = "mem.rss.anon"; 268 const std::string MEM_INFO_RSS_FILE_DESC = "mem.rss.file"; 269 const std::string MEM_INFO_RSS_SCHEM_DESC = "mem.rss.schem"; 270 const std::string MEM_INFO_SWAP_DESC = "mem.swap"; 271 const std::string MEM_INFO_VIRT_DESC = "mem.virt"; 272 const std::string MEM_INFO_HWM_DESC = "mem.hwm"; 273 const std::string MEM_INFO_SCORE_ADJ_DESC = "mm.oom_score_adj"; 274 275 const std::string SYS_MEMINFO_UNSPECIFIED_DESC = "sys.mem.unspecified"; 276 const std::string SYS_MEMINFO_MEM_TOTAL_DESC = "sys.mem.total"; 277 const std::string SYS_MEMINFO_MEM_FREE_DESC = "sys.mem.free"; 278 const std::string SYS_MEMINFO_MEM_AVAILABLE_DESC = "sys.mem.avaiable"; 279 const std::string SYS_MEMINFO_BUFFERS_DESC = "sys.mem.buffers"; 280 const std::string SYS_MEMINFO_CACHED_DESC = "sys.mem.cached"; 281 const std::string SYS_MEMINFO_SWAP_CACHED_DESC = "sys.mem.swap.chard"; 282 const std::string SYS_MEMINFO_ACTIVE_DESC = "sys.mem.active"; 283 const std::string SYS_MEMINFO_INACTIVE_DESC = "sys.mem.inactive"; 284 const std::string SYS_MEMINFO_ACTIVE_ANON_DESC = "sys.mem.active.anon"; 285 const std::string SYS_MEMINFO_INACTIVE_ANON_DESC = "sys.mem.inactive.anon"; 286 const std::string SYS_MEMINFO_ACTIVE_FILE_DESC = "sys.mem.active_file"; 287 const std::string SYS_MEMINFO_INACTIVE_FILE_DESC = "sys.mem.inactive_file"; 288 const std::string SYS_MEMINFO_UNEVICTABLE_DESC = "sys.mem.unevictable"; 289 const std::string SYS_MEMINFO_MLOCKED_DESC = "sys.mem.mlocked"; 290 const std::string SYS_MEMINFO_SWAP_TOTAL_DESC = "sys.mem.swap.total"; 291 const std::string SYS_MEMINFO_SWAP_FREE_DESC = "sys.mem.swap.free"; 292 const std::string SYS_MEMINFO_DIRTY_DESC = "sys.mem.dirty"; 293 const std::string SYS_MEMINFO_WRITEBACK_DESC = "sys.mem.writeback"; 294 const std::string SYS_MEMINFO_ANON_PAGES_DESC = "sys.mem.anon.pages"; 295 const std::string SYS_MEMINFO_MAPPED_DESC = "sys.mem.mapped"; 296 const std::string SYS_MEMINFO_SHMEM_DESC = "sys.mem.shmem"; 297 const std::string SYS_MEMINFO_SLAB_DESC = "sys.mem.slab"; 298 const std::string SYS_MEMINFO_SLAB_RECLAIMABLE_DESC = "sys.mem.slab.reclaimable"; 299 const std::string SYS_MEMINFO_SLAB_UNRECLAIMABLE_DESC = "sys.mem.slab.unreclaimable"; 300 const std::string SYS_MEMINFO_KERNEL_STACK_DESC = "sys.mem.kernel.stack"; 301 const std::string SYS_MEMINFO_PAGE_TABLES_DESC = "sys.mem.page.tables"; 302 const std::string SYS_MEMINFO_COMMIT_LIMIT_DESC = "sys.mem.commit.limit"; 303 const std::string SYS_MEMINFO_COMMITED_AS_DESC = "sys.mem.commited.as"; 304 const std::string SYS_MEMINFO_VMALLOC_TOTAL_DESC = "sys.mem.vmalloc.total"; 305 const std::string SYS_MEMINFO_VMALLOC_USED_DESC = "sys.mem.vmalloc.used"; 306 const std::string SYS_MEMINFO_VMALLOC_CHUNK_DESC = "sys.mem.vmalloc.chunk"; 307 const std::string SYS_MEMINFO_CMA_TOTAL_DESC = "sys.mem.cma.total"; 308 const std::string SYS_MEMINFO_CMA_FREE_DESC = "sys.mem.cma.free"; 309 const std::string SYS_MEMINFO_KERNEL_RECLAIMABLE_DESC = "sys.mem.kernel.reclaimable"; 310 const std::string SYS_VMEMINFO_UNSPECIFIED_DESC = "sys.virtual.mem.unspecified"; 311 const std::string SYS_VMEMINFO_NR_FREE_PAGES_DESC = "sys.virtual.mem.nr.free.pages"; 312 const std::string SYS_VMEMINFO_NR_ALLOC_BATCH_DESC = "sys.virtual.mem.nr.alloc.batch"; 313 const std::string SYS_VMEMINFO_NR_INACTIVE_ANON_DESC = "sys.virtual.mem.nr.inactive.anon"; 314 const std::string SYS_VMEMINFO_NR_ACTIVE_ANON_DESC = "sys.virtual.mem.nr.active_anon"; 315 const std::string SYS_VMEMINFO_NR_INACTIVE_FILE_DESC = "sys.virtual.mem.nr.inactive.file"; 316 const std::string SYS_VMEMINFO_NR_ACTIVE_FILE_DESC = "sys.virtual.mem.nr.active_file"; 317 const std::string SYS_VMEMINFO_NR_UNEVICTABLE_DESC = "sys.virtual.mem.nr.unevictable"; 318 const std::string SYS_VMEMINFO_NR_MLOCK_DESC = "sys.virtual.mem.nr.mlock"; 319 const std::string SYS_VMEMINFO_NR_ANON_PAGES_DESC = "sys.virtual.mem.anon.pages"; 320 const std::string SYS_VMEMINFO_NR_MAPPED_DESC = "sys.virtual.mem.nr.mapped"; 321 const std::string SYS_VMEMINFO_NR_FILE_PAGES_DESC = "sys.virtual.mem.nr.file.pages"; 322 const std::string SYS_VMEMINFO_NR_DIRTY_DESC = "sys.virtual.mem.nr.dirty"; 323 const std::string SYS_VMEMINFO_NR_WRITEBACK_DESC = "sys.virtual.mem.nr.writeback"; 324 const std::string SYS_VMEMINFO_NR_SLAB_RECLAIMABLE_DESC = "sys.virtual.mem.nr.slab.reclaimable"; 325 const std::string SYS_VMEMINFO_NR_SLAB_UNRECLAIMABLE_DESC = "sys.virtual.mem.nr.slab.unreclaimable"; 326 const std::string SYS_VMEMINFO_NR_PAGE_TABLE_PAGES_DESC = "sys.virtual.mem.nr.page_table.pages"; 327 const std::string SYS_VMEMINFO_NR_KERNEL_STACK_DESC = "sys.virtual.mem.nr_kernel.stack"; 328 const std::string SYS_VMEMINFO_NR_OVERHEAD_DESC = "sys.virtual.mem.nr.overhead"; 329 const std::string SYS_VMEMINFO_NR_UNSTABLE_DESC = "sys.virtual.mem.nr.unstable"; 330 const std::string SYS_VMEMINFO_NR_BOUNCE_DESC = "sys.virtual.mem.nr.bounce"; 331 const std::string SYS_VMEMINFO_NR_VMSCAN_WRITE_DESC = "sys.virtual.mem.nr.vmscan.write"; 332 const std::string SYS_VMEMINFO_NR_VMSCAN_IMMEDIATE_RECLAIM_DESC = "sys.virtual.mem.nr.vmscan.immediate.reclaim"; 333 const std::string SYS_VMEMINFO_NR_WRITEBACK_TEMP_DESC = "sys.virtual.mem.nr.writeback_temp"; 334 const std::string SYS_VMEMINFO_NR_ISOLATED_ANON_DESC = "sys.virtual.mem.nr.isolated_anon"; 335 const std::string SYS_VMEMINFO_NR_ISOLATED_FILE_DESC = "sys.virtual.mem.nr.isolated_file"; 336 const std::string SYS_VMEMINFO_NR_SHMEM_DESC = "sys.virtual.mem.nr.shmem"; 337 const std::string SYS_VMEMINFO_NR_DIRTIED_DESC = "sys.virtual.mem.nr.dirtied"; 338 const std::string SYS_VMEMINFO_NR_WRITTEN_DESC = "sys.virtual.mem.nr.written"; 339 const std::string SYS_VMEMINFO_NR_PAGES_SCANNED_DESC = "sys.virtual.mem.nr.pages.scanned"; 340 const std::string SYS_VMEMINFO_WORKINGSET_REFAULT_DESC = "sys.virtual.mem.workingset.refault"; 341 const std::string SYS_VMEMINFO_WORKINGSET_ACTIVATE_DESC = "sys.virtual.mem.workingset.activate"; 342 const std::string SYS_VMEMINFO_WORKINGSET_NODERECLAIM_DESC = "sys.virtual.mem.workingset_nodereclaim"; 343 const std::string SYS_VMEMINFO_NR_ANON_TRANSPARENT_HUGEPAGES_DESC = "sys.virtual.mem.nr_anon.transparent.hugepages"; 344 const std::string SYS_VMEMINFO_NR_FREE_CMA_DESC = "sys.virtual.mem.nr.free_cma"; 345 const std::string SYS_VMEMINFO_NR_SWAPCACHE_DESC = "sys.virtual.mem.nr.swapcache"; 346 const std::string SYS_VMEMINFO_NR_DIRTY_THRESHOLD_DESC = "sys.virtual.mem.nr.dirty.threshold"; 347 const std::string SYS_VMEMINFO_NR_DIRTY_BACKGROUND_THRESHOLD_DESC = "sys.virtual.mem.nr.dirty.background.threshold"; 348 const std::string SYS_VMEMINFO_PGPGIN_DESC = "sys.virtual.mem.vmeminfo.pgpgin"; 349 const std::string SYS_VMEMINFO_PGPGOUT_DESC = "sys.virtual.mem.pgpgout"; 350 const std::string SYS_VMEMINFO_PGPGOUTCLEAN_DESC = "sys.virtual.mem.pgpgoutclean"; 351 const std::string SYS_VMEMINFO_PSWPIN_DESC = "sys.virtual.mem.pswpin"; 352 const std::string SYS_VMEMINFO_PSWPOUT_DESC = "sys.virtual.mem.pswpout"; 353 const std::string SYS_VMEMINFO_PGALLOC_DMA_DESC = "sys.virtual.mem.pgalloc.dma"; 354 const std::string SYS_VMEMINFO_PGALLOC_NORMAL_DESC = "sys.virtual.mem.pgalloc.normal"; 355 const std::string SYS_VMEMINFO_PGALLOC_MOVABLE_DESC = "sys.virtual.mem.pgalloc.movable"; 356 const std::string SYS_VMEMINFO_PGFREE_DESC = "sys.virtual.mem.pgfree"; 357 const std::string SYS_VMEMINFO_PGACTIVATE_DESC = "sys.virtual.mem.pgactivate"; 358 const std::string SYS_VMEMINFO_PGDEACTIVATE_DESC = "sys.virtual.mem.pgdeactivate"; 359 const std::string SYS_VMEMINFO_PGFAULT_DESC = "sys.virtual.mem.pgfault"; 360 const std::string SYS_VMEMINFO_PGMAJFAULT_DESC = "sys.virtual.mem.pgmajfault"; 361 const std::string SYS_VMEMINFO_PGREFILL_DMA_DESC = "sys.virtual.mem.pgrefill.dma"; 362 const std::string SYS_VMEMINFO_PGREFILL_NORMAL_DESC = "sys.virtual.mem.pgrefill.normal"; 363 const std::string SYS_VMEMINFO_PGREFILL_MOVABLE_DESC = "sys.virtual.mem.pgrefill.movable"; 364 const std::string SYS_VMEMINFO_PGSTEAL_KSWAPD_DMA_DESC = "sys.virtual.mem.pgsteal.kswapd.dma"; 365 const std::string SYS_VMEMINFO_PGSTEAL_KSWAPD_NORMAL_DESC = "sys.virtual.mem.pgsteal.kswapd.normal"; 366 const std::string SYS_VMEMINFO_PGSTEAL_KSWAPD_MOVABLE_DESC = "sys.virtual.mem.pgsteal.kswapd.movable"; 367 const std::string SYS_VMEMINFO_PGSTEAL_DIRECT_DMA_DESC = "sys.virtual.mem.pgsteal.direct.dma"; 368 const std::string SYS_VMEMINFO_PGSTEAL_DIRECT_NORMAL_DESC = "sys.virtual.mem.pgsteal.direct.normal"; 369 const std::string SYS_VMEMINFO_PGSTEAL_DIRECT_MOVABLE_DESC = "sys.virtual.mem.pgsteal_direct.movable"; 370 const std::string SYS_VMEMINFO_PGSCAN_KSWAPD_DMA_DESC = "sys.virtual.mem.pgscan.kswapd.dma"; 371 const std::string SYS_VMEMINFO_PGSCAN_KSWAPD_NORMAL_DESC = "sys.virtual.mem.pgscan_kswapd.normal"; 372 const std::string SYS_VMEMINFO_PGSCAN_KSWAPD_MOVABLE_DESC = "sys.virtual.mem.pgscan.kswapd.movable"; 373 const std::string SYS_VMEMINFO_PGSCAN_DIRECT_DMA_DESC = "sys.virtual.mem.pgscan.direct.dma"; 374 const std::string SYS_VMEMINFO_PGSCAN_DIRECT_NORMAL_DESC = "sys.virtual.mem.pgscan.direct.normal"; 375 const std::string SYS_VMEMINFO_PGSCAN_DIRECT_MOVABLE_DESC = "sys.virtual.mem.pgscan.direct.movable"; 376 const std::string SYS_VMEMINFO_PGSCAN_DIRECT_THROTTLE_DESC = "sys.virtual.mem.pgscan.direct.throttle"; 377 const std::string SYS_VMEMINFO_PGINODESTEAL_DESC = "sys.virtual.mem.pginodesteal"; 378 const std::string SYS_VMEMINFO_SLABS_SCANNED_DESC = "sys.virtual.mem.slabs_scanned"; 379 const std::string SYS_VMEMINFO_KSWAPD_INODESTEAL_DESC = "sys.virtual.mem.kswapd.inodesteal"; 380 const std::string SYS_VMEMINFO_KSWAPD_LOW_WMARK_HIT_QUICKLY_DESC = "sys.virtual.mem.kswapd.low.wmark.hit.quickly"; 381 const std::string SYS_VMEMINFO_KSWAPD_HIGH_WMARK_HIT_QUICKLY_DESC = "sys.virtual.mem.high.wmark.hit.quickly"; 382 const std::string SYS_VMEMINFO_PAGEOUTRUN_DESC = "sys.virtual.mem.pageoutrun"; 383 const std::string SYS_VMEMINFO_ALLOCSTALL_DESC = "sys.virtual.mem.allocstall"; 384 const std::string SYS_VMEMINFO_PGROTATED_DESC = "sys.virtual.mem.pgrotated"; 385 const std::string SYS_VMEMINFO_DROP_PAGECACHE_DESC = "sys.virtual.mem.drop.pagecache"; 386 const std::string SYS_VMEMINFO_DROP_SLAB_DESC = "sys.virtual.mem.drop.slab"; 387 const std::string SYS_VMEMINFO_PGMIGRATE_SUCCESS_DESC = "sys.virtual.mem.pgmigrate.success"; 388 const std::string SYS_VMEMINFO_PGMIGRATE_FAIL_DESC = "sys.virtual.mem.pgmigrate.fail"; 389 const std::string SYS_VMEMINFO_COMPACT_MIGRATE_SCANNED_DESC = "sys.virtual.mem.compact.migrate.scanned"; 390 const std::string SYS_VMEMINFO_COMPACT_FREE_SCANNED_DESC = "sys.virtual.mem.compact.free.scanned"; 391 const std::string SYS_VMEMINFO_COMPACT_ISOLATED_DESC = "sys.virtual.mem.compact.isolated"; 392 const std::string SYS_VMEMINFO_COMPACT_STALL_DESC = "sys.virtual.mem.compact.stall"; 393 const std::string SYS_VMEMINFO_COMPACT_FAIL_DESC = "sys.virtual.mem.compact.fail"; 394 const std::string SYS_VMEMINFO_COMPACT_SUCCESS_DESC = "sys.virtual.mem.compact.success"; 395 const std::string SYS_VMEMINFO_COMPACT_DAEMON_WAKE_DESC = "sys.virtual.mem.compact.daemon.wake"; 396 const std::string SYS_VMEMINFO_UNEVICTABLE_PGS_CULLED_DESC = "sys.virtual.mem.unevictable.pgs.culled"; 397 const std::string SYS_VMEMINFO_UNEVICTABLE_PGS_SCANNED_DESC = "sys.virtual.mem.unevictable.pgs.scanned"; 398 const std::string SYS_VMEMINFO_UNEVICTABLE_PGS_RESCUED_DESC = "sys.virtual.mem.unevictable.pgs.rescued"; 399 const std::string SYS_VMEMINFO_UNEVICTABLE_PGS_MLOCKED_DESC = "sys.virtual.mem.unevictable.pgs.mlocked"; 400 const std::string SYS_VMEMINFO_UNEVICTABLE_PGS_MUNLOCKED_DESC = "sys.virtual.mem.unevictable.pgs.munlocked"; 401 const std::string SYS_VMEMINFO_UNEVICTABLE_PGS_CLEARED_DESC = "sys.virtual.mem.unevictable.pgs.cleared"; 402 const std::string SYS_VMEMINFO_UNEVICTABLE_PGS_STRANDED_DESC = "sys.virtual.mem.unevictable.pgs.stranded"; 403 const std::string SYS_VMEMINFO_NR_ZSPAGES_DESC = "sys.virtual.mem.nr.zspages"; 404 const std::string SYS_VMEMINFO_NR_ION_HEAP_DESC = "sys.virtual.mem.nr.ion.heap"; 405 const std::string SYS_VMEMINFO_NR_GPU_HEAP_DESC = "sys.virtual.mem.nr.gpu.heap"; 406 const std::string SYS_VMEMINFO_ALLOCSTALL_DMA_DESC = "sys.virtual.mem.allocstall.dma"; 407 const std::string SYS_VMEMINFO_ALLOCSTALL_MOVABLE_DESC = "sys.virtual.mem.allocstall.movable"; 408 const std::string SYS_VMEMINFO_ALLOCSTALL_NORMAL_DESC = "sys.virtual.mem.allocstall.normal"; 409 const std::string SYS_VMEMINFO_COMPACT_DAEMON_FREE_SCANNED_DESC = "sys.virtual.mem.compact_daemon.free.scanned"; 410 const std::string SYS_VMEMINFO_COMPACT_DAEMON_MIGRATE_SCANNED_DESC = 411 "sys.virtual.mem.compact.daemon.migrate.scanned"; 412 const std::string SYS_VMEMINFO_NR_FASTRPC_DESC = "sys.virtual.mem.nr.fastrpc"; 413 const std::string SYS_VMEMINFO_NR_INDIRECTLY_RECLAIMABLE_DESC = "sys.virtual.mem.nr.indirectly.reclaimable"; 414 const std::string SYS_VMEMINFO_NR_ION_HEAP_POOL_DESC = "sys.virtual.mem.nr_ion_heap_pool"; 415 const std::string SYS_VMEMINFO_NR_KERNEL_MISC_RECLAIMABLE_DESC = "sys.virtual.mem.nr.kernel_misc.reclaimable"; 416 const std::string SYS_VMEMINFO_NR_SHADOW_CALL_STACK_BYTES_DESC = "sys.virtual.mem.nr.shadow_call.stack_bytes"; 417 const std::string SYS_VMEMINFO_NR_SHMEM_HUGEPAGES_DESC = "sys.virtual.mem.nr.shmem.hugepages"; 418 const std::string SYS_VMEMINFO_NR_SHMEM_PMDMAPPED_DESC = "sys.virtual.mem.nr.shmem.pmdmapped"; 419 const std::string SYS_VMEMINFO_NR_UNRECLAIMABLE_PAGES_DESC = "sys.virtual.mem.nr.unreclaimable.pages"; 420 const std::string SYS_VMEMINFO_NR_ZONE_ACTIVE_ANON_DESC = "sys.virtual.mem.nr.zone.active.anon"; 421 const std::string SYS_VMEMINFO_NR_ZONE_ACTIVE_FILE_DESC = "sys.virtual.mem.nr.zone.active.file"; 422 const std::string SYS_VMEMINFO_NR_ZONE_INACTIVE_ANON_DESC = "sys.virtual.mem.nr.zone.inactive_anon"; 423 const std::string SYS_VMEMINFO_NR_ZONE_INACTIVE_FILE_DESC = "sys.virtual.mem.nr.zone.inactive_file"; 424 const std::string SYS_VMEMINFO_NR_ZONE_UNEVICTABLE_DESC = "sys.virtual.mem.nr.zone.unevictable"; 425 const std::string SYS_VMEMINFO_NR_ZONE_WRITE_PENDING_DESC = "sys.virtual.mem.nr.zone.write_pending"; 426 const std::string SYS_VMEMINFO_OOM_KILL_DESC = "sys.virtual.mem.oom.kill"; 427 const std::string SYS_VMEMINFO_PGLAZYFREE_DESC = "sys.virtual.mem.pglazyfree"; 428 const std::string SYS_VMEMINFO_PGLAZYFREED_DESC = "sys.virtual.mem.pglazyfreed"; 429 const std::string SYS_VMEMINFO_PGREFILL_DESC = "sys.virtual.mem.pgrefill"; 430 const std::string SYS_VMEMINFO_PGSCAN_DIRECT_DESC = "sys.virtual.mem.pgscan.direct"; 431 const std::string SYS_VMEMINFO_PGSCAN_KSWAPD_DESC = "sys.virtual.mem.pgscan.kswapd"; 432 const std::string SYS_VMEMINFO_PGSKIP_DMA_DESC = "sys.virtual.mem.pgskip.dma"; 433 const std::string SYS_VMEMINFO_PGSKIP_MOVABLE_DESC = "sys.virtual.mem.pgskip.movable"; 434 const std::string SYS_VMEMINFO_PGSKIP_NORMAL_DESC = "sys.virtual.mem.pgskip.normal"; 435 const std::string SYS_VMEMINFO_PGSTEAL_DIRECT_DESC = "sys.virtual.mem.pgsteal.direct"; 436 const std::string SYS_VMEMINFO_PGSTEAL_KSWAPD_DESC = "sys.virtual.mem.pgsteal.kswapd"; 437 const std::string SYS_VMEMINFO_SWAP_RA_DESC = "sys.virtual.mem.swap.ra"; 438 const std::string SYS_VMEMINFO_SWAP_RA_HIT_DESC = "sys.virtual.mem.swap.ra.hit"; 439 const std::string SYS_VMEMINFO_WORKINGSET_RESTORE_DESC = "sys.virtual.mem.workingset.restore"; 440 441 const std::string TRACE_STAT_TYPE_RECEIVED_DESC = "received"; 442 const std::string TRACE_STAT_TYPE_LOST_DESC = "data_lost"; 443 const std::string TRACE_STAT_TYPE_NOTMATCH_DESC = "not_match"; 444 const std::string TRACE_STAT_TYPE_NOTSUPPORTED_DESC = "not_supported"; 445 const std::string TRACE_STAT_TYPE_DATA_INVALID_DESC = "invalid_data"; 446 447 const std::string STAT_SEVERITY_LEVEL_INFO_DESC = "info"; 448 const std::string STAT_SEVERITY_LEVEL_WARN_DESC = "warn"; 449 const std::string STAT_SEVERITY_LEVEL_ERROR_DESC = "error"; 450 const std::string STAT_SEVERITY_LEVEL_FATAL_DESC = "fatal"; 451 }; 452 } // namespace TRACE_STREAMER_CONFIG_H 453 } // namespace SysTuning 454 #endif 455