1 /* SPDX-License-Identifier: GPL-2.0 */ 1 /* SPDX-License-Identifier: GPL-2.0 */ 2 #undef TRACE_SYSTEM 2 #undef TRACE_SYSTEM 3 #define TRACE_SYSTEM damon 3 #define TRACE_SYSTEM damon 4 4 5 #if !defined(_TRACE_DAMON_H) || defined(TRACE_ 5 #if !defined(_TRACE_DAMON_H) || defined(TRACE_HEADER_MULTI_READ) 6 #define _TRACE_DAMON_H 6 #define _TRACE_DAMON_H 7 7 8 #include <linux/damon.h> 8 #include <linux/damon.h> 9 #include <linux/types.h> 9 #include <linux/types.h> 10 #include <linux/tracepoint.h> 10 #include <linux/tracepoint.h> 11 11 12 TRACE_EVENT_CONDITION(damos_before_apply, << 13 << 14 TP_PROTO(unsigned int context_idx, uns << 15 unsigned int target_idx, struc << 16 unsigned int nr_regions, bool << 17 << 18 TP_ARGS(context_idx, target_idx, schem << 19 << 20 TP_CONDITION(do_trace), << 21 << 22 TP_STRUCT__entry( << 23 __field(unsigned int, context_ << 24 __field(unsigned int, scheme_i << 25 __field(unsigned long, target_ << 26 __field(unsigned long, start) << 27 __field(unsigned long, end) << 28 __field(unsigned int, nr_acces << 29 __field(unsigned int, age) << 30 __field(unsigned int, nr_regio << 31 ), << 32 << 33 TP_fast_assign( << 34 __entry->context_idx = context << 35 __entry->scheme_idx = scheme_i << 36 __entry->target_idx = target_i << 37 __entry->start = r->ar.start; << 38 __entry->end = r->ar.end; << 39 __entry->nr_accesses = r->nr_a << 40 __entry->age = r->age; << 41 __entry->nr_regions = nr_regio << 42 ), << 43 << 44 TP_printk("ctx_idx=%u scheme_idx=%u ta << 45 __entry->context_idx, << 46 __entry->target_idx, _ << 47 __entry->start, __entr << 48 __entry->nr_accesses, << 49 ); << 50 << 51 TRACE_EVENT(damon_aggregated, 12 TRACE_EVENT(damon_aggregated, 52 13 53 TP_PROTO(unsigned int target_id, struc !! 14 TP_PROTO(struct damon_target *t, unsigned int target_id, 54 unsigned int nr_regions), !! 15 struct damon_region *r, unsigned int nr_regions), 55 16 56 TP_ARGS(target_id, r, nr_regions), !! 17 TP_ARGS(t, target_id, r, nr_regions), 57 18 58 TP_STRUCT__entry( 19 TP_STRUCT__entry( 59 __field(unsigned long, target_ 20 __field(unsigned long, target_id) 60 __field(unsigned int, nr_regio 21 __field(unsigned int, nr_regions) 61 __field(unsigned long, start) 22 __field(unsigned long, start) 62 __field(unsigned long, end) 23 __field(unsigned long, end) 63 __field(unsigned int, nr_acces 24 __field(unsigned int, nr_accesses) 64 __field(unsigned int, age) 25 __field(unsigned int, age) 65 ), 26 ), 66 27 67 TP_fast_assign( 28 TP_fast_assign( 68 __entry->target_id = target_id 29 __entry->target_id = target_id; 69 __entry->nr_regions = nr_regio 30 __entry->nr_regions = nr_regions; 70 __entry->start = r->ar.start; 31 __entry->start = r->ar.start; 71 __entry->end = r->ar.end; 32 __entry->end = r->ar.end; 72 __entry->nr_accesses = r->nr_a 33 __entry->nr_accesses = r->nr_accesses; 73 __entry->age = r->age; 34 __entry->age = r->age; 74 ), 35 ), 75 36 76 TP_printk("target_id=%lu nr_regions=%u 37 TP_printk("target_id=%lu nr_regions=%u %lu-%lu: %u %u", 77 __entry->target_id, __ 38 __entry->target_id, __entry->nr_regions, 78 __entry->start, __entr 39 __entry->start, __entry->end, 79 __entry->nr_accesses, 40 __entry->nr_accesses, __entry->age) 80 ); 41 ); 81 42 82 #endif /* _TRACE_DAMON_H */ 43 #endif /* _TRACE_DAMON_H */ 83 44 84 /* This part must be outside protection */ 45 /* This part must be outside protection */ 85 #include <trace/define_trace.h> 46 #include <trace/define_trace.h> 86 47
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.