Re: [PATCH 6/9] perf: Generic pci uncore device support
From: Peter Zijlstra
Date: Thu May 03 2012 - 17:37:44 EST
On Wed, 2012-05-02 at 10:07 +0800, Yan, Zheng wrote:
> + if (box->pci_dev) {
> + hwc->config_base = uncore_pci_event_ctl(box,
> hwc->idx);
> + hwc->event_base = uncore_pci_perf_ctr(box, hwc->idx);
> + } else {
> + hwc->config_base = uncore_msr_event_ctl(box,
> hwc->idx);
> + hwc->event_base = uncore_msr_perf_ctr(box, hwc->idx);
> + }
Since box is already an argument to uncore_*_event_ct[lr]() it could
include this conditional. Is GCC smart enough to pull it out and not
evaluate the condition twice in that case?
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/