1// Copyright (c) Huawei Technologies Co., Ltd. 2021. All rights reserved. 2// Licensed under the Apache License, Version 2.0 (the "License"); 3// you may not use this file except in compliance with the License. 4// You may obtain a copy of the License at 5// 6// http://www.apache.org/licenses/LICENSE-2.0 7// 8// Unless required by applicable law or agreed to in writing, software 9// distributed under the License is distributed on an "AS IS" BASIS, 10// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11// See the License for the specific language governing permissions and 12// limitations under the License. 13 14syntax = "proto3"; 15 16option java_package = "ohos.devtools.datasources.transport.grpc.service"; 17option optimize_for = LITE_RUNTIME; 18 19import "memory_plugin_common.proto"; 20 21// Memory plug-in configuration, passed to plug-in by plug-in service. 22message MemoryConfig { 23 // set true to report process list 24 bool report_process_tree = 1; 25 // set true to report memory counter from /proc/meminfo 26 bool report_sysmem_mem_info = 2; 27 // set required counter list of system meminfo, eg:MemTotal, MemFree, etc. 28 repeated SysMeminfoType sys_meminfo_counters = 3; 29 // set true to report memory counter from /proc/vmstat 30 bool report_sysmem_vmem_info = 4; 31 // set required counter list of virtual system meminfo, eg:nr_free_pages, nr_anon_pages, etc. 32 repeated SysVMeminfoType sys_vmeminfo_counters = 5; 33 // set true to report process meminfo from /proc/${pid}/stat 34 bool report_process_mem_info = 6; 35 // set true to report application memory usage summary, eg:java heap memory, native heap, stack memory, etc. 36 bool report_app_mem_info = 7; 37 // set true to report application memory by memory service, otherwise, 38 // application memory will count up by /proc/${pid}/smaps information 39 bool report_app_mem_by_memory_service = 8; 40 // set required pid list 41 repeated int32 pid = 9; 42 // set true to report smaps meminfo from /proc/${pid}/smaps 43 bool report_smaps_mem_info = 10; 44 // set true to report ashmem meminfo from /proc/purgeable_ashmem_trigger. 45 bool report_purgeable_ashmem_info = 11; 46 // set true to report DMA meminfo from /proc/process_dmabuf_info. 47 bool report_dma_mem_info = 12; 48 // set true to report gpu meminfo from /proc/gpu_memory. 49 bool report_gpu_mem_info = 13; 50 // set true to report gpu info from hidumper. 51 bool report_gpu_dump_info = 14; 52 // set true to report fake data(purgeable_ashmem_trigger gpu_memory hidumper). 53 bool report_fake_data = 15; 54} 55