Repository navigation
Commit 9cbdb70
perf script: improve validation of sample attributes for output fields
Check for required sample attributes using evsel rather than sample_type
in the session header. If the attribute for a default field is not
present for the event type (e.g., new command operating on file from
older kernel) the field is removed from the output list.
Expected event types must exist. For example, if a user specifies
-f trace:time,trace -f sw:time,cpu,sym
the perf.data file must contain both tracepoints and software events
(ie., it is an error if either does not exist in the file).
Attribute checking is done once at the beginning of perf-script rather
than for each sample.
v1 -> v2:
- addressed comments from acme
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1302148460-570-1-git-send-email-daahern@cisco.com
Signed-off-by: David Ahern <daahern@cisco.com>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>1 parent 0817a6a commit 9cbdb70
3 files changed
Lines changed: 109 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
| 54 | + | |
54 | 55 | | |
55 | 56 | | |
56 | 57 | | |
| |||
104 | 105 | | |
105 | 106 | | |
106 | 107 | | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
107 | 122 | | |
108 | 123 | | |
109 | | - | |
110 | | - | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
111 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
112 | 157 | | |
113 | 158 | | |
114 | 159 | | |
115 | 160 | | |
116 | 161 | | |
117 | | - | |
118 | | - | |
| 162 | + | |
| 163 | + | |
119 | 164 | | |
120 | | - | |
| 165 | + | |
121 | 166 | | |
122 | | - | |
| 167 | + | |
123 | 168 | | |
124 | 169 | | |
125 | 170 | | |
126 | 171 | | |
127 | | - | |
128 | | - | |
| 172 | + | |
| 173 | + | |
129 | 174 | | |
130 | | - | |
131 | 175 | | |
132 | 176 | | |
133 | | - | |
134 | | - | |
| 177 | + | |
| 178 | + | |
135 | 179 | | |
136 | | - | |
137 | 180 | | |
138 | 181 | | |
139 | | - | |
140 | | - | |
| 182 | + | |
| 183 | + | |
141 | 184 | | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
142 | 215 | | |
143 | 216 | | |
144 | 217 | | |
| |||
210 | 283 | | |
211 | 284 | | |
212 | 285 | | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | 286 | | |
217 | 287 | | |
218 | 288 | | |
| |||
525 | 595 | | |
526 | 596 | | |
527 | 597 | | |
| 598 | + | |
528 | 599 | | |
529 | 600 | | |
530 | 601 | | |
| |||
541 | 612 | | |
542 | 613 | | |
543 | 614 | | |
| 615 | + | |
544 | 616 | | |
545 | 617 | | |
546 | 618 | | |
| |||
1145 | 1217 | | |
1146 | 1218 | | |
1147 | 1219 | | |
| 1220 | + | |
| 1221 | + | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
1148 | 1225 | | |
1149 | 1226 | | |
1150 | 1227 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1156 | 1156 | | |
1157 | 1157 | | |
1158 | 1158 | | |
| 1159 | + | |
| 1160 | + | |
| 1161 | + | |
| 1162 | + | |
| 1163 | + | |
| 1164 | + | |
| 1165 | + | |
| 1166 | + | |
| 1167 | + | |
| 1168 | + | |
| 1169 | + | |
| 1170 | + | |
1159 | 1171 | | |
1160 | 1172 | | |
1161 | 1173 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
162 | 162 | | |
163 | 163 | | |
164 | 164 | | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
165 | 168 | | |
166 | 169 | | |
167 | 170 | | |
| |||
0 commit comments