Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update raw interrupt processing #52

Merged
merged 1 commit into from
Feb 22, 2023
Merged

Update raw interrupt processing #52

merged 1 commit into from
Feb 22, 2023

Conversation

janaknat
Copy link
Contributor

@janaknat janaknat commented Feb 22, 2023

In some cases, interrupt lines don't have the whitespace as aperf is expecting. Change the split logic to look at whitespaces and ':'. Also, update the visualizer to explicitly check for Err instead of unwrapping().

Ex:
Previously, aperf was expecting:

\nIPI1:  0

In cases where it is:

\nIPI1:0

aperf raw interrupt processing fails. To avoid this use ':' in addition to whitespaces to look for the INTR line.

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link
Contributor

@wash-amzn wash-amzn left a comment

Choose a reason for hiding this comment

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

Add a test for the new input format. If we aren't going to be running integration tests on platforms/whatever it was that was different for this one user, we can at least capture the data from that environment in a unit test.

In some cases, interrupt lines don't have the whitespace as aperf is
expecting. Change the split logic to look at whitespaces and ':'.
Also, update the visualizer to explicitly check for Err instead of
unwrapping().
@janaknat
Copy link
Contributor Author

Add a test for the new input format. If we aren't going to be running integration tests on platforms/whatever it was that was different for this one user, we can at least capture the data from that environment in a unit test.

Ok. I've added a test with that data.

InterruptDataRaw:
time:
DateTime: "2022-01-01T01:01:01.000000000Z"
data: " CPU0 CPU1 CPU2 CPU3 CPU4 CPU5 CPU6 CPU7 \n 123:0 0 0 0 0 0 0 0 PCI edge device\n"
Copy link
Contributor

Choose a reason for hiding this comment

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

The original issue was related to IPI, what part of this test data verifies a fix for the original problem?

Copy link
Contributor Author

@janaknat janaknat Feb 22, 2023

Choose a reason for hiding this comment

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

The problem surfaced with IPI. The underlying issue was aperf was expecting a space after ':'.

@janaknat janaknat merged commit b439f14 into main Feb 22, 2023
@janaknat janaknat deleted the interrupt_fix branch March 6, 2023 17:22
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