summaryrefslogtreecommitdiff
path: root/ttrace.h.in
blob: a6aabf4eeb2319e98edd33e3edaeb1eb7b56207a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
/*
 * T-trace
 * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#ifndef _CDBG_TIZEN_TTRACE_H_
#define _CDBG_TIZEN_TTRACE_H_

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

#cmakedefine TTRACE_PROFILE_MOBILE
#cmakedefine TTRACE_PROFILE_TV
#cmakedefine TTRACE_PROFILE_WEARABLE

#include "stdint.h"

/* Define TTRACE_TAG */
#define TTRACE_TAG_NEVER               0       // This tag is never enabled.
#define TTRACE_TAG_ALWAYS              (1<<0)  // This tag is always enabled.
#define TTRACE_TAG_GRAPHICS            (1<<1)
#define TTRACE_TAG_INPUT               (1<<2)
#define TTRACE_TAG_VIEW                (1<<3)
#define TTRACE_TAG_WEB                 (1<<4)
#define TTRACE_TAG_WINDOW_MANAGER      (1<<5)
#define TTRACE_TAG_APPLICATION_MANAGER (1<<6)
#define TTRACE_TAG_IMAGE               (1<<7)
#define TTRACE_TAG_AUDIO               (1<<8)
#define TTRACE_TAG_VIDEO               (1<<9)
#define TTRACE_TAG_CAMERA              (1<<10)
#define TTRACE_TAG_HAL                 (1<<11)
#define TTRACE_TAG_MEDIA_CONTENT       (1<<12)
#define TTRACE_TAG_MEDIA_DB            (1<<13)
#define TTRACE_TAG_SCREEN_MIRRORING    (1<<14)
#define TTRACE_TAG_APP                 (1<<15)

#ifdef TTRACE_PROFILE_MOBILE
//define TAGs belonging to mobile profile only
#elif defined TTRACE_PROFILE_TV
//define TAGs belonging to mobile profile only
#elif defined TTRACE_PROFILE_WEARABLE
//define TAGs belonging to mobile profile only
#endif

#define TTRACE_TAG_LAST                (1<<63)

#define ENABLED_TAG_FILE "/tmp/ttrace_tag"

void traceBegin(uint64_t tag, const char *name, ...);
void traceEnd(uint64_t tag);
void traceAsyncBegin(uint64_t tag, int cookie, const char *name, ...);
void traceAsyncEnd(uint64_t tag, int cookie, const char *name, ...);
void traceMark(uint64_t tag, const char *name, ...);
void traceCounter(uint64_t tag, int value, const char *name, ...);
#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* _CDBG_TIZEN_TTRACE_H_ */