13fc297bdSopenharmony_ci/*
23fc297bdSopenharmony_ci * Copyright (c) 2024-2024 Huawei Device Co., Ltd.
33fc297bdSopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
43fc297bdSopenharmony_ci * you may not use this file except in compliance with the License.
53fc297bdSopenharmony_ci * You may obtain a copy of the License at
63fc297bdSopenharmony_ci *
73fc297bdSopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
83fc297bdSopenharmony_ci *
93fc297bdSopenharmony_ci * Unless required by applicable law or agreed to in writing, software
103fc297bdSopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
113fc297bdSopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
123fc297bdSopenharmony_ci * See the License for the specific language governing permissions and
133fc297bdSopenharmony_ci * limitations under the License.
143fc297bdSopenharmony_ci */
153fc297bdSopenharmony_ci
163fc297bdSopenharmony_ci#ifndef SOC_PERF_COMMON_INCLUDE_SOCPERF_TRACE_H
173fc297bdSopenharmony_ci#define SOC_PERF_COMMON_INCLUDE_SOCPERF_TRACE_H
183fc297bdSopenharmony_ci
193fc297bdSopenharmony_ci#include "hisysevent.h"
203fc297bdSopenharmony_ci#include "hitrace_meter.h"
213fc297bdSopenharmony_ci
223fc297bdSopenharmony_cinamespace OHOS {
233fc297bdSopenharmony_cinamespace SOCPERF {
243fc297bdSopenharmony_ci#define HITRACE_TAG_SOCPERF (HITRACE_TAG_OHOS | HITRACE_TAG_APP)
253fc297bdSopenharmony_ci
263fc297bdSopenharmony_ci#define SOCPERF_TRACE_BEGIN(info) StartTrace(HITRACE_TAG_SOCPERF, info)
273fc297bdSopenharmony_ci#define SOCPERF_TRACE_END() FinishTrace(HITRACE_TAG_SOCPERF)
283fc297bdSopenharmony_ci#define SOCPERF_TRACE_COUNTTRACE(name, value) CountTrace(HITRACE_TAG_SOCPERF, name, value)
293fc297bdSopenharmony_ci} // namespace SOCPERF
303fc297bdSopenharmony_ci} // namespace OHOS
313fc297bdSopenharmony_ci
323fc297bdSopenharmony_ci#endif // SOC_PERF_COMMON_INCLUDE_SOCPERF_TRACE_H
33