Commit 06d90d3
committed
cpudist: Use
The `sched_switch` tracepoint approach requires storing the previous
task's tgid in a map and fetching it from there, because it is not
available as a tracepoint argument. Instead, placing a kprobe on the
`finish_task_switch` function allows cleanly fetching the previous
task's pid and tgid from the task_struct.finish_task_switch kprobe instead of sched_switch tracepoint1 parent 3c976bb commit 06d90d3
2 files changed
+8
-39
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | 22 | | |
28 | 23 | | |
29 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
57 | 54 | | |
58 | 55 | | |
59 | 56 | | |
| |||
66 | 63 | | |
67 | 64 | | |
68 | 65 | | |
69 | | - | |
70 | 66 | | |
71 | 67 | | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
78 | | - | |
79 | | - | |
80 | 68 | | |
81 | 69 | | |
82 | 70 | | |
| |||
99 | 87 | | |
100 | 88 | | |
101 | 89 | | |
102 | | - | |
| 90 | + | |
103 | 91 | | |
104 | 92 | | |
105 | 93 | | |
106 | 94 | | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | 95 | | |
119 | 96 | | |
120 | | - | |
| 97 | + | |
121 | 98 | | |
122 | 99 | | |
123 | 100 | | |
124 | | - | |
125 | | - | |
126 | | - | |
127 | | - | |
| 101 | + | |
| 102 | + | |
128 | 103 | | |
129 | 104 | | |
130 | 105 | | |
| |||
173 | 148 | | |
174 | 149 | | |
175 | 150 | | |
176 | | - | |
177 | | - | |
| 151 | + | |
178 | 152 | | |
179 | 153 | | |
180 | 154 | | |
| |||
0 commit comments