xref: /openbmc/linux/include/trace/events/damon.h (revision 65844828)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #undef TRACE_SYSTEM
3 #define TRACE_SYSTEM damon
4 
5 #if !defined(_TRACE_DAMON_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define _TRACE_DAMON_H
7 
8 #include <linux/damon.h>
9 #include <linux/types.h>
10 #include <linux/tracepoint.h>
11 
12 TRACE_EVENT(damon_aggregated,
13 
14 	TP_PROTO(struct damon_target *t, unsigned int target_id,
15 		struct damon_region *r, unsigned int nr_regions),
16 
17 	TP_ARGS(t, target_id, r, nr_regions),
18 
19 	TP_STRUCT__entry(
20 		__field(unsigned long, target_id)
21 		__field(unsigned int, nr_regions)
22 		__field(unsigned long, start)
23 		__field(unsigned long, end)
24 		__field(unsigned int, nr_accesses)
25 		__field(unsigned int, age)
26 	),
27 
28 	TP_fast_assign(
29 		__entry->target_id = target_id;
30 		__entry->nr_regions = nr_regions;
31 		__entry->start = r->ar.start;
32 		__entry->end = r->ar.end;
33 		__entry->nr_accesses = r->nr_accesses;
34 		__entry->age = r->age;
35 	),
36 
37 	TP_printk("target_id=%lu nr_regions=%u %lu-%lu: %u %u",
38 			__entry->target_id, __entry->nr_regions,
39 			__entry->start, __entry->end,
40 			__entry->nr_accesses, __entry->age)
41 );
42 
43 #endif /* _TRACE_DAMON_H */
44 
45 /* This part must be outside protection */
46 #include <trace/define_trace.h>
47