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 25namespace OHOS { 26namespace DistributedHardware { 27constexpr uint64_t DHFWK_HITRACE_LABEL = HITRACE_TAG_DISTRIBUTED_HARDWARE_FWK; 28 29const std::string COMPONENT_LOAD_START = "COMPONENT_LOAD_START"; 30const std::string COMPONENT_UNLOAD_START = "COMPONENT_UNLOAD_START"; 31 32const std::string COMPONENT_INIT_START = "COMPONENT_INIT_START"; 33const std::string COMPONENT_RELEASE_START = "COMPONENT_RELEASE_START"; 34 35const std::string DH_QUERY_START = "DH_QUERY_START"; 36 37const std::string DH_ENABLE_START = "DH_ENABLE_START"; 38const std::string DH_DISABLE_START = "DH_DISABLE_START"; 39 40void DHCompMgrTraceStart(const std::string &anonyNetworkId, const std::string &anonyDHId, const std::string &msg); 41void DHQueryTraceStart(const DHType dhType); 42void DHTraceStart(const std::string &msg); 43void DHTraceEnd(); 44} // namespace DistributedHardware 45} // namespace OHOS 46#endif