• 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 GRAPHIC_RS_TRACE_H
17 #define GRAPHIC_RS_TRACE_H
18 
19 #ifndef ROSEN_TRACE_DISABLE
20 #include "bytrace.h"
21 #define ROSEN_TRACE_BEGIN(tag, name) StartTrace(tag, name)
22 #define RS_TRACE_BEGIN(name) ROSEN_TRACE_BEGIN(BYTRACE_TAG_GRAPHIC_AGP, name)
23 #define ROSEN_TRACE_END(tag) FinishTrace(tag)
24 #define RS_TRACE_END() ROSEN_TRACE_END(BYTRACE_TAG_GRAPHIC_AGP)
25 #define RS_TRACE_NAME(name) BYTRACE_NAME(BYTRACE_TAG_GRAPHIC_AGP, name)
26 #define RS_ASYNC_TRACE_BEGIN(name, value) StartAsyncTrace(BYTRACE_TAG_GRAPHIC_AGP, name, value)
27 #define RS_ASYNC_TRACE_END(name, value) FinishAsyncTrace(BYTRACE_TAG_GRAPHIC_AGP, name, value)
28 #define RS_TRACE_INT(name, value) CountTrace(BYTRACE_TAG_GRAPHIC_AGP, name, value)
29 #define RS_TRACE_FUNC() RS_TRACE_NAME(__func__)
30 #else
31 #define ROSEN_TRACE_BEGIN(tag, name)
32 #define RS_TRACE_BEGIN(name)
33 #define ROSEN_TRACE_END(tag)
34 #define RS_TRACE_END()
35 #define RS_TRACE_NAME(name)
36 #define RS_ASYNC_TRACE_BEGIN(name, value)
37 #define RS_ASYNC_TRACE_END(name, value)
38 #define RS_TRACE_INT(name, value)
39 #define RS_TRACE_FUNC()
40 #endif
41 
42 #endif // GRAPHIC_RS_TRACE_H
43