1// Copyright (c) 2021 Huawei Device Co., Ltd. 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 19message Frame { 20 uint64 pc = 1; 21 string file_name = 2; 22 string function_name = 3; 23} 24 25message AllocEvent { 26 uint64 addr = 1; 27 uint32 size = 2; 28 repeated Frame frame_info = 3; 29} 30 31message FreeEvent { 32 uint64 addr = 1; 33 repeated Frame frame_info = 2; 34} 35 36message NativeHookData { 37 uint64 tv_sec = 1; 38 uint64 tv_nsec = 2; 39 oneof event { 40 AllocEvent alloc_event = 3; 41 FreeEvent free_event = 4; 42 } 43} 44 45message BatchNativeHookData { 46 repeated NativeHookData events = 1; 47}