Commit e2ee150
committed
perf/x86/intel/ds: Factor out functions for PEBS records processing
JIRA: https://issues.redhat.com/browse/RHEL-47444
upstream
========
commit 3c00ed3
Author: Kan Liang <kan.liang@linux.intel.com>
Date: Tue Nov 19 05:55:03 2024 -0800
description
===========
Factor out functions to process normal and the last PEBS records, which
can be shared with the later patch.
Move the event updating related codes (intel_pmu_save_and_restart())
to the end, where all samples have been processed.
For the current usage, it doesn't matter when perf updates event counts
and reset the counter. Because all counters are stopped when the PEBS
buffer is drained.
Drop the return of the !intel_pmu_save_and_restart(event) check. Because
it never happen. The intel_pmu_save_and_restart(event) only returns 0,
when !hwc->event_base or the period_left > 0.
- The !hwc->event_base is impossible for the PEBS event, since the PEBS
event is only available on GP and fixed counters, which always have
a valid hwc->event_base.
- The check only happens for the case of non-AUTO_RELOAD and single
PEBS, which implies that the event must be overflowed. The period_left
must be always <= 0 for an overflowed event after the
x86_pmu_update().
Co-developed-by: "Peter Zijlstra (Intel)" <peterz@infradead.org>
Signed-off-by: "Peter Zijlstra (Intel)" <peterz@infradead.org>
Signed-off-by: Kan Liang <kan.liang@linux.intel.com>
Signed-off-by: Peter Zijlstra (Intel) <peterz@infradead.org>
Link: https://lore.kernel.org/r/20241119135504.1463839-4-kan.liang@linux.intel.com
Signed-off-by: Michael Petlan <mpetlan@redhat.com>1 parent 1cbdb84 commit e2ee150
1 file changed
+67
-42
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2157 | 2157 | | |
2158 | 2158 | | |
2159 | 2159 | | |
| 2160 | + | |
| 2161 | + | |
| 2162 | + | |
| 2163 | + | |
| 2164 | + | |
2160 | 2165 | | |
2161 | 2166 | | |
2162 | 2167 | | |
| 2168 | + | |
2163 | 2169 | | |
2164 | | - | |
2165 | | - | |
2166 | | - | |
2167 | | - | |
2168 | | - | |
2169 | | - | |
2170 | | - | |
| 2170 | + | |
| 2171 | + | |
2171 | 2172 | | |
2172 | | - | |
2173 | | - | |
2174 | | - | |
2175 | | - | |
2176 | | - | |
2177 | | - | |
2178 | | - | |
2179 | | - | |
2180 | | - | |
2181 | | - | |
2182 | | - | |
2183 | | - | |
2184 | | - | |
2185 | | - | |
2186 | | - | |
2187 | | - | |
2188 | | - | |
2189 | | - | |
2190 | | - | |
2191 | | - | |
| 2173 | + | |
| 2174 | + | |
| 2175 | + | |
2192 | 2176 | | |
2193 | | - | |
2194 | | - | |
2195 | | - | |
2196 | | - | |
2197 | | - | |
2198 | | - | |
2199 | | - | |
| 2177 | + | |
| 2178 | + | |
| 2179 | + | |
| 2180 | + | |
| 2181 | + | |
| 2182 | + | |
| 2183 | + | |
| 2184 | + | |
| 2185 | + | |
| 2186 | + | |
2200 | 2187 | | |
2201 | 2188 | | |
2202 | 2189 | | |
| |||
2215 | 2202 | | |
2216 | 2203 | | |
2217 | 2204 | | |
| 2205 | + | |
| 2206 | + | |
| 2207 | + | |
| 2208 | + | |
| 2209 | + | |
| 2210 | + | |
| 2211 | + | |
| 2212 | + | |
| 2213 | + | |
| 2214 | + | |
| 2215 | + | |
| 2216 | + | |
| 2217 | + | |
| 2218 | + | |
| 2219 | + | |
| 2220 | + | |
| 2221 | + | |
| 2222 | + | |
| 2223 | + | |
| 2224 | + | |
| 2225 | + | |
| 2226 | + | |
| 2227 | + | |
| 2228 | + | |
| 2229 | + | |
| 2230 | + | |
| 2231 | + | |
| 2232 | + | |
| 2233 | + | |
| 2234 | + | |
| 2235 | + | |
| 2236 | + | |
| 2237 | + | |
| 2238 | + | |
| 2239 | + | |
| 2240 | + | |
| 2241 | + | |
| 2242 | + | |
2218 | 2243 | | |
2219 | 2244 | | |
2220 | 2245 | | |
| |||
2251 | 2276 | | |
2252 | 2277 | | |
2253 | 2278 | | |
2254 | | - | |
2255 | | - | |
| 2279 | + | |
| 2280 | + | |
2256 | 2281 | | |
2257 | 2282 | | |
2258 | 2283 | | |
| |||
2383 | 2408 | | |
2384 | 2409 | | |
2385 | 2410 | | |
2386 | | - | |
2387 | | - | |
2388 | | - | |
| 2411 | + | |
| 2412 | + | |
| 2413 | + | |
2389 | 2414 | | |
2390 | 2415 | | |
2391 | 2416 | | |
| |||
2437 | 2462 | | |
2438 | 2463 | | |
2439 | 2464 | | |
2440 | | - | |
2441 | | - | |
2442 | | - | |
| 2465 | + | |
| 2466 | + | |
| 2467 | + | |
2443 | 2468 | | |
2444 | 2469 | | |
2445 | 2470 | | |
| |||
0 commit comments