| Date | Thu, 14 Nov 2019 10:51:14 +0100 | From | Peter Zijlstra <> | Subject | Re: [PATCH v3 04/10] perf: Add per perf_cpu_context min_heap storage |
| |
On Wed, Nov 13, 2019 at 04:30:36PM -0800, Ian Rogers wrote: > + if (cpuctx) { > + event_heap = (struct min_max_heap){ > + .data = cpuctx->itr_storage, > + .size = 0,
C guarantees that unnamed fields get to be 0
> + .cap = cpuctx->itr_storage_cap, > + }; > + } else { > + event_heap = (struct min_max_heap){ > + .data = itrs, > + .size = 0,
idem.
> + .cap = ARRAY_SIZE(itrs), > + }; > + /* Events not within a CPU context may be on any CPU. */ > + __heap_add(&event_heap, perf_event_groups_first(groups, -1)); > +
suprious whitespace
> + } > + evt = event_heap.data; > + > __heap_add(&event_heap, perf_event_groups_first(groups, cpu));
|