Commit af954f7
committed
perf tools: Check fallback error and order
The perf_event_open might fail due to various reasons, so blindly
reducing precise_ip level might not be the best way to deal with it.
It seems the kernel return -EOPNOTSUPP when PMU doesn't support the
given precise level. Let's try again with the correct error code.
This caused a problem on AMD, as it stops on precise_ip of 2 for IBS but
user events with exclude_kernel=1 cannot make progress. Let's add the
evsel__handle_error_quirks() to this case specially. I plan to work on
the kernel side to improve this situation but it'd still need some
special handling for IBS.
Reviewed-by: James Clark <james.clark@linaro.org>
Reviewed-by: Ravi Bangoria <ravi.bangoria@amd.com>
Acked-by: Kan Liang <kan.liang@linux.intel.com>
Cc: James Clark <james.clark@arm.com>
Cc: Atish Patra <atishp@atishpatra.org>
Cc: Mingwei Zhang <mizhang@google.com>
Cc: Kajol Jain <kjain@linux.ibm.com>
Cc: Thomas Richter <tmricht@linux.ibm.com>
Cc: Palmer Dabbelt <palmer@rivosinc.com>
Link: https://lore.kernel.org/r/20241016062359.264929-8-namhyung@kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>1 parent 28398ce commit af954f7
1 file changed
+29
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2143 | 2143 | | |
2144 | 2144 | | |
2145 | 2145 | | |
2146 | | - | |
2147 | | - | |
2148 | | - | |
| 2146 | + | |
| 2147 | + | |
| 2148 | + | |
2149 | 2149 | | |
2150 | 2150 | | |
2151 | 2151 | | |
| |||
2409 | 2409 | | |
2410 | 2410 | | |
2411 | 2411 | | |
| 2412 | + | |
| 2413 | + | |
| 2414 | + | |
| 2415 | + | |
| 2416 | + | |
| 2417 | + | |
| 2418 | + | |
| 2419 | + | |
| 2420 | + | |
| 2421 | + | |
| 2422 | + | |
| 2423 | + | |
| 2424 | + | |
| 2425 | + | |
| 2426 | + | |
| 2427 | + | |
| 2428 | + | |
| 2429 | + | |
| 2430 | + | |
2412 | 2431 | | |
2413 | 2432 | | |
2414 | 2433 | | |
| |||
2527 | 2546 | | |
2528 | 2547 | | |
2529 | 2548 | | |
2530 | | - | |
2531 | | - | |
2532 | | - | |
2533 | 2549 | | |
2534 | 2550 | | |
2535 | 2551 | | |
| |||
2546 | 2562 | | |
2547 | 2563 | | |
2548 | 2564 | | |
2549 | | - | |
2550 | | - | |
| 2565 | + | |
| 2566 | + | |
2551 | 2567 | | |
2552 | | - | |
| 2568 | + | |
2553 | 2569 | | |
| 2570 | + | |
| 2571 | + | |
| 2572 | + | |
| 2573 | + | |
2554 | 2574 | | |
2555 | 2575 | | |
2556 | 2576 | | |
| |||
0 commit comments