Skip to content

linux.core: : Add IRQ handlers instead of generic IRQs#314

Merged
arfio merged 1 commit into
eclipse-tracecompass:masterfrom
MatthewKhouzam:irq_handler
Oct 24, 2025
Merged

linux.core: : Add IRQ handlers instead of generic IRQs#314
arfio merged 1 commit into
eclipse-tracecompass:masterfrom
MatthewKhouzam:irq_handler

Conversation

@MatthewKhouzam

@MatthewKhouzam MatthewKhouzam commented Sep 3, 2025

Copy link
Copy Markdown
Contributor

Currently, the Resources view only shows IRQs as a single entity. This makes it harder to distinguish which handler is actually running, especially in cases where multiple IRQ handlers are mapped to the same lane.

Benefits:

  • Clearer visualization of interrupt activity.
  • Easier to identify which handler is active at a given time.
  • Better distinction when multiple handlers share one IRQ lane.

What it does

This change updates the view to display IRQ handlers instead of just the IRQ, providing finer granularity and improving readability when a single lane contains multiple handlers.

image

How to test

Open a Kernel Trace. The LibXZ ones have two irq21s.

Follow-ups

Deprecate IRQ analysis. Keep density charts though.

Review checklist

  • As an author, I have thoroughly tested my changes and carefully followed the instructions in this template

@arfio arfio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like this patch a lot, it makes IRQ much easier to understand! (I just want a small number of formatting changes so that it looks good)

List<Integer> subAttrs = ss.getSubAttributes(KernelEventHandlerUtils.getNodeIRQs(cpu, ss),false);
String irqPrefix = irqId.toString()+"/"; //$NON-NLS-1$
List<Integer> quarks = subAttrs.stream().filter(iquark -> ss.getAttributeName(iquark).startsWith(irqPrefix)).toList();
int quark =-1;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-1 is a magical number, it would be better if replaced by ITmfStateSystem.ROOT_ATTRIBUTE

* CPU on which this IRQ is sitting
*/
int quark = ss.getQuarkRelativeAndAdd(KernelEventHandlerUtils.getNodeIRQs(cpu, ss), irqId.toString());
int quark = ss.getQuarkRelativeAndAdd(KernelEventHandlerUtils.getNodeIRQs(cpu, ss), irqId.toString()+"/"+name);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

space + non-externalized string


/* Update the aggregate IRQ entry to set it to this CPU */
int aggregateQuark = ss.getQuarkAbsoluteAndAdd(Attributes.IRQS, irqId.toString());
int aggregateQuark = ss.getQuarkAbsoluteAndAdd(Attributes.IRQS, irqId.toString()+"/"+name);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above.

}
int currentThreadNode = KernelEventHandlerUtils.getCurrentThreadNode(cpu, ss);
Integer irqId = ((Long) event.getContent().getField(getLayout().fieldIrq()).getValue()).intValue();
List<Integer> subAttrs = ss.getSubAttributes(KernelEventHandlerUtils.getNodeIRQs(cpu, ss),false);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Formatting (missing spaces)

arfio
arfio previously approved these changes Oct 23, 2025

@arfio arfio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM !
Edit: The StateSystemTest needs to be changed to reflect the new behavior.

Currently, the Resources view only shows IRQs as a single entity.
This makes it harder to distinguish which handler is actually running,
especially in cases where multiple IRQ handlers are mapped to the same
lane.

This change updates the view to display IRQ handlers instead of just
the IRQ, providing finer granularity and improving readability when a
single lane contains multiple handlers.

Benefits:
* Clearer visualization of interrupt activity.
* Easier to identify which handler is active at a given time.
* Better distinction when multiple handlers share one IRQ lane.

[Added] Add handlers to IRQs in resources views

Change-Id: I131790ec6dad3b28328abea0c5d84b280a7b196e
Signed-off-by: Matthew Khouzam <matthew.khouzam@ericsson.com>
@arfio arfio merged commit f03ccc7 into eclipse-tracecompass:master Oct 24, 2025
4 checks passed
@MatthewKhouzam MatthewKhouzam deleted the irq_handler branch October 24, 2025 18:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants