Lines Matching refs:old
40 cpu_walk(struct snapshot *old, struct snapshot *new,
50 if (old)
51 cpu = &old->s_cpus[i];
73 pset_walk(struct snapshot *old, struct snapshot *new,
80 while (old && i < old->s_nr_psets && j < new->s_nr_psets) {
81 if (old->s_psets[i].ps_id < new->s_psets[j].ps_id) {
82 cb(&old->s_psets[i], NULL, data);
85 } else if (old->s_psets[i].ps_id > new->s_psets[j].ps_id) {
90 cb(&old->s_psets[i], &new->s_psets[j], data);
96 while (old && i < old->s_nr_psets) {
97 cb(&old->s_psets[i], NULL, data);
155 snapshot_walk(enum snapshot_types type, struct snapshot *old,
162 changed = cpu_walk(old, new, cb, data);
166 changed = pset_walk(old, new, cb, data);
173 changed = iodev_walk(old ? old->s_iodevs : NULL,
332 snapshot_report_changes(struct snapshot *old, struct snapshot *new)
336 if (old == NULL || new == NULL)
339 if (old->s_types != new->s_types)
342 pset = old->s_types & SNAP_PSETS;
347 if (old->s_types & SNAP_CPUS)
348 (void) snapshot_walk(SNAP_CPUS, old, new, cpu_report, &pset);
359 (void) snapshot_walk(SNAP_PSETS, old, new,
363 iodev_report(old->s_iodevs, new->s_iodevs);
373 snapshot_has_changed(struct snapshot *old, struct snapshot *new)
380 if (old == NULL)
386 if (old->s_types != new->s_types)
389 if (!ret && (old->s_types & cpu_mask))
390 ret = snapshot_walk(SNAP_CPUS, old, new, dummy_cb, NULL);
391 if (!ret && (old->s_types & SNAP_PSETS))
392 ret = snapshot_walk(SNAP_PSETS, old, new, dummy_cb, NULL);
393 if (!ret && (old->s_types & iodev_mask))
394 ret = snapshot_walk(SNAP_IODEVS, old, new, dummy_cb, NULL);