]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blame - include/trace/events/tlb.h
tracing: Make tracer_flags use the right set_flag callback
[mirror_ubuntu-jammy-kernel.git] / include / trace / events / tlb.h
CommitLineData
d17d8f9d
DH
1#undef TRACE_SYSTEM
2#define TRACE_SYSTEM tlb
3
4#if !defined(_TRACE_TLB_H) || defined(TRACE_HEADER_MULTI_READ)
5#define _TRACE_TLB_H
6
7#include <linux/mm_types.h>
8#include <linux/tracepoint.h>
9
23b97662
SRRH
10#define TLB_FLUSH_REASON \
11 EM( TLB_FLUSH_ON_TASK_SWITCH, "flush on task switch" ) \
12 EM( TLB_REMOTE_SHOOTDOWN, "remote shootdown" ) \
13 EM( TLB_LOCAL_SHOOTDOWN, "local shootdown" ) \
5b74283a
MG
14 EM( TLB_LOCAL_MM_SHOOTDOWN, "local mm shootdown" ) \
15 EMe( TLB_REMOTE_SEND_IPI, "remote ipi send" )
23b97662
SRRH
16
17/*
18 * First define the enums in TLB_FLUSH_REASON to be exported to userspace
19 * via TRACE_DEFINE_ENUM().
20 */
21#undef EM
22#undef EMe
23#define EM(a,b) TRACE_DEFINE_ENUM(a);
24#define EMe(a,b) TRACE_DEFINE_ENUM(a);
25
26TLB_FLUSH_REASON
27
28/*
29 * Now redefine the EM() and EMe() macros to map the enums to the strings
30 * that will be printed in the output.
31 */
32#undef EM
33#undef EMe
34#define EM(a,b) { a, b },
35#define EMe(a,b) { a, b }
d17d8f9d 36
6c8465a8 37TRACE_EVENT_CONDITION(tlb_flush,
d17d8f9d
DH
38
39 TP_PROTO(int reason, unsigned long pages),
40 TP_ARGS(reason, pages),
41
6c8465a8
SRRH
42 TP_CONDITION(cpu_online(smp_processor_id())),
43
d17d8f9d
DH
44 TP_STRUCT__entry(
45 __field( int, reason)
46 __field(unsigned long, pages)
47 ),
48
49 TP_fast_assign(
50 __entry->reason = reason;
51 __entry->pages = pages;
52 ),
53
54 TP_printk("pages:%ld reason:%s (%d)",
55 __entry->pages,
56 __print_symbolic(__entry->reason, TLB_FLUSH_REASON),
57 __entry->reason)
58);
59
60#endif /* _TRACE_TLB_H */
61
62/* This part must be outside protection */
63#include <trace/define_trace.h>