summaryrefslogtreecommitdiff
path: root/include/libcamera/internal/tracepoints.h.in
blob: d0fc136598b6921a1505040817c70d9f5f10e08f (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
/* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
 * Copyright (C) {{year}}, Google Inc.
 *
 * tracepoints.h - Tracepoints with lttng
 *
 * This file is auto-generated. Do not edit.
 */
#ifndef __LIBCAMERA_INTERNAL_TRACEPOINTS_H__
#define __LIBCAMERA_INTERNAL_TRACEPOINTS_H__

#if HAVE_TRACING
#define LIBCAMERA_TRACEPOINT(...) tracepoint(libcamera, __VA_ARGS__)

#define LIBCAMERA_TRACEPOINT_IPA_BEGIN(pipe, func) \
tracepoint(libcamera, ipa_call_begin, #pipe, #func)

#define LIBCAMERA_TRACEPOINT_IPA_END(pipe, func) \
tracepoint(libcamera, ipa_call_end, #pipe, #func)

#else

namespace {

template <typename ...Args>
inline void unused([[maybe_unused]] Args&& ...args)
{
}

} /* namespace */

#define LIBCAMERA_TRACEPOINT(category, ...) unused(__VA_ARGS__)

#define LIBCAMERA_TRACEPOINT_IPA_BEGIN(pipe, func)
#define LIBCAMERA_TRACEPOINT_IPA_END(pipe, func)

#endif /* HAVE_TRACING */

#endif /* __LIBCAMERA_INTERNAL_TRACEPOINTS_H__ */


#if HAVE_TRACING

#undef TRACEPOINT_PROVIDER
#define TRACEPOINT_PROVIDER libcamera

#undef TRACEPOINT_INCLUDE
#define TRACEPOINT_INCLUDE "{{path}}"

#if !defined(INCLUDE_LIBCAMERA_INTERNAL_TRACEPOINTS_TP_H) || defined(TRACEPOINT_HEADER_MULTI_READ)
#define INCLUDE_LIBCAMERA_INTERNAL_TRACEPOINTS_TP_H

#include <lttng/tracepoint.h>

{{source}}

#endif /* INCLUDE_LIBCAMERA_INTERNAL_TRACEPOINTS_TP_H */

#include <lttng/tracepoint-event.h>

#endif /* HAVE_TRACING */