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"; 17 18// Common message define for profiler tools, imported by profiler and plugin proto file. 19message ProfilerPluginConfig { 20 string name = 1; 21 string plugin_sha256 = 2; 22 uint32 sample_interval = 3; 23 bytes config_data = 4; 24} 25 26message ProfilerPluginState { 27 string name = 1; 28 enum State { 29 INITED = 0; 30 REGISTERED = 1; // registered to plugin service. 31 LOADED = 2; // have created session. 32 IN_SESSION = 3; // have started session. 33 }; 34 State state = 2; 35} 36 37// for FetchDataResponse 38message ProfilerPluginData { 39 string name = 1; 40 uint32 status = 2; 41 bytes data = 3; 42 enum ClockId { 43 CLOCKID_REALTIME = 0; 44 CLOCKID_REALTIME_ALARM = 1; // since Linux 3.0; Linux-specific 45 CLOCKID_REALTIME_COARSE = 2; // since Linux 2.6.32; Linux-specific 46 CLOCKID_TAI = 3; // since Linux 3.10; Linux-specific 47 CLOCKID_MONOTONIC = 4; 48 CLOCKID_MONOTONIC_COARSE = 5; // since Linux 2.6.32; Linux-specific 49 CLOCKID_MONOTONIC_RAW = 6; // since Linux 2.6.28; Linux-specific 50 CLOCKID_BOOTTIME = 7; // since Linux 2.6.39; Linux-specific 51 CLOCKID_BOOTTIME_ALARM = 8; // since Linux 3.0; Linux-specific 52 CLOCKID_PROCESS_CPUTIME_ID = 9; // since Linux 2.6.12 53 CLOCKID_THREAD_CPUTIME_ID = 10; // since Linux 2.6.12 54 }; 55 ClockId clock_id = 4; 56 uint64 tv_sec = 5; 57 uint64 tv_nsec = 6; 58 string version = 7; // "1.01" 59} 60