Skip to content
Snippets Groups Projects
Commit 33a4bb29 authored by Ankur Bansal's avatar Ankur Bansal
Browse files

lrdp_v2 : Fix for broken softirq stats for 4.19 kernel

Fix for broken softirq stats for 4.19 kernel.
irq_cpustat_t is changed to per_cpu based implementation
in kernel 4.19.

Change-Id: Ib0f3307f168e0fd08b068f42741e3ca0c4286f1f
parent b5a9215e
No related branches found
No related tags found
No related merge requests found
......@@ -330,7 +330,10 @@ def parse_softirq_stat(ramdump):
index = 0
size_of_irq_stat = ramdump.sizeof('irq_cpustat_t')
while index < no_of_cpus:
irq_stat = irq_stat_addr + index*size_of_irq_stat
if ramdump.kernel_version >= (4, 19):
irq_stat = irq_stat_addr + ramdump.per_cpu_offset(index)
else:
irq_stat = irq_stat_addr + index*size_of_irq_stat
softirq_pending = ramdump.read_structure_field(
irq_stat, 'irq_cpustat_t', '__softirq_pending')
pending = ""
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment