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

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

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ 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.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /include/trace/events/rpm.h (Version linux-6.12-rc7) and /include/trace/events/rpm.h (Version linux-6.11.7)


  1 /* SPDX-License-Identifier: GPL-2.0 */              1 /* SPDX-License-Identifier: GPL-2.0 */
  2                                                     2 
  3 #undef TRACE_SYSTEM                                 3 #undef TRACE_SYSTEM
  4 #define TRACE_SYSTEM rpm                            4 #define TRACE_SYSTEM rpm
  5                                                     5 
  6 #if !defined(_TRACE_RUNTIME_POWER_H) || define      6 #if !defined(_TRACE_RUNTIME_POWER_H) || defined(TRACE_HEADER_MULTI_READ)
  7 #define _TRACE_RUNTIME_POWER_H                      7 #define _TRACE_RUNTIME_POWER_H
  8                                                     8 
  9 #include <linux/ktime.h>                            9 #include <linux/ktime.h>
 10 #include <linux/tracepoint.h>                      10 #include <linux/tracepoint.h>
 11                                                    11 
 12 struct device;                                     12 struct device;
 13                                                    13 
 14 /*                                                 14 /*
 15  * The rpm_internal events are used for tracin     15  * The rpm_internal events are used for tracing some important
 16  * runtime pm internal functions.                  16  * runtime pm internal functions.
 17  */                                                17  */
 18 DECLARE_EVENT_CLASS(rpm_internal,                  18 DECLARE_EVENT_CLASS(rpm_internal,
 19                                                    19 
 20         TP_PROTO(struct device *dev, int flags     20         TP_PROTO(struct device *dev, int flags),
 21                                                    21 
 22         TP_ARGS(dev, flags),                       22         TP_ARGS(dev, flags),
 23                                                    23 
 24         TP_STRUCT__entry(                          24         TP_STRUCT__entry(
 25                 __string(       name,              25                 __string(       name,           dev_name(dev)   )
 26                 __field(        int,               26                 __field(        int,            flags           )
 27                 __field(        int ,              27                 __field(        int ,           usage_count     )
 28                 __field(        int ,              28                 __field(        int ,           disable_depth   )
 29                 __field(        int ,              29                 __field(        int ,           runtime_auto    )
 30                 __field(        int ,              30                 __field(        int ,           request_pending )
 31                 __field(        int ,              31                 __field(        int ,           irq_safe        )
 32                 __field(        int ,              32                 __field(        int ,           child_count     )
 33         ),                                         33         ),
 34                                                    34 
 35         TP_fast_assign(                            35         TP_fast_assign(
 36                 __assign_str(name);                36                 __assign_str(name);
 37                 __entry->flags = flags;            37                 __entry->flags = flags;
 38                 __entry->usage_count = atomic_     38                 __entry->usage_count = atomic_read(
 39                         &dev->power.usage_coun     39                         &dev->power.usage_count);
 40                 __entry->disable_depth = dev->     40                 __entry->disable_depth = dev->power.disable_depth;
 41                 __entry->runtime_auto = dev->p     41                 __entry->runtime_auto = dev->power.runtime_auto;
 42                 __entry->request_pending = dev     42                 __entry->request_pending = dev->power.request_pending;
 43                 __entry->irq_safe = dev->power     43                 __entry->irq_safe = dev->power.irq_safe;
 44                 __entry->child_count = atomic_     44                 __entry->child_count = atomic_read(
 45                         &dev->power.child_coun     45                         &dev->power.child_count);
 46         ),                                         46         ),
 47                                                    47 
 48         TP_printk("%s flags-%x cnt-%-2d dep-%-     48         TP_printk("%s flags-%x cnt-%-2d dep-%-2d auto-%-1d p-%-1d"
 49                         " irq-%-1d child-%d",      49                         " irq-%-1d child-%d",
 50                         __get_str(name), __ent     50                         __get_str(name), __entry->flags,
 51                         __entry->usage_count,      51                         __entry->usage_count,
 52                         __entry->disable_depth     52                         __entry->disable_depth,
 53                         __entry->runtime_auto,     53                         __entry->runtime_auto,
 54                         __entry->request_pendi     54                         __entry->request_pending,
 55                         __entry->irq_safe,         55                         __entry->irq_safe,
 56                         __entry->child_count       56                         __entry->child_count
 57                  )                                 57                  )
 58 );                                                 58 );
 59 DEFINE_EVENT(rpm_internal, rpm_suspend,            59 DEFINE_EVENT(rpm_internal, rpm_suspend,
 60                                                    60 
 61         TP_PROTO(struct device *dev, int flags     61         TP_PROTO(struct device *dev, int flags),
 62                                                    62 
 63         TP_ARGS(dev, flags)                        63         TP_ARGS(dev, flags)
 64 );                                                 64 );
 65 DEFINE_EVENT(rpm_internal, rpm_resume,             65 DEFINE_EVENT(rpm_internal, rpm_resume,
 66                                                    66 
 67         TP_PROTO(struct device *dev, int flags     67         TP_PROTO(struct device *dev, int flags),
 68                                                    68 
 69         TP_ARGS(dev, flags)                        69         TP_ARGS(dev, flags)
 70 );                                                 70 );
 71 DEFINE_EVENT(rpm_internal, rpm_idle,               71 DEFINE_EVENT(rpm_internal, rpm_idle,
 72                                                    72 
 73         TP_PROTO(struct device *dev, int flags     73         TP_PROTO(struct device *dev, int flags),
 74                                                    74 
 75         TP_ARGS(dev, flags)                        75         TP_ARGS(dev, flags)
 76 );                                                 76 );
 77 DEFINE_EVENT(rpm_internal, rpm_usage,              77 DEFINE_EVENT(rpm_internal, rpm_usage,
 78                                                    78 
 79         TP_PROTO(struct device *dev, int flags     79         TP_PROTO(struct device *dev, int flags),
 80                                                    80 
 81         TP_ARGS(dev, flags)                        81         TP_ARGS(dev, flags)
 82 );                                                 82 );
 83                                                    83 
 84 TRACE_EVENT(rpm_return_int,                        84 TRACE_EVENT(rpm_return_int,
 85         TP_PROTO(struct device *dev, unsigned      85         TP_PROTO(struct device *dev, unsigned long ip, int ret),
 86         TP_ARGS(dev, ip, ret),                     86         TP_ARGS(dev, ip, ret),
 87                                                    87 
 88         TP_STRUCT__entry(                          88         TP_STRUCT__entry(
 89                 __string(       name,              89                 __string(       name,           dev_name(dev))
 90                 __field(        unsigned long,     90                 __field(        unsigned long,          ip      )
 91                 __field(        int,               91                 __field(        int,                    ret     )
 92         ),                                         92         ),
 93                                                    93 
 94         TP_fast_assign(                            94         TP_fast_assign(
 95                 __assign_str(name);                95                 __assign_str(name);
 96                 __entry->ip = ip;                  96                 __entry->ip = ip;
 97                 __entry->ret = ret;                97                 __entry->ret = ret;
 98         ),                                         98         ),
 99                                                    99 
100         TP_printk("%pS:%s ret=%d", (void *)__e    100         TP_printk("%pS:%s ret=%d", (void *)__entry->ip, __get_str(name),
101                 __entry->ret)                     101                 __entry->ret)
102 );                                                102 );
103                                                   103 
104 #define RPM_STATUS_STRINGS \                      104 #define RPM_STATUS_STRINGS \
105         EM(RPM_INVALID, "RPM_INVALID") \          105         EM(RPM_INVALID, "RPM_INVALID") \
106         EM(RPM_ACTIVE, "RPM_ACTIVE") \            106         EM(RPM_ACTIVE, "RPM_ACTIVE") \
107         EM(RPM_RESUMING, "RPM_RESUMING") \        107         EM(RPM_RESUMING, "RPM_RESUMING") \
108         EM(RPM_SUSPENDED, "RPM_SUSPENDED") \      108         EM(RPM_SUSPENDED, "RPM_SUSPENDED") \
109         EMe(RPM_SUSPENDING, "RPM_SUSPENDING")     109         EMe(RPM_SUSPENDING, "RPM_SUSPENDING")
110                                                   110 
111 /* Enums require being exported to userspace,     111 /* Enums require being exported to userspace, for user tool parsing. */
112 #undef EM                                         112 #undef EM
113 #undef EMe                                        113 #undef EMe
114 #define EM(a, b)        TRACE_DEFINE_ENUM(a);     114 #define EM(a, b)        TRACE_DEFINE_ENUM(a);
115 #define EMe(a, b)       TRACE_DEFINE_ENUM(a);     115 #define EMe(a, b)       TRACE_DEFINE_ENUM(a);
116                                                   116 
117 RPM_STATUS_STRINGS                                117 RPM_STATUS_STRINGS
118                                                   118 
119 /*                                                119 /*
120  * Now redefine the EM() and EMe() macros to m    120  * Now redefine the EM() and EMe() macros to map the enums to the strings that
121  * will be printed in the output.                 121  * will be printed in the output.
122  */                                               122  */
123 #undef EM                                         123 #undef EM
124 #undef EMe                                        124 #undef EMe
125 #define EM(a, b)        { a, b },                 125 #define EM(a, b)        { a, b },
126 #define EMe(a, b)       { a, b }                  126 #define EMe(a, b)       { a, b }
127                                                   127 
128 TRACE_EVENT(rpm_status,                           128 TRACE_EVENT(rpm_status,
129         TP_PROTO(struct device *dev, enum rpm_    129         TP_PROTO(struct device *dev, enum rpm_status status),
130         TP_ARGS(dev, status),                     130         TP_ARGS(dev, status),
131                                                   131 
132         TP_STRUCT__entry(                         132         TP_STRUCT__entry(
133                 __string(name,  dev_name(dev))    133                 __string(name,  dev_name(dev))
134                 __field(int,    status)           134                 __field(int,    status)
135         ),                                        135         ),
136                                                   136 
137         TP_fast_assign(                           137         TP_fast_assign(
138                 __assign_str(name);               138                 __assign_str(name);
139                 __entry->status = status;         139                 __entry->status = status;
140         ),                                        140         ),
141                                                   141 
142         TP_printk("%s status=%s", __get_str(na    142         TP_printk("%s status=%s", __get_str(name),
143                 __print_symbolic(__entry->stat    143                 __print_symbolic(__entry->status, RPM_STATUS_STRINGS))
144 );                                                144 );
145                                                   145 
146 #endif /* _TRACE_RUNTIME_POWER_H */               146 #endif /* _TRACE_RUNTIME_POWER_H */
147                                                   147 
148 /* This part must be outside protection */        148 /* This part must be outside protection */
149 #include <trace/define_trace.h>                   149 #include <trace/define_trace.h>
150                                                   150 

~ [ 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