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