Refactor the IRQ trace events fields, used for printing information about the IRQ trace events, into a separate struct 'irqtrace_events'. This improves readability by separating the information only used in reporting, as well as enables (simplified) storing/restoring of irqtrace_events snapshots. No functional change intended.
Showing the changes to include/linux (2 of 4 files). Show all
Unified · Split
| @@ -33,6 +33,19 @@ · 32 unmodified lines | ||
| 33 | 33 | |
| 34 | 34 | #ifdef CONFIG_TRACE_IRQFLAGS |
| 35 | 35 | |
| 36 | +/* Per-task IRQ trace events information. */ | |
| 37 | +struct irqtrace_events { | |
| 38 | + unsigned int irq_events; | |
| 39 | + unsigned long hardirq_enable_ip; | |
| 40 | + unsigned long hardirq_disable_ip; | |
| 41 | + unsigned int hardirq_enable_event; | |
| 42 | + unsigned int hardirq_disable_event; | |
| 43 | + unsigned long softirq_disable_ip; | |
| 44 | + unsigned long softirq_enable_ip; | |
| 45 | + unsigned int softirq_disable_event; | |
| 46 | + unsigned int softirq_enable_event; | |
| 47 | +}; | |
| 48 | + | |
| 36 | 49 | DECLARE_PER_CPU(int, hardirqs_enabled); |
| 37 | 50 | DECLARE_PER_CPU(int, hardirq_context); |
| 38 | 51 | |
| @@ -18,6 +18,7 @@ · 17 unmodified lines | ||
| 18 | 18 | #include <linux/mutex.h> |
| 19 | 19 | #include <linux/plist.h> |
| 20 | 20 | #include <linux/hrtimer.h> |
| 21 | +#include <linux/irqflags.h> | |
| 21 | 22 | #include <linux/seccomp.h> |
| 22 | 23 | #include <linux/nodemask.h> |
| 23 | 24 | #include <linux/rcupdate.h> |
| @@ -980,17 +981,9 @@ struct task_struct { · 956 unmodified lines | ||
| 980 | 981 | #endif |
| 981 | 982 | |
| 982 | 983 | #ifdef CONFIG_TRACE_IRQFLAGS |
| 983 | − unsigned int irq_events; | |
| 984 | + struct irqtrace_events irqtrace; | |
| 984 | 985 | unsigned int hardirq_threaded; |
| 985 | − unsigned long hardirq_enable_ip; | |
| 986 | − unsigned long hardirq_disable_ip; | |
| 987 | − unsigned int hardirq_enable_event; | |
| 988 | − unsigned int hardirq_disable_event; | |
| 989 | 986 | u64 hardirq_chain_key; |
| 990 | − unsigned long softirq_disable_ip; | |
| 991 | − unsigned long softirq_enable_ip; | |
| 992 | − unsigned int softirq_disable_event; | |
| 993 | − unsigned int softirq_enable_event; | |
| 994 | 987 | int softirqs_enabled; |
| 995 | 988 | int softirq_context; |
| 996 | 989 | int irq_config; |