xref: /openbmc/linux/include/trace/events/fscache.h (revision 1e1236b841166f1d2daf36fdf6bb3e656bc5f5ca)
1*1e1236b8SDavid Howells /* SPDX-License-Identifier: GPL-2.0-or-later */
2*1e1236b8SDavid Howells /* FS-Cache tracepoints
3*1e1236b8SDavid Howells  *
4*1e1236b8SDavid Howells  * Copyright (C) 2021 Red Hat, Inc. All Rights Reserved.
5*1e1236b8SDavid Howells  * Written by David Howells (dhowells@redhat.com)
6*1e1236b8SDavid Howells  */
7*1e1236b8SDavid Howells #undef TRACE_SYSTEM
8*1e1236b8SDavid Howells #define TRACE_SYSTEM fscache
9*1e1236b8SDavid Howells 
10*1e1236b8SDavid Howells #if !defined(_TRACE_FSCACHE_H) || defined(TRACE_HEADER_MULTI_READ)
11*1e1236b8SDavid Howells #define _TRACE_FSCACHE_H
12*1e1236b8SDavid Howells 
13*1e1236b8SDavid Howells #include <linux/fscache.h>
14*1e1236b8SDavid Howells #include <linux/tracepoint.h>
15*1e1236b8SDavid Howells 
16*1e1236b8SDavid Howells /*
17*1e1236b8SDavid Howells  * Define enums for tracing information.
18*1e1236b8SDavid Howells  */
19*1e1236b8SDavid Howells #ifndef __FSCACHE_DECLARE_TRACE_ENUMS_ONCE_ONLY
20*1e1236b8SDavid Howells #define __FSCACHE_DECLARE_TRACE_ENUMS_ONCE_ONLY
21*1e1236b8SDavid Howells 
22*1e1236b8SDavid Howells #endif
23*1e1236b8SDavid Howells 
24*1e1236b8SDavid Howells /*
25*1e1236b8SDavid Howells  * Declare tracing information enums and their string mappings for display.
26*1e1236b8SDavid Howells  */
27*1e1236b8SDavid Howells 
28*1e1236b8SDavid Howells /*
29*1e1236b8SDavid Howells  * Export enum symbols via userspace.
30*1e1236b8SDavid Howells  */
31*1e1236b8SDavid Howells #undef EM
32*1e1236b8SDavid Howells #undef E_
33*1e1236b8SDavid Howells #define EM(a, b) TRACE_DEFINE_ENUM(a);
34*1e1236b8SDavid Howells #define E_(a, b) TRACE_DEFINE_ENUM(a);
35*1e1236b8SDavid Howells 
36*1e1236b8SDavid Howells /*
37*1e1236b8SDavid Howells  * Now redefine the EM() and E_() macros to map the enums to the strings that
38*1e1236b8SDavid Howells  * will be printed in the output.
39*1e1236b8SDavid Howells  */
40*1e1236b8SDavid Howells #undef EM
41*1e1236b8SDavid Howells #undef E_
42*1e1236b8SDavid Howells #define EM(a, b)	{ a, b },
43*1e1236b8SDavid Howells #define E_(a, b)	{ a, b }
44*1e1236b8SDavid Howells 
45*1e1236b8SDavid Howells 
46*1e1236b8SDavid Howells #endif /* _TRACE_FSCACHE_H */
47*1e1236b8SDavid Howells 
48*1e1236b8SDavid Howells /* This part must be outside protection */
49*1e1236b8SDavid Howells #include <trace/define_trace.h>
50