• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 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 HITRACE_METER_WRAPPER_H
17 #define HITRACE_METER_WRAPPER_H
18 
19 #include <stdint.h>
20 #include <stdbool.h>
21 
22 #include "hitrace/trace.h"
23 #include "hitrace_meter_c.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 void StartTraceCwrapper(uint64_t tag, const char *name);
30 
31 void FinishTraceCwrapper(uint64_t tag);
32 
33 void StartAsyncTraceCwrapper(uint64_t tag, const char *name, int32_t taskId);
34 
35 void FinishAsyncTraceCwrapper(uint64_t tag, const char *name, int32_t taskId);
36 
37 void CountTraceCwrapper(uint64_t tag, const char *name, int64_t count);
38 
39 struct HiTraceIdStruct;
40 void StartTraceChainPoint(const struct HiTraceIdStruct* hiTraceId, const char* value);
41 
42 void StartTraceExCwrapper(HiTraceOutputLevel level, uint64_t tag, const char* name, const char* customArgs);
43 
44 void FinishTraceExCwrapper(HiTraceOutputLevel level, uint64_t tag);
45 
46 void StartAsyncTraceExCwrapper(HiTraceOutputLevel level, uint64_t tag, const char* name, int32_t taskId,
47     const char* customCategory, const char* customArgs);
48 
49 void FinishAsyncTraceExCwrapper(HiTraceOutputLevel level, uint64_t tag, const char* name, int32_t taskId);
50 
51 void CountTraceExCwrapper(HiTraceOutputLevel level, uint64_t tag, const char* name, int64_t count);
52 
53 bool IsTagEnabledCwrapper(uint64_t tag);
54 
55 #ifdef __cplusplus
56 }
57 #endif
58 #endif /* HITRACE_METER_WRAPPER_H */
59