Mel Gorman | 33906bc | 2010-08-09 17:19:16 -0700 | [diff] [blame] | 1 | #undef TRACE_SYSTEM |
| 2 | #define TRACE_SYSTEM vmscan |
| 3 | |
| 4 | #if !defined(_TRACE_VMSCAN_H) || defined(TRACE_HEADER_MULTI_READ) |
| 5 | #define _TRACE_VMSCAN_H |
| 6 | |
| 7 | #include <linux/types.h> |
| 8 | #include <linux/tracepoint.h> |
KOSAKI Motohiro | 83cd81a | 2011-06-15 15:08:14 -0700 | [diff] [blame] | 9 | #include <linux/mm.h> |
| 10 | #include <linux/memcontrol.h> |
David Howells | a1ce392 | 2012-10-02 18:01:25 +0100 | [diff] [blame] | 11 | #include <trace/events/gfpflags.h> |
Mel Gorman | 33906bc | 2010-08-09 17:19:16 -0700 | [diff] [blame] | 12 | |
Mel Gorman | 755f022 | 2010-08-09 17:19:18 -0700 | [diff] [blame] | 13 | #define RECLAIM_WB_ANON 0x0001u |
| 14 | #define RECLAIM_WB_FILE 0x0002u |
Mel Gorman | e11da5b | 2010-10-26 14:21:40 -0700 | [diff] [blame] | 15 | #define RECLAIM_WB_MIXED 0x0010u |
Mel Gorman | 41ac199 | 2012-05-29 15:06:19 -0700 | [diff] [blame] | 16 | #define RECLAIM_WB_SYNC 0x0004u /* Unused, all reclaim async */ |
Mel Gorman | 755f022 | 2010-08-09 17:19:18 -0700 | [diff] [blame] | 17 | #define RECLAIM_WB_ASYNC 0x0008u |
| 18 | |
| 19 | #define show_reclaim_flags(flags) \ |
| 20 | (flags) ? __print_flags(flags, "|", \ |
| 21 | {RECLAIM_WB_ANON, "RECLAIM_WB_ANON"}, \ |
| 22 | {RECLAIM_WB_FILE, "RECLAIM_WB_FILE"}, \ |
Mel Gorman | e11da5b | 2010-10-26 14:21:40 -0700 | [diff] [blame] | 23 | {RECLAIM_WB_MIXED, "RECLAIM_WB_MIXED"}, \ |
Mel Gorman | 755f022 | 2010-08-09 17:19:18 -0700 | [diff] [blame] | 24 | {RECLAIM_WB_SYNC, "RECLAIM_WB_SYNC"}, \ |
| 25 | {RECLAIM_WB_ASYNC, "RECLAIM_WB_ASYNC"} \ |
| 26 | ) : "RECLAIM_WB_NONE" |
| 27 | |
Mel Gorman | 23b9da5 | 2012-05-29 15:06:20 -0700 | [diff] [blame] | 28 | #define trace_reclaim_flags(page) ( \ |
Mel Gorman | 755f022 | 2010-08-09 17:19:18 -0700 | [diff] [blame] | 29 | (page_is_file_cache(page) ? RECLAIM_WB_FILE : RECLAIM_WB_ANON) | \ |
Mel Gorman | 41ac199 | 2012-05-29 15:06:19 -0700 | [diff] [blame] | 30 | (RECLAIM_WB_ASYNC) \ |
Mel Gorman | 755f022 | 2010-08-09 17:19:18 -0700 | [diff] [blame] | 31 | ) |
| 32 | |
Mel Gorman | 23b9da5 | 2012-05-29 15:06:20 -0700 | [diff] [blame] | 33 | #define trace_shrink_flags(file) \ |
Mel Gorman | 41ac199 | 2012-05-29 15:06:19 -0700 | [diff] [blame] | 34 | ( \ |
| 35 | (file ? RECLAIM_WB_FILE : RECLAIM_WB_ANON) | \ |
| 36 | (RECLAIM_WB_ASYNC) \ |
Mel Gorman | e11da5b | 2010-10-26 14:21:40 -0700 | [diff] [blame] | 37 | ) |
| 38 | |
Mel Gorman | 33906bc | 2010-08-09 17:19:16 -0700 | [diff] [blame] | 39 | TRACE_EVENT(mm_vmscan_kswapd_sleep, |
| 40 | |
| 41 | TP_PROTO(int nid), |
| 42 | |
| 43 | TP_ARGS(nid), |
| 44 | |
| 45 | TP_STRUCT__entry( |
| 46 | __field( int, nid ) |
| 47 | ), |
| 48 | |
| 49 | TP_fast_assign( |
| 50 | __entry->nid = nid; |
| 51 | ), |
| 52 | |
| 53 | TP_printk("nid=%d", __entry->nid) |
| 54 | ); |
| 55 | |
| 56 | TRACE_EVENT(mm_vmscan_kswapd_wake, |
| 57 | |
| 58 | TP_PROTO(int nid, int order), |
| 59 | |
| 60 | TP_ARGS(nid, order), |
| 61 | |
| 62 | TP_STRUCT__entry( |
| 63 | __field( int, nid ) |
| 64 | __field( int, order ) |
| 65 | ), |
| 66 | |
| 67 | TP_fast_assign( |
| 68 | __entry->nid = nid; |
| 69 | __entry->order = order; |
| 70 | ), |
| 71 | |
| 72 | TP_printk("nid=%d order=%d", __entry->nid, __entry->order) |
| 73 | ); |
| 74 | |
| 75 | TRACE_EVENT(mm_vmscan_wakeup_kswapd, |
| 76 | |
| 77 | TP_PROTO(int nid, int zid, int order), |
| 78 | |
| 79 | TP_ARGS(nid, zid, order), |
| 80 | |
| 81 | TP_STRUCT__entry( |
| 82 | __field( int, nid ) |
| 83 | __field( int, zid ) |
| 84 | __field( int, order ) |
| 85 | ), |
| 86 | |
| 87 | TP_fast_assign( |
| 88 | __entry->nid = nid; |
| 89 | __entry->zid = zid; |
| 90 | __entry->order = order; |
| 91 | ), |
| 92 | |
| 93 | TP_printk("nid=%d zid=%d order=%d", |
| 94 | __entry->nid, |
| 95 | __entry->zid, |
| 96 | __entry->order) |
| 97 | ); |
| 98 | |
KOSAKI Motohiro | cf4dcc3 | 2010-08-09 17:19:55 -0700 | [diff] [blame] | 99 | DECLARE_EVENT_CLASS(mm_vmscan_direct_reclaim_begin_template, |
Mel Gorman | 33906bc | 2010-08-09 17:19:16 -0700 | [diff] [blame] | 100 | |
| 101 | TP_PROTO(int order, int may_writepage, gfp_t gfp_flags), |
| 102 | |
| 103 | TP_ARGS(order, may_writepage, gfp_flags), |
| 104 | |
| 105 | TP_STRUCT__entry( |
| 106 | __field( int, order ) |
| 107 | __field( int, may_writepage ) |
| 108 | __field( gfp_t, gfp_flags ) |
| 109 | ), |
| 110 | |
| 111 | TP_fast_assign( |
| 112 | __entry->order = order; |
| 113 | __entry->may_writepage = may_writepage; |
| 114 | __entry->gfp_flags = gfp_flags; |
| 115 | ), |
| 116 | |
| 117 | TP_printk("order=%d may_writepage=%d gfp_flags=%s", |
| 118 | __entry->order, |
| 119 | __entry->may_writepage, |
| 120 | show_gfp_flags(__entry->gfp_flags)) |
| 121 | ); |
| 122 | |
KOSAKI Motohiro | cf4dcc3 | 2010-08-09 17:19:55 -0700 | [diff] [blame] | 123 | DEFINE_EVENT(mm_vmscan_direct_reclaim_begin_template, mm_vmscan_direct_reclaim_begin, |
| 124 | |
| 125 | TP_PROTO(int order, int may_writepage, gfp_t gfp_flags), |
| 126 | |
| 127 | TP_ARGS(order, may_writepage, gfp_flags) |
| 128 | ); |
| 129 | |
KOSAKI Motohiro | bdce6d9 | 2010-08-09 17:19:56 -0700 | [diff] [blame] | 130 | DEFINE_EVENT(mm_vmscan_direct_reclaim_begin_template, mm_vmscan_memcg_reclaim_begin, |
| 131 | |
| 132 | TP_PROTO(int order, int may_writepage, gfp_t gfp_flags), |
| 133 | |
| 134 | TP_ARGS(order, may_writepage, gfp_flags) |
| 135 | ); |
| 136 | |
| 137 | DEFINE_EVENT(mm_vmscan_direct_reclaim_begin_template, mm_vmscan_memcg_softlimit_reclaim_begin, |
| 138 | |
| 139 | TP_PROTO(int order, int may_writepage, gfp_t gfp_flags), |
| 140 | |
| 141 | TP_ARGS(order, may_writepage, gfp_flags) |
| 142 | ); |
KOSAKI Motohiro | cf4dcc3 | 2010-08-09 17:19:55 -0700 | [diff] [blame] | 143 | |
| 144 | DECLARE_EVENT_CLASS(mm_vmscan_direct_reclaim_end_template, |
Mel Gorman | 33906bc | 2010-08-09 17:19:16 -0700 | [diff] [blame] | 145 | |
| 146 | TP_PROTO(unsigned long nr_reclaimed), |
| 147 | |
| 148 | TP_ARGS(nr_reclaimed), |
| 149 | |
| 150 | TP_STRUCT__entry( |
| 151 | __field( unsigned long, nr_reclaimed ) |
| 152 | ), |
| 153 | |
| 154 | TP_fast_assign( |
| 155 | __entry->nr_reclaimed = nr_reclaimed; |
| 156 | ), |
| 157 | |
| 158 | TP_printk("nr_reclaimed=%lu", __entry->nr_reclaimed) |
| 159 | ); |
| 160 | |
KOSAKI Motohiro | cf4dcc3 | 2010-08-09 17:19:55 -0700 | [diff] [blame] | 161 | DEFINE_EVENT(mm_vmscan_direct_reclaim_end_template, mm_vmscan_direct_reclaim_end, |
| 162 | |
| 163 | TP_PROTO(unsigned long nr_reclaimed), |
| 164 | |
| 165 | TP_ARGS(nr_reclaimed) |
| 166 | ); |
| 167 | |
KOSAKI Motohiro | bdce6d9 | 2010-08-09 17:19:56 -0700 | [diff] [blame] | 168 | DEFINE_EVENT(mm_vmscan_direct_reclaim_end_template, mm_vmscan_memcg_reclaim_end, |
| 169 | |
| 170 | TP_PROTO(unsigned long nr_reclaimed), |
| 171 | |
| 172 | TP_ARGS(nr_reclaimed) |
| 173 | ); |
| 174 | |
| 175 | DEFINE_EVENT(mm_vmscan_direct_reclaim_end_template, mm_vmscan_memcg_softlimit_reclaim_end, |
| 176 | |
| 177 | TP_PROTO(unsigned long nr_reclaimed), |
| 178 | |
| 179 | TP_ARGS(nr_reclaimed) |
| 180 | ); |
| 181 | |
Dave Chinner | 0957607 | 2011-07-08 14:14:34 +1000 | [diff] [blame] | 182 | TRACE_EVENT(mm_shrink_slab_start, |
| 183 | TP_PROTO(struct shrinker *shr, struct shrink_control *sc, |
| 184 | long nr_objects_to_shrink, unsigned long pgs_scanned, |
| 185 | unsigned long lru_pgs, unsigned long cache_items, |
| 186 | unsigned long long delta, unsigned long total_scan), |
| 187 | |
| 188 | TP_ARGS(shr, sc, nr_objects_to_shrink, pgs_scanned, lru_pgs, |
| 189 | cache_items, delta, total_scan), |
| 190 | |
| 191 | TP_STRUCT__entry( |
| 192 | __field(struct shrinker *, shr) |
| 193 | __field(void *, shrink) |
Dave Hansen | df9024a | 2014-06-04 16:08:07 -0700 | [diff] [blame] | 194 | __field(int, nid) |
Dave Chinner | 0957607 | 2011-07-08 14:14:34 +1000 | [diff] [blame] | 195 | __field(long, nr_objects_to_shrink) |
| 196 | __field(gfp_t, gfp_flags) |
| 197 | __field(unsigned long, pgs_scanned) |
| 198 | __field(unsigned long, lru_pgs) |
| 199 | __field(unsigned long, cache_items) |
| 200 | __field(unsigned long long, delta) |
| 201 | __field(unsigned long, total_scan) |
| 202 | ), |
| 203 | |
| 204 | TP_fast_assign( |
| 205 | __entry->shr = shr; |
Dave Chinner | a0b0213 | 2013-08-28 10:18:16 +1000 | [diff] [blame] | 206 | __entry->shrink = shr->scan_objects; |
Dave Hansen | df9024a | 2014-06-04 16:08:07 -0700 | [diff] [blame] | 207 | __entry->nid = sc->nid; |
Dave Chinner | 0957607 | 2011-07-08 14:14:34 +1000 | [diff] [blame] | 208 | __entry->nr_objects_to_shrink = nr_objects_to_shrink; |
| 209 | __entry->gfp_flags = sc->gfp_mask; |
| 210 | __entry->pgs_scanned = pgs_scanned; |
| 211 | __entry->lru_pgs = lru_pgs; |
| 212 | __entry->cache_items = cache_items; |
| 213 | __entry->delta = delta; |
| 214 | __entry->total_scan = total_scan; |
| 215 | ), |
| 216 | |
Dave Hansen | df9024a | 2014-06-04 16:08:07 -0700 | [diff] [blame] | 217 | TP_printk("%pF %p: nid: %d objects to shrink %ld gfp_flags %s pgs_scanned %ld lru_pgs %ld cache items %ld delta %lld total_scan %ld", |
Dave Chinner | 0957607 | 2011-07-08 14:14:34 +1000 | [diff] [blame] | 218 | __entry->shrink, |
| 219 | __entry->shr, |
Dave Hansen | df9024a | 2014-06-04 16:08:07 -0700 | [diff] [blame] | 220 | __entry->nid, |
Dave Chinner | 0957607 | 2011-07-08 14:14:34 +1000 | [diff] [blame] | 221 | __entry->nr_objects_to_shrink, |
| 222 | show_gfp_flags(__entry->gfp_flags), |
| 223 | __entry->pgs_scanned, |
| 224 | __entry->lru_pgs, |
| 225 | __entry->cache_items, |
| 226 | __entry->delta, |
| 227 | __entry->total_scan) |
| 228 | ); |
| 229 | |
| 230 | TRACE_EVENT(mm_shrink_slab_end, |
Dave Hansen | df9024a | 2014-06-04 16:08:07 -0700 | [diff] [blame] | 231 | TP_PROTO(struct shrinker *shr, int nid, int shrinker_retval, |
Dave Hansen | 7fe7047 | 2014-06-04 16:08:06 -0700 | [diff] [blame] | 232 | long unused_scan_cnt, long new_scan_cnt, long total_scan), |
Dave Chinner | 0957607 | 2011-07-08 14:14:34 +1000 | [diff] [blame] | 233 | |
Dave Hansen | df9024a | 2014-06-04 16:08:07 -0700 | [diff] [blame] | 234 | TP_ARGS(shr, nid, shrinker_retval, unused_scan_cnt, new_scan_cnt, |
| 235 | total_scan), |
Dave Chinner | 0957607 | 2011-07-08 14:14:34 +1000 | [diff] [blame] | 236 | |
| 237 | TP_STRUCT__entry( |
| 238 | __field(struct shrinker *, shr) |
Dave Hansen | df9024a | 2014-06-04 16:08:07 -0700 | [diff] [blame] | 239 | __field(int, nid) |
Dave Chinner | 0957607 | 2011-07-08 14:14:34 +1000 | [diff] [blame] | 240 | __field(void *, shrink) |
| 241 | __field(long, unused_scan) |
| 242 | __field(long, new_scan) |
| 243 | __field(int, retval) |
| 244 | __field(long, total_scan) |
| 245 | ), |
| 246 | |
| 247 | TP_fast_assign( |
| 248 | __entry->shr = shr; |
Dave Hansen | df9024a | 2014-06-04 16:08:07 -0700 | [diff] [blame] | 249 | __entry->nid = nid; |
Dave Chinner | a0b0213 | 2013-08-28 10:18:16 +1000 | [diff] [blame] | 250 | __entry->shrink = shr->scan_objects; |
Dave Chinner | 0957607 | 2011-07-08 14:14:34 +1000 | [diff] [blame] | 251 | __entry->unused_scan = unused_scan_cnt; |
| 252 | __entry->new_scan = new_scan_cnt; |
| 253 | __entry->retval = shrinker_retval; |
Dave Hansen | 7fe7047 | 2014-06-04 16:08:06 -0700 | [diff] [blame] | 254 | __entry->total_scan = total_scan; |
Dave Chinner | 0957607 | 2011-07-08 14:14:34 +1000 | [diff] [blame] | 255 | ), |
| 256 | |
Dave Hansen | df9024a | 2014-06-04 16:08:07 -0700 | [diff] [blame] | 257 | TP_printk("%pF %p: nid: %d unused scan count %ld new scan count %ld total_scan %ld last shrinker return val %d", |
Dave Chinner | 0957607 | 2011-07-08 14:14:34 +1000 | [diff] [blame] | 258 | __entry->shrink, |
| 259 | __entry->shr, |
Dave Hansen | df9024a | 2014-06-04 16:08:07 -0700 | [diff] [blame] | 260 | __entry->nid, |
Dave Chinner | 0957607 | 2011-07-08 14:14:34 +1000 | [diff] [blame] | 261 | __entry->unused_scan, |
| 262 | __entry->new_scan, |
| 263 | __entry->total_scan, |
| 264 | __entry->retval) |
| 265 | ); |
KOSAKI Motohiro | bdce6d9 | 2010-08-09 17:19:56 -0700 | [diff] [blame] | 266 | |
KOSAKI Motohiro | e17613c | 2010-08-09 17:19:57 -0700 | [diff] [blame] | 267 | DECLARE_EVENT_CLASS(mm_vmscan_lru_isolate_template, |
Mel Gorman | a8a94d1 | 2010-08-09 17:19:17 -0700 | [diff] [blame] | 268 | |
| 269 | TP_PROTO(int order, |
| 270 | unsigned long nr_requested, |
| 271 | unsigned long nr_scanned, |
| 272 | unsigned long nr_taken, |
Tao Ma | ea4d349 | 2012-01-12 17:19:20 -0800 | [diff] [blame] | 273 | isolate_mode_t isolate_mode, |
| 274 | int file), |
Mel Gorman | a8a94d1 | 2010-08-09 17:19:17 -0700 | [diff] [blame] | 275 | |
Mel Gorman | c53919a | 2012-05-29 15:06:19 -0700 | [diff] [blame] | 276 | TP_ARGS(order, nr_requested, nr_scanned, nr_taken, isolate_mode, file), |
Mel Gorman | a8a94d1 | 2010-08-09 17:19:17 -0700 | [diff] [blame] | 277 | |
| 278 | TP_STRUCT__entry( |
| 279 | __field(int, order) |
| 280 | __field(unsigned long, nr_requested) |
| 281 | __field(unsigned long, nr_scanned) |
| 282 | __field(unsigned long, nr_taken) |
Minchan Kim | 4356f21 | 2011-10-31 17:06:47 -0700 | [diff] [blame] | 283 | __field(isolate_mode_t, isolate_mode) |
Tao Ma | ea4d349 | 2012-01-12 17:19:20 -0800 | [diff] [blame] | 284 | __field(int, file) |
Mel Gorman | a8a94d1 | 2010-08-09 17:19:17 -0700 | [diff] [blame] | 285 | ), |
| 286 | |
| 287 | TP_fast_assign( |
| 288 | __entry->order = order; |
| 289 | __entry->nr_requested = nr_requested; |
| 290 | __entry->nr_scanned = nr_scanned; |
| 291 | __entry->nr_taken = nr_taken; |
Mel Gorman | a8a94d1 | 2010-08-09 17:19:17 -0700 | [diff] [blame] | 292 | __entry->isolate_mode = isolate_mode; |
Tao Ma | ea4d349 | 2012-01-12 17:19:20 -0800 | [diff] [blame] | 293 | __entry->file = file; |
Mel Gorman | a8a94d1 | 2010-08-09 17:19:17 -0700 | [diff] [blame] | 294 | ), |
| 295 | |
Mel Gorman | c53919a | 2012-05-29 15:06:19 -0700 | [diff] [blame] | 296 | TP_printk("isolate_mode=%d order=%d nr_requested=%lu nr_scanned=%lu nr_taken=%lu file=%d", |
Mel Gorman | a8a94d1 | 2010-08-09 17:19:17 -0700 | [diff] [blame] | 297 | __entry->isolate_mode, |
| 298 | __entry->order, |
| 299 | __entry->nr_requested, |
| 300 | __entry->nr_scanned, |
| 301 | __entry->nr_taken, |
Tao Ma | ea4d349 | 2012-01-12 17:19:20 -0800 | [diff] [blame] | 302 | __entry->file) |
Mel Gorman | a8a94d1 | 2010-08-09 17:19:17 -0700 | [diff] [blame] | 303 | ); |
| 304 | |
KOSAKI Motohiro | e17613c | 2010-08-09 17:19:57 -0700 | [diff] [blame] | 305 | DEFINE_EVENT(mm_vmscan_lru_isolate_template, mm_vmscan_lru_isolate, |
| 306 | |
| 307 | TP_PROTO(int order, |
| 308 | unsigned long nr_requested, |
| 309 | unsigned long nr_scanned, |
| 310 | unsigned long nr_taken, |
Tao Ma | ea4d349 | 2012-01-12 17:19:20 -0800 | [diff] [blame] | 311 | isolate_mode_t isolate_mode, |
| 312 | int file), |
KOSAKI Motohiro | e17613c | 2010-08-09 17:19:57 -0700 | [diff] [blame] | 313 | |
Mel Gorman | c53919a | 2012-05-29 15:06:19 -0700 | [diff] [blame] | 314 | TP_ARGS(order, nr_requested, nr_scanned, nr_taken, isolate_mode, file) |
KOSAKI Motohiro | e17613c | 2010-08-09 17:19:57 -0700 | [diff] [blame] | 315 | |
| 316 | ); |
| 317 | |
KOSAKI Motohiro | cc8e970 | 2010-08-09 17:19:57 -0700 | [diff] [blame] | 318 | DEFINE_EVENT(mm_vmscan_lru_isolate_template, mm_vmscan_memcg_isolate, |
| 319 | |
| 320 | TP_PROTO(int order, |
| 321 | unsigned long nr_requested, |
| 322 | unsigned long nr_scanned, |
| 323 | unsigned long nr_taken, |
Tao Ma | ea4d349 | 2012-01-12 17:19:20 -0800 | [diff] [blame] | 324 | isolate_mode_t isolate_mode, |
| 325 | int file), |
KOSAKI Motohiro | cc8e970 | 2010-08-09 17:19:57 -0700 | [diff] [blame] | 326 | |
Mel Gorman | c53919a | 2012-05-29 15:06:19 -0700 | [diff] [blame] | 327 | TP_ARGS(order, nr_requested, nr_scanned, nr_taken, isolate_mode, file) |
KOSAKI Motohiro | cc8e970 | 2010-08-09 17:19:57 -0700 | [diff] [blame] | 328 | |
| 329 | ); |
| 330 | |
Mel Gorman | 755f022 | 2010-08-09 17:19:18 -0700 | [diff] [blame] | 331 | TRACE_EVENT(mm_vmscan_writepage, |
| 332 | |
| 333 | TP_PROTO(struct page *page, |
| 334 | int reclaim_flags), |
| 335 | |
| 336 | TP_ARGS(page, reclaim_flags), |
| 337 | |
| 338 | TP_STRUCT__entry( |
| 339 | __field(struct page *, page) |
| 340 | __field(int, reclaim_flags) |
| 341 | ), |
| 342 | |
| 343 | TP_fast_assign( |
| 344 | __entry->page = page; |
| 345 | __entry->reclaim_flags = reclaim_flags; |
| 346 | ), |
| 347 | |
| 348 | TP_printk("page=%p pfn=%lu flags=%s", |
| 349 | __entry->page, |
| 350 | page_to_pfn(__entry->page), |
| 351 | show_reclaim_flags(__entry->reclaim_flags)) |
| 352 | ); |
| 353 | |
Mel Gorman | e11da5b | 2010-10-26 14:21:40 -0700 | [diff] [blame] | 354 | TRACE_EVENT(mm_vmscan_lru_shrink_inactive, |
| 355 | |
| 356 | TP_PROTO(int nid, int zid, |
| 357 | unsigned long nr_scanned, unsigned long nr_reclaimed, |
| 358 | int priority, int reclaim_flags), |
| 359 | |
| 360 | TP_ARGS(nid, zid, nr_scanned, nr_reclaimed, priority, reclaim_flags), |
| 361 | |
| 362 | TP_STRUCT__entry( |
| 363 | __field(int, nid) |
| 364 | __field(int, zid) |
| 365 | __field(unsigned long, nr_scanned) |
| 366 | __field(unsigned long, nr_reclaimed) |
| 367 | __field(int, priority) |
| 368 | __field(int, reclaim_flags) |
| 369 | ), |
| 370 | |
| 371 | TP_fast_assign( |
| 372 | __entry->nid = nid; |
| 373 | __entry->zid = zid; |
| 374 | __entry->nr_scanned = nr_scanned; |
| 375 | __entry->nr_reclaimed = nr_reclaimed; |
| 376 | __entry->priority = priority; |
| 377 | __entry->reclaim_flags = reclaim_flags; |
| 378 | ), |
| 379 | |
| 380 | TP_printk("nid=%d zid=%d nr_scanned=%ld nr_reclaimed=%ld priority=%d flags=%s", |
| 381 | __entry->nid, __entry->zid, |
| 382 | __entry->nr_scanned, __entry->nr_reclaimed, |
| 383 | __entry->priority, |
| 384 | show_reclaim_flags(__entry->reclaim_flags)) |
| 385 | ); |
| 386 | |
Mel Gorman | 33906bc | 2010-08-09 17:19:16 -0700 | [diff] [blame] | 387 | #endif /* _TRACE_VMSCAN_H */ |
| 388 | |
| 389 | /* This part must be outside protection */ |
| 390 | #include <trace/define_trace.h> |