1 /* 2 * Copyright (c) 2022 Huawei Device Co., Ltd. 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 OHOS_DH_HITRACE_H 17 #define OHOS_DH_HITRACE_H 18 19 #include <cstdint> 20 #include <string> 21 22 #include "device_type.h" 23 #include "hitrace_meter.h" 24 25 namespace OHOS { 26 namespace DistributedHardware { 27 constexpr uint64_t DHFWK_HITRACE_LABEL = HITRACE_TAG_DISTRIBUTED_HARDWARE_FWK; 28 29 const std::string COMPONENT_LOAD_START = "COMPONENT_LOAD_START"; 30 const std::string COMPONENT_UNLOAD_START = "COMPONENT_UNLOAD_START"; 31 32 const std::string COMPONENT_INIT_START = "COMPONENT_INIT_START"; 33 const std::string COMPONENT_RELEASE_START = "COMPONENT_RELEASE_START"; 34 35 const std::string DH_QUERY_START = "DH_QUERY_START"; 36 37 const std::string DH_ENABLE_START = "DH_ENABLE_START"; 38 const std::string DH_DISABLE_START = "DH_DISABLE_START"; 39 40 void DHCompMgrTraceStart(const std::string &anonyNetworkId, const std::string &anonyDHId, const std::string &msg); 41 void DHQueryTraceStart(const DHType dhType); 42 void DHTraceStart(const std::string &msg); 43 void DHTraceEnd(); 44 } // namespace DistributedHardware 45 } // namespace OHOS 46 #endif