Merge tag 'trace-printf-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/trace...
[drm/drm-misc.git] / include / trace / events / kyber.h
blob9d44781efc1c4ed0413516dd22f6511d5d937049
1 /* SPDX-License-Identifier: GPL-2.0 */
2 #undef TRACE_SYSTEM
3 #define TRACE_SYSTEM kyber
5 #if !defined(_TRACE_KYBER_H) || defined(TRACE_HEADER_MULTI_READ)
6 #define _TRACE_KYBER_H
8 #include <linux/blkdev.h>
9 #include <linux/tracepoint.h>
11 #define DOMAIN_LEN 16
12 #define LATENCY_TYPE_LEN 8
14 TRACE_EVENT(kyber_latency,
16 TP_PROTO(dev_t dev, const char *domain, const char *type,
17 unsigned int percentile, unsigned int numerator,
18 unsigned int denominator, unsigned int samples),
20 TP_ARGS(dev, domain, type, percentile, numerator, denominator, samples),
22 TP_STRUCT__entry(
23 __field( dev_t, dev )
24 __array( char, domain, DOMAIN_LEN )
25 __array( char, type, LATENCY_TYPE_LEN )
26 __field( u8, percentile )
27 __field( u8, numerator )
28 __field( u8, denominator )
29 __field( unsigned int, samples )
32 TP_fast_assign(
33 __entry->dev = dev;
34 strscpy(__entry->domain, domain, sizeof(__entry->domain));
35 strscpy(__entry->type, type, sizeof(__entry->type));
36 __entry->percentile = percentile;
37 __entry->numerator = numerator;
38 __entry->denominator = denominator;
39 __entry->samples = samples;
42 TP_printk("%d,%d %s %s p%u %u/%u samples=%u",
43 MAJOR(__entry->dev), MINOR(__entry->dev), __entry->domain,
44 __entry->type, __entry->percentile, __entry->numerator,
45 __entry->denominator, __entry->samples)
48 TRACE_EVENT(kyber_adjust,
50 TP_PROTO(dev_t dev, const char *domain, unsigned int depth),
52 TP_ARGS(dev, domain, depth),
54 TP_STRUCT__entry(
55 __field( dev_t, dev )
56 __array( char, domain, DOMAIN_LEN )
57 __field( unsigned int, depth )
60 TP_fast_assign(
61 __entry->dev = dev;
62 strscpy(__entry->domain, domain, sizeof(__entry->domain));
63 __entry->depth = depth;
66 TP_printk("%d,%d %s %u",
67 MAJOR(__entry->dev), MINOR(__entry->dev), __entry->domain,
68 __entry->depth)
71 TRACE_EVENT(kyber_throttled,
73 TP_PROTO(dev_t dev, const char *domain),
75 TP_ARGS(dev, domain),
77 TP_STRUCT__entry(
78 __field( dev_t, dev )
79 __array( char, domain, DOMAIN_LEN )
82 TP_fast_assign(
83 __entry->dev = dev;
84 strscpy(__entry->domain, domain, sizeof(__entry->domain));
87 TP_printk("%d,%d %s", MAJOR(__entry->dev), MINOR(__entry->dev),
88 __entry->domain)
91 #define _TRACE_KYBER_H
92 #endif /* _TRACE_KYBER_H */
94 /* This part must be outside protection */
95 #include <trace/define_trace.h>