]>
git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blob - include/trace/events/tlb.h
b4d8e7dc38f880d0fe955c59543319edb7d186b5
1 /* SPDX-License-Identifier: GPL-2.0 */
3 #define TRACE_SYSTEM tlb
5 #if !defined(_TRACE_TLB_H) || defined(TRACE_HEADER_MULTI_READ)
8 #include <linux/mm_types.h>
9 #include <linux/tracepoint.h>
11 #define TLB_FLUSH_REASON \
12 EM( TLB_FLUSH_ON_TASK_SWITCH, "flush on task switch" ) \
13 EM( TLB_REMOTE_SHOOTDOWN, "remote shootdown" ) \
14 EM( TLB_LOCAL_SHOOTDOWN, "local shootdown" ) \
15 EM( TLB_LOCAL_MM_SHOOTDOWN, "local mm shootdown" ) \
16 EMe( TLB_REMOTE_SEND_IPI, "remote ipi send" )
19 * First define the enums in TLB_FLUSH_REASON to be exported to userspace
20 * via TRACE_DEFINE_ENUM().
24 #define EM(a,b) TRACE_DEFINE_ENUM(a);
25 #define EMe(a,b) TRACE_DEFINE_ENUM(a);
30 * Now redefine the EM() and EMe() macros to map the enums to the strings
31 * that will be printed in the output.
35 #define EM(a,b) { a, b },
36 #define EMe(a,b) { a, b }
38 TRACE_EVENT(tlb_flush
,
40 TP_PROTO(int reason
, unsigned long pages
),
41 TP_ARGS(reason
, pages
),
45 __field(unsigned long, pages
)
49 __entry
->reason
= reason
;
50 __entry
->pages
= pages
;
53 TP_printk("pages:%ld reason:%s (%d)",
55 __print_symbolic(__entry
->reason
, TLB_FLUSH_REASON
),
59 #endif /* _TRACE_TLB_H */
61 /* This part must be outside protection */
62 #include <trace/define_trace.h>