linux.core: fix irq exit handler not finding quark#424
Conversation
Signed-off-by: Arnaud Fiorini <fiorini.arnaud@gmail.com>
📝 WalkthroughWalkthroughAdds a guard in IrqExitHandler.handleEvent to check for an invalid IRQ attribute quark and return early, preventing an IndexOutOfBoundsException when processing irq_handler_exit events lacking a matching irq_handler_entry event. ChangesIRQ Exit Handler Fix
Estimated code review effort: 1 (Trivial) | ~3 minutes Related issues: Fixes error thrown when opening a kernel trace containing an 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/kernel/handlers/IrqExitHandler.java (1)
59-62: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueConsider logging when the guard triggers.
Silent early-return on unmatched exit events works, but a trace-level log (or comment noting it's expected for truncated/incomplete traces) would aid future debugging of similar data-quality issues.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/kernel/handlers/IrqExitHandler.java` around lines 59 - 62, The early return in IrqExitHandler.handleEvent when quark is ITmfStateSystem.INVALID_ATTRIBUTE is silent, so add a trace-level log or an explanatory comment there to note the unmatched IRQ exit is expected for truncated or incomplete traces. Keep the guard behavior unchanged, but use the existing handleEvent path and the invalid-attribute check to make future debugging of data-quality issues easier.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In
`@analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/kernel/handlers/IrqExitHandler.java`:
- Around line 59-62: The early return in IrqExitHandler.handleEvent when quark
is ITmfStateSystem.INVALID_ATTRIBUTE is silent, so add a trace-level log or an
explanatory comment there to note the unmatched IRQ exit is expected for
truncated or incomplete traces. Keep the guard behavior unchanged, but use the
existing handleEvent path and the invalid-attribute check to make future
debugging of data-quality issues easier.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 7531ad41-2adb-4ca0-9a7f-0ab6f0571a7c
📒 Files selected for processing (1)
analysis/org.eclipse.tracecompass.analysis.os.linux.core/src/org/eclipse/tracecompass/internal/analysis/os/linux/core/kernel/handlers/IrqExitHandler.java
|
No need to bump the version as the produced state system will be identical when it's made. |
What it does
The IRQ exit handler assumes that a quark will always be found. This patch fixes that assumption, and avoid making the whole Linux Analysis fail. Fixes #423.
How to test
Run with the trace submitted in #423.
Follow-ups
N/A
Review checklist
Summary by CodeRabbit