|
|
5b4e29 |
commit 04be64dc8a08203decc6fe206700dcb1f06c8d79
|
|
|
5b4e29 |
Author: Nathan Scott <nathans@redhat.com>
|
|
|
5b4e29 |
Date: Mon Feb 24 17:28:48 2020 +1100
|
|
|
5b4e29 |
|
|
|
5b4e29 |
pmdalinux: fix interrupts file parser for s390x /proc/interrupts layout
|
|
|
5b4e29 |
|
|
|
5b4e29 |
The s390x interrupts file produced by the kernel was causing a failure
|
|
|
5b4e29 |
in pmdalinux because the code expected first numeric interrupt lines &
|
|
|
5b4e29 |
then named (text) lines, whereas on this platform they're intermixed.
|
|
|
5b4e29 |
|
|
|
5b4e29 |
Add a sample interrupts file from these kernels for qa/886 to test.
|
|
|
5b4e29 |
|
|
|
5b4e29 |
Resolves Red Hat BZ #1798058
|
|
|
5b4e29 |
|
|
|
5b4e29 |
diff --git a/qa/886.out.bz2 b/qa/886.out.bz2
|
|
|
5b4e29 |
index 59bfae0e2..8db30e566 100644
|
|
|
5b4e29 |
Binary files a/qa/886.out.bz2 and b/qa/886.out.bz2 differ
|
|
|
5b4e29 |
diff --git a/qa/linux/interrupts-16cpu-s390x b/qa/linux/interrupts-16cpu-s390x
|
|
|
5b4e29 |
new file mode 100644
|
|
|
5b4e29 |
index 000000000..574dec6b0
|
|
|
5b4e29 |
--- /dev/null
|
|
|
5b4e29 |
+++ b/qa/linux/interrupts-16cpu-s390x
|
|
|
5b4e29 |
@@ -0,0 +1,59 @@
|
|
|
5b4e29 |
+ CPU0 CPU1 CPU2 CPU3 CPU4 CPU5 CPU6 CPU7 CPU8 CPU9 CPU10 CPU11 CPU12 CPU13 CPU14 CPU15
|
|
|
5b4e29 |
+EXT: 30368 5872 22695 18176 19463 5347 21306 15838 21533 6333 32165 7468 23182 5010 28665 6909
|
|
|
5b4e29 |
+I/O: 675 559 764 682 764 631 646 645 822 909 464 463 645 653 574 377
|
|
|
5b4e29 |
+AIO: 39 32 101 122 58 67 87 65 156 145 33 50 64 51 48 34
|
|
|
5b4e29 |
+ 3: 6 4 43 44 13 22 37 26 64 55 11 29 20 15 10 7 PCI-MSI mlx5_async@pci:0002:00:00.0
|
|
|
5b4e29 |
+ 4: 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 PCI-MSI mlx5_comp0@pci:0002:00:00.0
|
|
|
5b4e29 |
+ 5: 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 PCI-MSI mlx5_comp1@pci:0002:00:00.0
|
|
|
5b4e29 |
+ 6: 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 PCI-MSI mlx5_comp2@pci:0002:00:00.0
|
|
|
5b4e29 |
+ 7: 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 PCI-MSI mlx5_comp3@pci:0002:00:00.0
|
|
|
5b4e29 |
+ 8: 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 PCI-MSI mlx5_comp4@pci:0002:00:00.0
|
|
|
5b4e29 |
+ 9: 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 PCI-MSI mlx5_comp5@pci:0002:00:00.0
|
|
|
5b4e29 |
+ 10: 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 PCI-MSI mlx5_comp6@pci:0002:00:00.0
|
|
|
5b4e29 |
+ 11: 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 PCI-MSI mlx5_comp7@pci:0002:00:00.0
|
|
|
5b4e29 |
+ 12: 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 PCI-MSI mlx5_comp8@pci:0002:00:00.0
|
|
|
5b4e29 |
+ 13: 15 11 39 49 24 25 18 13 64 64 3 12 27 13 22 7 PCI-MSI mlx5_async@pci:0003:00:00.0
|
|
|
5b4e29 |
+ 14: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 PCI-MSI mlx5_comp0@pci:0003:00:00.0
|
|
|
5b4e29 |
+ 15: 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 PCI-MSI mlx5_comp1@pci:0003:00:00.0
|
|
|
5b4e29 |
+ 16: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 PCI-MSI mlx5_comp2@pci:0003:00:00.0
|
|
|
5b4e29 |
+ 17: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 PCI-MSI mlx5_comp3@pci:0003:00:00.0
|
|
|
5b4e29 |
+ 18: 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 PCI-MSI mlx5_comp4@pci:0003:00:00.0
|
|
|
5b4e29 |
+ 19: 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 PCI-MSI mlx5_comp5@pci:0003:00:00.0
|
|
|
5b4e29 |
+ 20: 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 PCI-MSI mlx5_comp6@pci:0003:00:00.0
|
|
|
5b4e29 |
+ 21: 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 PCI-MSI mlx5_comp7@pci:0003:00:00.0
|
|
|
5b4e29 |
+ 22: 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 PCI-MSI mlx5_comp8@pci:0003:00:00.0
|
|
|
5b4e29 |
+ 23: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 PCI-MSI 0000:00:00.0
|
|
|
5b4e29 |
+ 24: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 PCI-MSI 0001:00:00.0
|
|
|
5b4e29 |
+CLK: 2876 2246 9129 14527 2478 1653 2830 3374 8696 1867 12976 3002 2341 1935 3066 3063 [EXT] Clock Comparator
|
|
|
5b4e29 |
+EXC: 27474 3626 13527 3649 16970 3694 18487 12464 12834 4466 19188 4466 20848 3077 25599 3846 [EXT] External Call
|
|
|
5b4e29 |
+EMS: 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 [EXT] Emergency Signal
|
|
|
5b4e29 |
+TMR: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 [EXT] CPU Timer
|
|
|
5b4e29 |
+TAL: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 [EXT] Timing Alert
|
|
|
5b4e29 |
+PFL: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 [EXT] Pseudo Page Fault
|
|
|
5b4e29 |
+DSD: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 [EXT] DASD Diag
|
|
|
5b4e29 |
+VRT: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 [EXT] Virtio
|
|
|
5b4e29 |
+SCP: 18 0 39 0 15 0 5 0 3 0 1 0 0 0 0 0 [EXT] Service Call
|
|
|
5b4e29 |
+IUC: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 [EXT] IUCV
|
|
|
5b4e29 |
+CMS: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 [EXT] CPU-Measurement: Sampling
|
|
|
5b4e29 |
+CMC: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 [EXT] CPU-Measurement: Counter
|
|
|
5b4e29 |
+FTP: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 [EXT] HMC FTP Service
|
|
|
5b4e29 |
+CIO: 62 57 80 90 101 81 91 81 93 112 59 46 70 97 46 37 [I/O] Common I/O Layer Interrupt
|
|
|
5b4e29 |
+DAS: 613 502 684 592 663 550 555 564 729 797 405 417 575 556 528 340 [I/O] DASD
|
|
|
5b4e29 |
+C15: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 [I/O] 3215
|
|
|
5b4e29 |
+C70: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 [I/O] 3270
|
|
|
5b4e29 |
+TAP: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 [I/O] Tape
|
|
|
5b4e29 |
+VMR: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 [I/O] Unit Record Devices
|
|
|
5b4e29 |
+LCS: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 [I/O] LCS
|
|
|
5b4e29 |
+CTC: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 [I/O] CTC
|
|
|
5b4e29 |
+ADM: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 [I/O] EADM Subchannel
|
|
|
5b4e29 |
+CSC: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 [I/O] CHSC Subchannel
|
|
|
5b4e29 |
+VIR: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 [I/O] Virtual I/O Devices
|
|
|
5b4e29 |
+QAI: 18 17 18 27 20 20 31 26 28 25 18 7 15 20 15 18 [AIO] QDIO Adapter Interrupt
|
|
|
5b4e29 |
+APB: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 [AIO] AP Bus
|
|
|
5b4e29 |
+PCF: 21 15 83 95 38 48 56 39 128 120 15 43 49 31 33 16 [AIO] PCI Floating Interrupt
|
|
|
5b4e29 |
+PCD: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 [AIO] PCI Directed Interrupt
|
|
|
5b4e29 |
+MSI: 21 15 83 95 38 48 56 39 128 120 15 43 49 31 33 16 [AIO] MSI Interrupt
|
|
|
5b4e29 |
+VAI: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 [AIO] Virtual I/O Devices AI
|
|
|
5b4e29 |
+GAL: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 [AIO] GIB Alert
|
|
|
5b4e29 |
+NMI: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 [NMI] Machine Check
|
|
|
5b4e29 |
+RST: 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 [CPU] CPU Restart
|
|
|
5b4e29 |
diff --git a/src/pmdas/linux/interrupts.c b/src/pmdas/linux/interrupts.c
|
|
|
5b4e29 |
index f8a4d9b1b..f57af9e43 100644
|
|
|
5b4e29 |
--- a/src/pmdas/linux/interrupts.c
|
|
|
5b4e29 |
+++ b/src/pmdas/linux/interrupts.c
|
|
|
5b4e29 |
@@ -456,7 +456,9 @@ refresh_interrupt_values(void)
|
|
|
5b4e29 |
while (fgets(iobuf, iobufsz, fp) != NULL) {
|
|
|
5b4e29 |
iobuf[iobufsz - 1] = '\0';
|
|
|
5b4e29 |
/* next we parse each interrupt line row (starting with a digit) */
|
|
|
5b4e29 |
- sts = extract_interrupt_lines(iobuf, ncolumns, i++);
|
|
|
5b4e29 |
+ sts = extract_interrupt_lines(iobuf, ncolumns, i);
|
|
|
5b4e29 |
+ if (sts > 0)
|
|
|
5b4e29 |
+ i++;
|
|
|
5b4e29 |
if (sts > 1)
|
|
|
5b4e29 |
resized++;
|
|
|
5b4e29 |
if (sts)
|
|
|
5b4e29 |
@@ -466,7 +468,9 @@ refresh_interrupt_values(void)
|
|
|
5b4e29 |
if (extract_interrupt_misses(iobuf))
|
|
|
5b4e29 |
continue;
|
|
|
5b4e29 |
/* parse other per-CPU interrupt counter rows (starts non-digit) */
|
|
|
5b4e29 |
- sts = extract_interrupt_other(iobuf, ncolumns, j++);
|
|
|
5b4e29 |
+ sts = extract_interrupt_other(iobuf, ncolumns, j);
|
|
|
5b4e29 |
+ if (sts > 0)
|
|
|
5b4e29 |
+ j++;
|
|
|
5b4e29 |
if (sts > 1)
|
|
|
5b4e29 |
resized++;
|
|
|
5b4e29 |
if (!sts)
|