~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/trace/events/page_ref.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0 */
  2 #undef TRACE_SYSTEM
  3 #define TRACE_SYSTEM page_ref
  4 
  5 #if !defined(_TRACE_PAGE_REF_H) || defined(TRACE_HEADER_MULTI_READ)
  6 #define _TRACE_PAGE_REF_H
  7 
  8 #include <linux/types.h>
  9 #include <linux/page_ref.h>
 10 #include <linux/tracepoint.h>
 11 #include <trace/events/mmflags.h>
 12 
 13 DECLARE_EVENT_CLASS(page_ref_mod_template,
 14 
 15         TP_PROTO(struct page *page, int v),
 16 
 17         TP_ARGS(page, v),
 18 
 19         TP_STRUCT__entry(
 20                 __field(unsigned long, pfn)
 21                 __field(unsigned long, flags)
 22                 __field(int, count)
 23                 __field(int, mapcount)
 24                 __field(void *, mapping)
 25                 __field(int, mt)
 26                 __field(int, val)
 27         ),
 28 
 29         TP_fast_assign(
 30                 __entry->pfn = page_to_pfn(page);
 31                 __entry->flags = page->flags;
 32                 __entry->count = page_ref_count(page);
 33                 __entry->mapcount = atomic_read(&page->_mapcount);
 34                 __entry->mapping = page->mapping;
 35                 __entry->mt = get_pageblock_migratetype(page);
 36                 __entry->val = v;
 37         ),
 38 
 39         TP_printk("pfn=0x%lx flags=%s count=%d mapcount=%d mapping=%p mt=%d val=%d",
 40                 __entry->pfn,
 41                 show_page_flags(__entry->flags & PAGEFLAGS_MASK),
 42                 __entry->count,
 43                 __entry->mapcount, __entry->mapping, __entry->mt,
 44                 __entry->val)
 45 );
 46 
 47 DEFINE_EVENT(page_ref_mod_template, page_ref_set,
 48 
 49         TP_PROTO(struct page *page, int v),
 50 
 51         TP_ARGS(page, v)
 52 );
 53 
 54 DEFINE_EVENT(page_ref_mod_template, page_ref_mod,
 55 
 56         TP_PROTO(struct page *page, int v),
 57 
 58         TP_ARGS(page, v)
 59 );
 60 
 61 DECLARE_EVENT_CLASS(page_ref_mod_and_test_template,
 62 
 63         TP_PROTO(struct page *page, int v, int ret),
 64 
 65         TP_ARGS(page, v, ret),
 66 
 67         TP_STRUCT__entry(
 68                 __field(unsigned long, pfn)
 69                 __field(unsigned long, flags)
 70                 __field(int, count)
 71                 __field(int, mapcount)
 72                 __field(void *, mapping)
 73                 __field(int, mt)
 74                 __field(int, val)
 75                 __field(int, ret)
 76         ),
 77 
 78         TP_fast_assign(
 79                 __entry->pfn = page_to_pfn(page);
 80                 __entry->flags = page->flags;
 81                 __entry->count = page_ref_count(page);
 82                 __entry->mapcount = atomic_read(&page->_mapcount);
 83                 __entry->mapping = page->mapping;
 84                 __entry->mt = get_pageblock_migratetype(page);
 85                 __entry->val = v;
 86                 __entry->ret = ret;
 87         ),
 88 
 89         TP_printk("pfn=0x%lx flags=%s count=%d mapcount=%d mapping=%p mt=%d val=%d ret=%d",
 90                 __entry->pfn,
 91                 show_page_flags(__entry->flags & PAGEFLAGS_MASK),
 92                 __entry->count,
 93                 __entry->mapcount, __entry->mapping, __entry->mt,
 94                 __entry->val, __entry->ret)
 95 );
 96 
 97 DEFINE_EVENT(page_ref_mod_and_test_template, page_ref_mod_and_test,
 98 
 99         TP_PROTO(struct page *page, int v, int ret),
100 
101         TP_ARGS(page, v, ret)
102 );
103 
104 DEFINE_EVENT(page_ref_mod_and_test_template, page_ref_mod_and_return,
105 
106         TP_PROTO(struct page *page, int v, int ret),
107 
108         TP_ARGS(page, v, ret)
109 );
110 
111 DEFINE_EVENT(page_ref_mod_and_test_template, page_ref_mod_unless,
112 
113         TP_PROTO(struct page *page, int v, int ret),
114 
115         TP_ARGS(page, v, ret)
116 );
117 
118 DEFINE_EVENT(page_ref_mod_and_test_template, page_ref_freeze,
119 
120         TP_PROTO(struct page *page, int v, int ret),
121 
122         TP_ARGS(page, v, ret)
123 );
124 
125 DEFINE_EVENT(page_ref_mod_template, page_ref_unfreeze,
126 
127         TP_PROTO(struct page *page, int v),
128 
129         TP_ARGS(page, v)
130 );
131 
132 #endif /* _TRACE_PAGE_COUNT_H */
133 
134 /* This part must be outside protection */
135 #include <trace/define_trace.h>
136 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php