libcamera/include/libcamera/internal/tracepoints.h.in
Laurent Pinchart 829acb3ab0 libcamera: Drop file name from header comment blocks in templates
Source files in libcamera start by a comment block header, which
includes the file name and a one-line description of the file contents.
While the latter is useful to get a quick overview of the file contents
at a glance, the former is mostly a source of inconvenience. The name in
the comments can easily get out of sync with the file name when files
are renamed, and copy & paste during development have often lead to
incorrect names being used to start with.

Readers of the source code are expected to know which file they're
looking it. Drop the file name from the header comment blocks in
template files and templates embedded in generator scripts.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com>
2024-05-09 23:31:14 +03:00

61 lines
1.4 KiB
C

/* SPDX-License-Identifier: LGPL-2.1-or-later */
/*
* Copyright (C) {{year}}, Google Inc.
*
* 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 */