History

lockdep: Refactor IRQ trace events fields into struct

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.

Marco Elver committed 6 years ago

Commit 0584df91 parent 859247d4 files · +50 −48Browse files

Showing the changes to include/linux (2 of 4 files). Show all

Unified · Split

2 files
  1. include/linux/irqflags.h +13 −0
  2. include/linux/sched.h +2 −9
include/linux/irqflags.h+13−0
@@ -33,6 +33,19 @@ · 32 unmodified lines
33 33
34#ifdef CONFIG_TRACE_IRQFLAGS34#ifdef CONFIG_TRACE_IRQFLAGS
35 35
36/* Per-task IRQ trace events information. */
37struct 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
36DECLARE_PER_CPU(int, hardirqs_enabled);49DECLARE_PER_CPU(int, hardirqs_enabled);
37DECLARE_PER_CPU(int, hardirq_context);50DECLARE_PER_CPU(int, hardirq_context);
38 51
include/linux/sched.h+2−9
@@ -18,6 +18,7 @@ · 17 unmodified lines
18#include <linux/mutex.h>18#include <linux/mutex.h>
19#include <linux/plist.h>19#include <linux/plist.h>
20#include <linux/hrtimer.h>20#include <linux/hrtimer.h>
21#include <linux/irqflags.h>
21#include <linux/seccomp.h>22#include <linux/seccomp.h>
22#include <linux/nodemask.h>23#include <linux/nodemask.h>
23#include <linux/rcupdate.h>24#include <linux/rcupdate.h>
@@ -980,17 +981,9 @@ struct task_struct { · 956 unmodified lines
980#endif981#endif
981 982
982#ifdef CONFIG_TRACE_IRQFLAGS983#ifdef CONFIG_TRACE_IRQFLAGS
983 unsigned int irq_events;984 struct irqtrace_events irqtrace;
984 unsigned int hardirq_threaded;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 u64 hardirq_chain_key;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 int softirqs_enabled;987 int softirqs_enabled;
995 int softirq_context;988 int softirq_context;
996 int irq_config;989 int irq_config;