• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 "ts_common.h"
21 namespace SysTuning {
22 namespace TraceCfg {
23 // all supported events should be defined here
24 #define CPU_IDEL_INVALID_KEY 4294967295
25 #define CPU_IDEL_INVALID_VALUE 10
26 enum SupportedTraceEventType {
27     TRACE_EVENT_START = 0,
28     TRACE_EVENT_BINDER_TRANSACTION = TRACE_EVENT_START,
29     TRACE_EVENT_BINDER_TRANSACTION_RECEIVED,
30     TRACE_EVENT_BINDER_TRANSACTION_ALLOC_BUF,
31     TRACE_EVENT_BINDER_TRANSACTION_LOCK,
32     TRACE_EVENT_BINDER_TRANSACTION_LOCKED,
33     TRACE_EVENT_BINDER_TRANSACTION_UNLOCK,
34     TRACE_EVENT_SCHED_SWITCH,
35     TRACE_EVENT_SCHED_BLOCKED_REASON,
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_NATIVE_HOOK_RECORD_STATISTICS,
95     TRACE_NATIVE_HOOK_MEMTAG,
96     TRACE_SYS_MEMORY,
97     TRACE_SYS_VIRTUAL_MEMORY,
98     TRACE_DISKIO,
99     TRACE_PROCESS,
100     TRACE_CPU_USAGE,
101     TRACE_NETWORK,
102     TRACE_JS_MEMORY,
103     TRACE_PERF,
104     TRACE_EVENT_EBPF,
105     TRACE_EVENT_EBPF_FILE_SYSTEM,
106     TRACE_EVENT_EBPF_PAGED_MEMORY,
107     TRACE_EVENT_EBPF_BIO_LATENCY,
108     TRACE_HISYSEVENT,
109     TRACE_SMAPS,
110     TRACE_VSYNC,
111     TRACE_ON_DO_COMPOSITION,
112     TRACE_FRAMEQUEUE,
113     TRACE_ASHMEM,
114     TRACE_DMAMEM,
115     TRACE_GPU_PROCESS_MEM,
116     TRACE_GPU_WINDOW_MEM,
117     TRACE_WINDOW_MANAGER_SERVICE,
118     TRACE_EVENT_OTHER,
119     TRACE_EVENT_MAX
120 };
121 enum MemInfoType {
122     MEM_VM_SIZE,
123     MEM_VM_RSS,
124     MEM_VM_ANON,
125     MEM_RSS_FILE,
126     MEM_RSS_SHMEM,
127     MEM_VM_SWAP,
128     MEM_VM_LOCKED,
129     MEM_VM_HWM,
130     MEM_OOM_SCORE_ADJ,
131     MEM_PURG_SUM,
132     MEM_PURG_PIN,
133     MEM_GL_PSS,
134     MEM_GRAPH_PSS,
135     MEM_MAX
136 };
137 enum StatType {
138     STAT_EVENT_START = 0,
139     STAT_EVENT_RECEIVED = STAT_EVENT_START,
140     STAT_EVENT_DATA_LOST,
141     STAT_EVENT_NOTMATCH,
142     STAT_EVENT_NOTSUPPORTED,
143     STAT_EVENT_DATA_INVALID,
144     STAT_EVENT_MAX
145 };
146 
147 // there maybe some error while parser trace msgs, here defined the error levels
148 enum StatSeverityLevel {
149     STAT_SEVERITY_LEVEL_START = 0,
150     STAT_SEVERITY_LEVEL_INFO = STAT_SEVERITY_LEVEL_START,
151     STAT_SEVERITY_LEVEL_WARN,
152     STAT_SEVERITY_LEVEL_ERROR,
153     STAT_SEVERITY_LEVEL_FATAL,
154     STAT_SEVERITY_LEVEL_MAX
155 };
156 
157 // the supported metadata
158 enum MetaDataItem {
159     METADATA_ITEM_START = 0,
160     METADATA_ITEM_DATASIZE = METADATA_ITEM_START,
161     METADATA_ITEM_PARSETOOL_NAME,
162     METADATA_ITEM_PARSERTOOL_VERSION,
163     METADATA_ITEM_PARSERTOOL_PUBLISH_DATETIME,
164     METADATA_ITEM_SOURCE_FILENAME,
165     METADATA_ITEM_OUTPUT_FILENAME,
166     METADATA_ITEM_PARSERTIME, // the data time while the data parsed
167     METADATA_ITEM_TRACE_DURATION,
168     METADATA_ITEM_SOURCE_DATETYPE, // proto-based-trace or txt-based-trace
169     METADATA_ITEM_MAX
170 };
171 
172 class TraceStreamerConfig {
173 public:
174     TraceStreamerConfig();
175     ~TraceStreamerConfig() = default;
176     void PrintInfo() const;
GetStateValue(uint32_t state)177     static uint32_t GetStateValue(uint32_t state)
178     {
179         return (state > CPU_IDEL_INVALID_VALUE ? 0 : (state + 1));
180     }
181 
182 public:
183     std::map<SupportedTraceEventType, std::string> eventNameMap_ = {};
184     std::map<StatType, std::string> eventErrorDescMap_ = {};
185     std::map<StatSeverityLevel, std::string> serverityLevelDescMap_ = {};
186     // different msg may have STAT_EVENT_MAX types of exception when parse, and they have different error level
187     // if you think some error level should be improve or depress, you can edit this map
188     std::map<SupportedTraceEventType, std::map<StatType, StatSeverityLevel>> eventParserStatSeverityDescMap_ = {};
189     std::map<StatType, StatSeverityLevel> statSeverityDescMap_ = {};
190     // process mem info desc
191     std::map<MemInfoType, std::string> memNameMap_ = {};
192     // sys memorty info desc
193     std::map<uint32_t, std::string> sysMemNameMap_ = {};
194     // sys virtual memorty info desc
195     std::map<uint32_t, std::string> sysVirtualMemNameMap_ = {};
196 
197 private:
198     void InitEventNameMap();
199     void InitBinderEventNameMap();
200     void InitSchedEventNameMap();
201     void InitClkEventNameMap();
202     void InitCpuEventNameMap();
203     void InitInterruptEventNameMap();
204     void InitMemoryEventNameMap();
205     void InitBlockEventNameMap();
206     void InitRegulatorEventNameMap();
207     void InitOtherEventNameMap();
208     void InitEbpfEventNameMap();
209     void InitHookEventNameMap();
210 
211     void InitSysMemMap();
212 
213     void InitSysVmemMap();
214     void InitNrZoneEventSysVmemMap();
215     void InitNrDirtierEventSysVmemMap();
216     void InitNrOtherEventSysVmemMap();
217     void InitPgscanEventSysVmemMap();
218     void InitPgstealEventSysVmemMap();
219     void InitCompactEventSysVmemMap();
220     void InitUnevictableEventSysVmemMap();
221     void InitPgreFillEventSysVmemMap();
222     void InitWorkingSetEventSysVmemMap();
223     void InitPgEventSysVmemMap();
224     void InitOtherEventSysVmemMap();
225 
226     void InitSecurityMap();
227     void InitBinderEventSecurityMap();
228     void InitSchedEventSecurityMap();
229     void InitClkEventSecurityMap();
230     void InitCpuEventSecurityMap();
231     void InitInterruptEventSecurityMap();
232     void InitMemoryEventSecurityMap();
233     void InitBlockEventSecurityMap();
234     void InitRegulatorEventSecurityMap();
235     void InitOtherEventSecurityMap();
236     void InitEbpfEventSecurityMap();
237     void InitHookEventSecurityMap();
238     // all supported events should be defined here, these str can be find in text-based trace
239     const std::string TRACE_ACTION_BINDER_TRANSACTION = "binder_transaction";
240     const std::string TRACE_ACTION_BINDER_TRANSACTION_RECEIVED = "binder_transaction_received";
241     const std::string TRACE_ACTION_SCHED_SWITCH = "sched_switch";
242     const std::string TRACE_ACTION_SCHED_BLOCKED_REASON = "sched_blocked_reason";
243     const std::string TRACE_ACTION_TASK_RENAME = "task_rename";
244     const std::string TRACE_ACTION_TASK_NEWTASK = "task_newtask";
245     const std::string TRACE_ACTION_TRACING_MARK_WRITE = "tracing_mark_write";
246     const std::string TRACE_ACTION_PRINT = "print";
247     const std::string TRACE_ACTION_SCHED_WAKEUP = "sched_wakeup";
248     const std::string TRACE_ACTION_SCHED_WAKING = "sched_waking";
249     const std::string TRACE_ACTION_CPU_IDLE = "cpu_idle";
250     const std::string TRACE_ACTION_CPU_FREQUENCY = "cpu_frequency";
251     const std::string TRACE_ACTION_CPU_FREQUENCY_LIMITS = "cpu_frequency_limits";
252     const std::string TRACE_ACTION_SUSPEND_RESUME = "suspend_resume";
253     const std::string TRACE_ACTION_WORKQUEUE_EXECUTE_START = "workqueue_execute_start";
254     const std::string TRACE_ACTION_WORKQUEUE_EXECUTE_END = "workqueue_execute_end";
255 
256     const std::string TRACE_ACTION_CLOCK_SET_RATE = "clock_set_rate";
257     const std::string TRACE_ACTION_CLOCK_ENABLE = "clock_enable";
258     const std::string TRACE_ACTION_CLOCK_DISABLE = "clock_disable";
259     const std::string TRACE_ACTION_CLK_SET_RATE = "clk_set_rate";
260     const std::string TRACE_ACTION_CLK_ENABLE = "clk_enable";
261     const std::string TRACE_ACTION_CLK_DISABLE = "clk_disable";
262     const std::string TRACE_ACTION_SYS_ENTRY = "sys_enter";
263     const std::string TRACE_ACTION_SYS_EXIT = "sys_exit";
264     const std::string TRACE_ACTION_OOM_SCORE_ADJ_UPDATE = "oom_score_adj_update";
265     const std::string TRACE_ACTION_REGULATOR_SET_VOLTAGE = "regulator_set_voltage";
266     const std::string TRACE_ACTION_REGULATOR_SET_VOLTAGE_COMPLETE = "regulator_set_voltage_complete";
267     const std::string TRACE_ACTION_REGULATOR_DISABLE = "regulator_disable";
268     const std::string TRACE_ACTION_REGULATOR_DISABLE_COMPLETE = "regulator_disable_complete";
269     const std::string TRACE_ACTION_IPI_ENTRY = "ipi_entry";
270     const std::string TRACE_ACTION_IPI_EXIT = "ipi_exit";
271     const std::string TRACE_ACTION_IRQ_HANDLER_ENTRY = "irq_handler_entry";
272     const std::string TRACE_ACTION_IRQ_HANDLER_EXIT = "irq_handler_exit";
273     const std::string TRACE_ACTION_SOFTIRQ_RAISE = "softirq_raise";
274     const std::string TRACE_ACTION_SOFTIRQ_ENTRY = "softirq_entry";
275     const std::string TRACE_ACTION_SOFTIRQ_EXIT = "softirq_exit";
276     const std::string TRACE_ACTION_BINDER_TRANSACTION_ALLOC_BUF = "binder_transaction_alloc_buf";
277     const std::string TRACE_ACTION_BINDER_TRANSACTION_LOCK = "binder_transaction_lock";
278     const std::string TRACE_ACTION_BINDER_TRANSACTION_LOCKED = "binder_transaction_locked";
279     const std::string TRACE_ACTION_BINDER_TRANSACTION_UNLOCK = "binder_transaction_unlock";
280     const std::string TRACE_ACTION_SCHED_WAKEUP_NEW = "sched_wakeup_new";
281     const std::string TRACE_ACTION_PROCESS_EXIT = "sched_process_exit";
282     const std::string TRACE_ACTION_PROCESS_FREE = "sched_process_free";
283     const std::string TRACE_ACTION_CLOCK_SYNC = "trace_event_clock_sync";
284     const std::string TRACE_ACTION_MEMORY = "memory";
285     const std::string TRACE_ACTION_HILOG = "hilog";
286     const std::string TRACE_ACTION_HIDUMP_FPS = "hidump_fps";
287     const std::string TRACE_ACTION_NATIVE_HOOK_MALLOC = "native_hook_malloc";
288     const std::string TRACE_ACTION_NATIVE_HOOK_FREE = "native_hook_free";
289     const std::string TRACE_ACTION_NATIVE_HOOK_MMAP = "native_hook_mmap";
290     const std::string TRACE_ACTION_NATIVE_HOOK_MUNMAP = "native_hook_munmap";
291     const std::string TRACE_ACTION_NATIVE_HOOK_RECORD_STATISTICS = "native_hook_record_statistics";
292     const std::string TRACE_ACTION_NATIVE_HOOK_MEMTAG = "native_hook_memtag";
293     const std::string TRACE_ACTION_SIGNAL_GENERATE = "signal_generate";
294     const std::string TRACE_ACTION_SIGNAL_DELIVER = "signal_deliver";
295     const std::string TRACE_ACTION_BLOCK_BIO_BACKMERGE = "trace_block_bio_backmerge";
296     const std::string TRACE_ACTION_BLOCK_BIO_BOUNCE = "trace_block_bio_bounce";
297     const std::string TRACE_ACTION_BLOCK_BIO_COMPLETE = "trace_block_bio_complete";
298     const std::string TRACE_ACTION_BLOCK_BIO_FRONTMERGE = "trace_block_bio_frontmerge";
299     const std::string TRACE_ACTION_BLOCK_BIO_QUEUE = "trace_bblock_bio_queue";
300     const std::string TRACE_ACTION_BLOCK_BIO_REMAP = "trace_block_bio_remap";
301     const std::string TRACE_ACTION_BLOCK_DIRTY_BUFFER = "trace_block_dirty_buffer";
302     const std::string TRACE_ACTION_BLOCK_GETRQ = "trace_block_getrq";
303     const std::string TRACE_ACTION_BLOCK_PLUG = "trace_block_plug";
304     const std::string TRACE_ACTION_BLOCK_RQ_COMPLETE = "trace_block_rq_complete";
305     const std::string TRACE_ACTION_BLOCK_RQ_INSERT = "trace_block_rq_insert";
306     const std::string TRACE_ACTION_BLOCK_RQ_REMAP = "trace_block_rq_remap";
307     const std::string TRACE_ACTION_BLOCK_RQ_ISSUE = "trace_block_rq_issue";
308 
309     const std::string TRACE_ACTION_SYS_MEMORY = "sys_memory";
310     const std::string TRACE_ACTION_SYS_VIRTUAL_MEMORY = "sys_virtual_memory";
311     const std::string TRACE_ACTION_DISKIO = "trace_diskio";
312     const std::string TRACE_ACTION_PROCESS = "trace_process";
313     const std::string TRACE_ACTION_CPU_USAGE = "trace_cpu_usage";
314     const std::string TRACE_ACTION_NETWORK = "trace_network";
315     const std::string TRACE_ACTION_JS_MEMORY = "trace_js_memory";
316     const std::string TRACE_ACTION_PERF = "trace_perf";
317     const std::string TRACE_ACTION_EBPF = "trace_ebpf";
318     const std::string TRACE_ACTION_EBPF_FILE_SYSTEM = "trace_ebpf_file_system";
319     const std::string TRACE_ACTION_EBPF_PAGED_MEMORY = "trace_ebpf_paged_memory";
320     const std::string TRACE_ACTION_EBPF_BIO_LATENCY = "trace_ebpf_bio_latency";
321     const std::string TRACE_ACTION_HISYS_EVENT = "trace_hisys_event";
322     const std::string TRACE_ACTION_SMAPS = "trace_smaps";
323     const std::string TRACE_ACTION_VSYNC = "trace_vsync";
324     const std::string TRACE_ACTION_ON_DO_COMPOSITION = "trace_on_do_composition";
325     const std::string TRACE_ACTION_FRAMEQUEUE = "trace_frame_queue";
326     const std::string TRACE_ACTION_ASHMEM = "trace_ash_mem";
327     const std::string TRACE_ACTION_DMAMEM = "trace_dma_mem";
328     const std::string TRACE_ACTION_GPU_PROCESS_MEM = "trace_gpu_process_mem";
329     const std::string TRACE_ACTION_GPU_WINDOW_MEM = "trace_gpu_window_mem";
330     const std::string TRACE_ACTION_WINDOW_MANAGER_SERVICE = "trace_window_manager_service";
331     const std::string TRACE_ACTION_OTHER = "other";
332 
333     const std::string MEM_INFO_VM_SIZE_DESC = "mem.vm.size";
334     const std::string MEM_INFO_LOCKED_DESC = "mem.locked";
335     const std::string MEM_INFO_RSS_DESC = "mem.rss";
336     const std::string MEM_INFO_RSS_ANON_DESC = "mem.rss.anon";
337     const std::string MEM_INFO_RSS_FILE_DESC = "mem.rss.file";
338     const std::string MEM_INFO_RSS_SCHEM_DESC = "mem.rss.schem";
339     const std::string MEM_INFO_SWAP_DESC = "mem.swap";
340     const std::string MEM_INFO_VIRT_DESC = "mem.virt";
341     const std::string MEM_INFO_HWM_DESC = "mem.hwm";
342     const std::string MEM_INFO_SCORE_ADJ_DESC = "mm.oom_score_adj";
343     const std::string MEM_INFO_PURG_SUM_DESC = "mem.purg_sum";
344     const std::string MEM_INFO_PURG_PIN_DESC = "mem.purg_pin";
345     const std::string MEM_INFO_GL_PSS_DESC = "mem.gl_pss";
346     const std::string MEM_INFO_GRAPH_PSS_DESC = "mem.graph_pss";
347 
348     const std::string SYS_MEMINFO_UNSPECIFIED_DESC = "sys.mem.unspecified";
349     const std::string SYS_MEMINFO_MEM_TOTAL_DESC = "sys.mem.total";
350     const std::string SYS_MEMINFO_MEM_FREE_DESC = "sys.mem.free";
351     const std::string SYS_MEMINFO_MEM_AVAILABLE_DESC = "sys.mem.avaiable";
352     const std::string SYS_MEMINFO_BUFFERS_DESC = "sys.mem.buffers";
353     const std::string SYS_MEMINFO_CACHED_DESC = "sys.mem.cached";
354     const std::string SYS_MEMINFO_SWAP_CACHED_DESC = "sys.mem.swap.chard";
355     const std::string SYS_MEMINFO_ACTIVE_DESC = "sys.mem.active";
356     const std::string SYS_MEMINFO_INACTIVE_DESC = "sys.mem.inactive";
357     const std::string SYS_MEMINFO_ACTIVE_ANON_DESC = "sys.mem.active.anon";
358     const std::string SYS_MEMINFO_INACTIVE_ANON_DESC = "sys.mem.inactive.anon";
359     const std::string SYS_MEMINFO_ACTIVE_FILE_DESC = "sys.mem.active_file";
360     const std::string SYS_MEMINFO_INACTIVE_FILE_DESC = "sys.mem.inactive_file";
361     const std::string SYS_MEMINFO_UNEVICTABLE_DESC = "sys.mem.unevictable";
362     const std::string SYS_MEMINFO_MLOCKED_DESC = "sys.mem.mlocked";
363     const std::string SYS_MEMINFO_SWAP_TOTAL_DESC = "sys.mem.swap.total";
364     const std::string SYS_MEMINFO_SWAP_FREE_DESC = "sys.mem.swap.free";
365     const std::string SYS_MEMINFO_DIRTY_DESC = "sys.mem.dirty";
366     const std::string SYS_MEMINFO_WRITEBACK_DESC = "sys.mem.writeback";
367     const std::string SYS_MEMINFO_ANON_PAGES_DESC = "sys.mem.anon.pages";
368     const std::string SYS_MEMINFO_MAPPED_DESC = "sys.mem.mapped";
369     const std::string SYS_MEMINFO_SHMEM_DESC = "sys.mem.shmem";
370     const std::string SYS_MEMINFO_SLAB_DESC = "sys.mem.slab";
371     const std::string SYS_MEMINFO_SLAB_RECLAIMABLE_DESC = "sys.mem.slab.reclaimable";
372     const std::string SYS_MEMINFO_SLAB_UNRECLAIMABLE_DESC = "sys.mem.slab.unreclaimable";
373     const std::string SYS_MEMINFO_KERNEL_STACK_DESC = "sys.mem.kernel.stack";
374     const std::string SYS_MEMINFO_PAGE_TABLES_DESC = "sys.mem.page.tables";
375     const std::string SYS_MEMINFO_COMMIT_LIMIT_DESC = "sys.mem.commit.limit";
376     const std::string SYS_MEMINFO_COMMITED_AS_DESC = "sys.mem.commited.as";
377     const std::string SYS_MEMINFO_VMALLOC_TOTAL_DESC = "sys.mem.vmalloc.total";
378     const std::string SYS_MEMINFO_VMALLOC_USED_DESC = "sys.mem.vmalloc.used";
379     const std::string SYS_MEMINFO_VMALLOC_CHUNK_DESC = "sys.mem.vmalloc.chunk";
380     const std::string SYS_MEMINFO_CMA_TOTAL_DESC = "sys.mem.cma.total";
381     const std::string SYS_MEMINFO_CMA_FREE_DESC = "sys.mem.cma.free";
382     const std::string SYS_MEMINFO_KERNEL_RECLAIMABLE_DESC = "sys.mem.kernel.reclaimable";
383     const std::string SYS_MEMINFO_ACTIVE_PURG_DESC = "sys.mem.active.purg";
384     const std::string SYS_MEMINFO_INACTIVE_PURG_DESC = "sys.mem.inactive.purg";
385     const std::string SYS_MEMINFO_PINED_PURG_DESC = "sys.mem.pined.purg";
386 
387     const std::string SYS_VMEMINFO_UNSPECIFIED_DESC = "sys.virtual.mem.unspecified";
388     const std::string SYS_VMEMINFO_NR_FREE_PAGES_DESC = "sys.virtual.mem.nr.free.pages";
389     const std::string SYS_VMEMINFO_NR_ALLOC_BATCH_DESC = "sys.virtual.mem.nr.alloc.batch";
390     const std::string SYS_VMEMINFO_NR_INACTIVE_ANON_DESC = "sys.virtual.mem.nr.inactive.anon";
391     const std::string SYS_VMEMINFO_NR_ACTIVE_ANON_DESC = "sys.virtual.mem.nr.active_anon";
392     const std::string SYS_VMEMINFO_NR_INACTIVE_FILE_DESC = "sys.virtual.mem.nr.inactive.file";
393     const std::string SYS_VMEMINFO_NR_ACTIVE_FILE_DESC = "sys.virtual.mem.nr.active_file";
394     const std::string SYS_VMEMINFO_NR_UNEVICTABLE_DESC = "sys.virtual.mem.nr.unevictable";
395     const std::string SYS_VMEMINFO_NR_MLOCK_DESC = "sys.virtual.mem.nr.mlock";
396     const std::string SYS_VMEMINFO_NR_ANON_PAGES_DESC = "sys.virtual.mem.anon.pages";
397     const std::string SYS_VMEMINFO_NR_MAPPED_DESC = "sys.virtual.mem.nr.mapped";
398     const std::string SYS_VMEMINFO_NR_FILE_PAGES_DESC = "sys.virtual.mem.nr.file.pages";
399     const std::string SYS_VMEMINFO_NR_DIRTY_DESC = "sys.virtual.mem.nr.dirty";
400     const std::string SYS_VMEMINFO_NR_WRITEBACK_DESC = "sys.virtual.mem.nr.writeback";
401     const std::string SYS_VMEMINFO_NR_SLAB_RECLAIMABLE_DESC = "sys.virtual.mem.nr.slab.reclaimable";
402     const std::string SYS_VMEMINFO_NR_SLAB_UNRECLAIMABLE_DESC = "sys.virtual.mem.nr.slab.unreclaimable";
403     const std::string SYS_VMEMINFO_NR_PAGE_TABLE_PAGES_DESC = "sys.virtual.mem.nr.page_table.pages";
404     const std::string SYS_VMEMINFO_NR_KERNEL_STACK_DESC = "sys.virtual.mem.nr_kernel.stack";
405     const std::string SYS_VMEMINFO_NR_OVERHEAD_DESC = "sys.virtual.mem.nr.overhead";
406     const std::string SYS_VMEMINFO_NR_UNSTABLE_DESC = "sys.virtual.mem.nr.unstable";
407     const std::string SYS_VMEMINFO_NR_BOUNCE_DESC = "sys.virtual.mem.nr.bounce";
408     const std::string SYS_VMEMINFO_NR_VMSCAN_WRITE_DESC = "sys.virtual.mem.nr.vmscan.write";
409     const std::string SYS_VMEMINFO_NR_VMSCAN_IMMEDIATE_RECLAIM_DESC = "sys.virtual.mem.nr.vmscan.immediate.reclaim";
410     const std::string SYS_VMEMINFO_NR_WRITEBACK_TEMP_DESC = "sys.virtual.mem.nr.writeback_temp";
411     const std::string SYS_VMEMINFO_NR_ISOLATED_ANON_DESC = "sys.virtual.mem.nr.isolated_anon";
412     const std::string SYS_VMEMINFO_NR_ISOLATED_FILE_DESC = "sys.virtual.mem.nr.isolated_file";
413     const std::string SYS_VMEMINFO_NR_SHMEM_DESC = "sys.virtual.mem.nr.shmem";
414     const std::string SYS_VMEMINFO_NR_DIRTIED_DESC = "sys.virtual.mem.nr.dirtied";
415     const std::string SYS_VMEMINFO_NR_WRITTEN_DESC = "sys.virtual.mem.nr.written";
416     const std::string SYS_VMEMINFO_NR_PAGES_SCANNED_DESC = "sys.virtual.mem.nr.pages.scanned";
417     const std::string SYS_VMEMINFO_WORKINGSET_REFAULT_DESC = "sys.virtual.mem.workingset.refault";
418     const std::string SYS_VMEMINFO_WORKINGSET_ACTIVATE_DESC = "sys.virtual.mem.workingset.activate";
419     const std::string SYS_VMEMINFO_WORKINGSET_NODERECLAIM_DESC = "sys.virtual.mem.workingset_nodereclaim";
420     const std::string SYS_VMEMINFO_NR_ANON_TRANSPARENT_HUGEPAGES_DESC = "sys.virtual.mem.nr_anon.transparent.hugepages";
421     const std::string SYS_VMEMINFO_NR_FREE_CMA_DESC = "sys.virtual.mem.nr.free_cma";
422     const std::string SYS_VMEMINFO_NR_SWAPCACHE_DESC = "sys.virtual.mem.nr.swapcache";
423     const std::string SYS_VMEMINFO_NR_DIRTY_THRESHOLD_DESC = "sys.virtual.mem.nr.dirty.threshold";
424     const std::string SYS_VMEMINFO_NR_DIRTY_BACKGROUND_THRESHOLD_DESC = "sys.virtual.mem.nr.dirty.background.threshold";
425     const std::string SYS_VMEMINFO_PGPGIN_DESC = "sys.virtual.mem.vmeminfo.pgpgin";
426     const std::string SYS_VMEMINFO_PGPGOUT_DESC = "sys.virtual.mem.pgpgout";
427     const std::string SYS_VMEMINFO_PGPGOUTCLEAN_DESC = "sys.virtual.mem.pgpgoutclean";
428     const std::string SYS_VMEMINFO_PSWPIN_DESC = "sys.virtual.mem.pswpin";
429     const std::string SYS_VMEMINFO_PSWPOUT_DESC = "sys.virtual.mem.pswpout";
430     const std::string SYS_VMEMINFO_PGALLOC_DMA_DESC = "sys.virtual.mem.pgalloc.dma";
431     const std::string SYS_VMEMINFO_PGALLOC_NORMAL_DESC = "sys.virtual.mem.pgalloc.normal";
432     const std::string SYS_VMEMINFO_PGALLOC_MOVABLE_DESC = "sys.virtual.mem.pgalloc.movable";
433     const std::string SYS_VMEMINFO_PGFREE_DESC = "sys.virtual.mem.pgfree";
434     const std::string SYS_VMEMINFO_PGACTIVATE_DESC = "sys.virtual.mem.pgactivate";
435     const std::string SYS_VMEMINFO_PGDEACTIVATE_DESC = "sys.virtual.mem.pgdeactivate";
436     const std::string SYS_VMEMINFO_PGFAULT_DESC = "sys.virtual.mem.pgfault";
437     const std::string SYS_VMEMINFO_PGMAJFAULT_DESC = "sys.virtual.mem.pgmajfault";
438     const std::string SYS_VMEMINFO_PGREFILL_DMA_DESC = "sys.virtual.mem.pgrefill.dma";
439     const std::string SYS_VMEMINFO_PGREFILL_NORMAL_DESC = "sys.virtual.mem.pgrefill.normal";
440     const std::string SYS_VMEMINFO_PGREFILL_MOVABLE_DESC = "sys.virtual.mem.pgrefill.movable";
441     const std::string SYS_VMEMINFO_PGSTEAL_KSWAPD_DMA_DESC = "sys.virtual.mem.pgsteal.kswapd.dma";
442     const std::string SYS_VMEMINFO_PGSTEAL_KSWAPD_NORMAL_DESC = "sys.virtual.mem.pgsteal.kswapd.normal";
443     const std::string SYS_VMEMINFO_PGSTEAL_KSWAPD_MOVABLE_DESC = "sys.virtual.mem.pgsteal.kswapd.movable";
444     const std::string SYS_VMEMINFO_PGSTEAL_DIRECT_DMA_DESC = "sys.virtual.mem.pgsteal.direct.dma";
445     const std::string SYS_VMEMINFO_PGSTEAL_DIRECT_NORMAL_DESC = "sys.virtual.mem.pgsteal.direct.normal";
446     const std::string SYS_VMEMINFO_PGSTEAL_DIRECT_MOVABLE_DESC = "sys.virtual.mem.pgsteal_direct.movable";
447     const std::string SYS_VMEMINFO_PGSCAN_KSWAPD_DMA_DESC = "sys.virtual.mem.pgscan.kswapd.dma";
448     const std::string SYS_VMEMINFO_PGSCAN_KSWAPD_NORMAL_DESC = "sys.virtual.mem.pgscan_kswapd.normal";
449     const std::string SYS_VMEMINFO_PGSCAN_KSWAPD_MOVABLE_DESC = "sys.virtual.mem.pgscan.kswapd.movable";
450     const std::string SYS_VMEMINFO_PGSCAN_DIRECT_DMA_DESC = "sys.virtual.mem.pgscan.direct.dma";
451     const std::string SYS_VMEMINFO_PGSCAN_DIRECT_NORMAL_DESC = "sys.virtual.mem.pgscan.direct.normal";
452     const std::string SYS_VMEMINFO_PGSCAN_DIRECT_MOVABLE_DESC = "sys.virtual.mem.pgscan.direct.movable";
453     const std::string SYS_VMEMINFO_PGSCAN_DIRECT_THROTTLE_DESC = "sys.virtual.mem.pgscan.direct.throttle";
454     const std::string SYS_VMEMINFO_PGINODESTEAL_DESC = "sys.virtual.mem.pginodesteal";
455     const std::string SYS_VMEMINFO_SLABS_SCANNED_DESC = "sys.virtual.mem.slabs_scanned";
456     const std::string SYS_VMEMINFO_KSWAPD_INODESTEAL_DESC = "sys.virtual.mem.kswapd.inodesteal";
457     const std::string SYS_VMEMINFO_KSWAPD_LOW_WMARK_HIT_QUICKLY_DESC = "sys.virtual.mem.kswapd.low.wmark.hit.quickly";
458     const std::string SYS_VMEMINFO_KSWAPD_HIGH_WMARK_HIT_QUICKLY_DESC = "sys.virtual.mem.high.wmark.hit.quickly";
459     const std::string SYS_VMEMINFO_PAGEOUTRUN_DESC = "sys.virtual.mem.pageoutrun";
460     const std::string SYS_VMEMINFO_ALLOCSTALL_DESC = "sys.virtual.mem.allocstall";
461     const std::string SYS_VMEMINFO_PGROTATED_DESC = "sys.virtual.mem.pgrotated";
462     const std::string SYS_VMEMINFO_DROP_PAGECACHE_DESC = "sys.virtual.mem.drop.pagecache";
463     const std::string SYS_VMEMINFO_DROP_SLAB_DESC = "sys.virtual.mem.drop.slab";
464     const std::string SYS_VMEMINFO_PGMIGRATE_SUCCESS_DESC = "sys.virtual.mem.pgmigrate.success";
465     const std::string SYS_VMEMINFO_PGMIGRATE_FAIL_DESC = "sys.virtual.mem.pgmigrate.fail";
466     const std::string SYS_VMEMINFO_COMPACT_MIGRATE_SCANNED_DESC = "sys.virtual.mem.compact.migrate.scanned";
467     const std::string SYS_VMEMINFO_COMPACT_FREE_SCANNED_DESC = "sys.virtual.mem.compact.free.scanned";
468     const std::string SYS_VMEMINFO_COMPACT_ISOLATED_DESC = "sys.virtual.mem.compact.isolated";
469     const std::string SYS_VMEMINFO_COMPACT_STALL_DESC = "sys.virtual.mem.compact.stall";
470     const std::string SYS_VMEMINFO_COMPACT_FAIL_DESC = "sys.virtual.mem.compact.fail";
471     const std::string SYS_VMEMINFO_COMPACT_SUCCESS_DESC = "sys.virtual.mem.compact.success";
472     const std::string SYS_VMEMINFO_COMPACT_DAEMON_WAKE_DESC = "sys.virtual.mem.compact.daemon.wake";
473     const std::string SYS_VMEMINFO_UNEVICTABLE_PGS_CULLED_DESC = "sys.virtual.mem.unevictable.pgs.culled";
474     const std::string SYS_VMEMINFO_UNEVICTABLE_PGS_SCANNED_DESC = "sys.virtual.mem.unevictable.pgs.scanned";
475     const std::string SYS_VMEMINFO_UNEVICTABLE_PGS_RESCUED_DESC = "sys.virtual.mem.unevictable.pgs.rescued";
476     const std::string SYS_VMEMINFO_UNEVICTABLE_PGS_MLOCKED_DESC = "sys.virtual.mem.unevictable.pgs.mlocked";
477     const std::string SYS_VMEMINFO_UNEVICTABLE_PGS_MUNLOCKED_DESC = "sys.virtual.mem.unevictable.pgs.munlocked";
478     const std::string SYS_VMEMINFO_UNEVICTABLE_PGS_CLEARED_DESC = "sys.virtual.mem.unevictable.pgs.cleared";
479     const std::string SYS_VMEMINFO_UNEVICTABLE_PGS_STRANDED_DESC = "sys.virtual.mem.unevictable.pgs.stranded";
480     const std::string SYS_VMEMINFO_NR_ZSPAGES_DESC = "sys.virtual.mem.nr.zspages";
481     const std::string SYS_VMEMINFO_NR_ION_HEAP_DESC = "sys.virtual.mem.nr.ion.heap";
482     const std::string SYS_VMEMINFO_NR_GPU_HEAP_DESC = "sys.virtual.mem.nr.gpu.heap";
483     const std::string SYS_VMEMINFO_ALLOCSTALL_DMA_DESC = "sys.virtual.mem.allocstall.dma";
484     const std::string SYS_VMEMINFO_ALLOCSTALL_MOVABLE_DESC = "sys.virtual.mem.allocstall.movable";
485     const std::string SYS_VMEMINFO_ALLOCSTALL_NORMAL_DESC = "sys.virtual.mem.allocstall.normal";
486     const std::string SYS_VMEMINFO_COMPACT_DAEMON_FREE_SCANNED_DESC = "sys.virtual.mem.compact_daemon.free.scanned";
487     const std::string SYS_VMEMINFO_COMPACT_DAEMON_MIGRATE_SCANNED_DESC =
488         "sys.virtual.mem.compact.daemon.migrate.scanned";
489     const std::string SYS_VMEMINFO_NR_FASTRPC_DESC = "sys.virtual.mem.nr.fastrpc";
490     const std::string SYS_VMEMINFO_NR_INDIRECTLY_RECLAIMABLE_DESC = "sys.virtual.mem.nr.indirectly.reclaimable";
491     const std::string SYS_VMEMINFO_NR_ION_HEAP_POOL_DESC = "sys.virtual.mem.nr_ion_heap_pool";
492     const std::string SYS_VMEMINFO_NR_KERNEL_MISC_RECLAIMABLE_DESC = "sys.virtual.mem.nr.kernel_misc.reclaimable";
493     const std::string SYS_VMEMINFO_NR_SHADOW_CALL_STACK_BYTES_DESC = "sys.virtual.mem.nr.shadow_call.stack_bytes";
494     const std::string SYS_VMEMINFO_NR_SHMEM_HUGEPAGES_DESC = "sys.virtual.mem.nr.shmem.hugepages";
495     const std::string SYS_VMEMINFO_NR_SHMEM_PMDMAPPED_DESC = "sys.virtual.mem.nr.shmem.pmdmapped";
496     const std::string SYS_VMEMINFO_NR_UNRECLAIMABLE_PAGES_DESC = "sys.virtual.mem.nr.unreclaimable.pages";
497     const std::string SYS_VMEMINFO_NR_ZONE_ACTIVE_ANON_DESC = "sys.virtual.mem.nr.zone.active.anon";
498     const std::string SYS_VMEMINFO_NR_ZONE_ACTIVE_FILE_DESC = "sys.virtual.mem.nr.zone.active.file";
499     const std::string SYS_VMEMINFO_NR_ZONE_INACTIVE_ANON_DESC = "sys.virtual.mem.nr.zone.inactive_anon";
500     const std::string SYS_VMEMINFO_NR_ZONE_INACTIVE_FILE_DESC = "sys.virtual.mem.nr.zone.inactive_file";
501     const std::string SYS_VMEMINFO_NR_ZONE_UNEVICTABLE_DESC = "sys.virtual.mem.nr.zone.unevictable";
502     const std::string SYS_VMEMINFO_NR_ZONE_WRITE_PENDING_DESC = "sys.virtual.mem.nr.zone.write_pending";
503     const std::string SYS_VMEMINFO_OOM_KILL_DESC = "sys.virtual.mem.oom.kill";
504     const std::string SYS_VMEMINFO_PGLAZYFREE_DESC = "sys.virtual.mem.pglazyfree";
505     const std::string SYS_VMEMINFO_PGLAZYFREED_DESC = "sys.virtual.mem.pglazyfreed";
506     const std::string SYS_VMEMINFO_PGREFILL_DESC = "sys.virtual.mem.pgrefill";
507     const std::string SYS_VMEMINFO_PGSCAN_DIRECT_DESC = "sys.virtual.mem.pgscan.direct";
508     const std::string SYS_VMEMINFO_PGSCAN_KSWAPD_DESC = "sys.virtual.mem.pgscan.kswapd";
509     const std::string SYS_VMEMINFO_PGSKIP_DMA_DESC = "sys.virtual.mem.pgskip.dma";
510     const std::string SYS_VMEMINFO_PGSKIP_MOVABLE_DESC = "sys.virtual.mem.pgskip.movable";
511     const std::string SYS_VMEMINFO_PGSKIP_NORMAL_DESC = "sys.virtual.mem.pgskip.normal";
512     const std::string SYS_VMEMINFO_PGSTEAL_DIRECT_DESC = "sys.virtual.mem.pgsteal.direct";
513     const std::string SYS_VMEMINFO_PGSTEAL_KSWAPD_DESC = "sys.virtual.mem.pgsteal.kswapd";
514     const std::string SYS_VMEMINFO_SWAP_RA_DESC = "sys.virtual.mem.swap.ra";
515     const std::string SYS_VMEMINFO_SWAP_RA_HIT_DESC = "sys.virtual.mem.swap.ra.hit";
516     const std::string SYS_VMEMINFO_WORKINGSET_RESTORE_DESC = "sys.virtual.mem.workingset.restore";
517 
518     const std::string TRACE_STAT_TYPE_RECEIVED_DESC = "received";
519     const std::string TRACE_STAT_TYPE_LOST_DESC = "data_lost";
520     const std::string TRACE_STAT_TYPE_NOTMATCH_DESC = "not_match";
521     const std::string TRACE_STAT_TYPE_NOTSUPPORTED_DESC = "not_supported";
522     const std::string TRACE_STAT_TYPE_DATA_INVALID_DESC = "invalid_data";
523 
524     const std::string STAT_SEVERITY_LEVEL_INFO_DESC = "info";
525     const std::string STAT_SEVERITY_LEVEL_WARN_DESC = "warn";
526     const std::string STAT_SEVERITY_LEVEL_ERROR_DESC = "error";
527     const std::string STAT_SEVERITY_LEVEL_FATAL_DESC = "fatal";
528 };
529 } // namespace TraceCfg
530 } // namespace SysTuning
531 #endif
532