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 16// option java_package = "ohos.devtools.datasources.transport.grpc.service"; 17 18import "profiler_service_types.proto"; 19 20// RPC interface between profiler service and host service 21// Use protobuf plug-ins to convert proto define to 22// source and header files during the build process. 23 24package profiler; 25 26service IProfilerService { 27 // get all plugin infos and capabilities. 28 rpc GetCapabilities(GetCapabilitiesRequest) returns (GetCapabilitiesResponse); 29 30 // create tracing sesion and pass tracing config to plugins. 31 rpc CreateSession(CreateSessionRequest) returns (CreateSessionResponse); 32 33 // start tracing session, active server side tracing triggers. 34 rpc StartSession(StartSessionRequest) returns (StartSessionResponse); 35 36 // get server-side cached tracing data since current session started. 37 rpc FetchData(FetchDataRequest) returns (stream FetchDataResponse); 38 39 // stop tracing session, deactivate server side tracing triggers. 40 rpc StopSession(StopSessionRequest) returns (StopSessionResponse); 41 42 // destroy tracing session. 43 rpc DestroySession(DestroySessionRequest) returns (DestroySessionResponse); 44 45 // keep tracing session alive, call this interface will restart session expire count down task. 46 rpc KeepSession(KeepSessionRequest) returns (KeepSessionResponse); 47} 48