+ // some interrupt may have changed without changing the total number of lines
+ // if the same number of interrupts have been added and removed between two
+ // calls of this function.
+ if(unlikely(!irr->rd || strncmp(irr->rd->name, irr->name, MAX_INTERRUPT_NAME) != 0)) {
+ irr->rd = rrddim_find(st, irr->id);
+ if(unlikely(!irr->rd))
+ irr->rd = rrddim_add(st, irr->id, irr->name, 1, 1, RRD_ALGORITHM_INCREMENTAL);
+ else
+ rrddim_set_name(st, irr->rd, irr->name);
+
+ // also reset per cpu RRDDIMs to avoid repeating strncmp() in the per core loop
+ if(likely(do_per_core)) {
+ int c;
+ for (c = 0; c < cpus ;c++)
+ irr->cpu[c].rd = NULL;
+ }
+ }
+ rrddim_set_by_pointer(st, irr->rd, irr->total);