lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Thu, 03 May 2012 23:37:28 +0200 From: Peter Zijlstra <a.p.zijlstra@...llo.nl> To: "Yan, Zheng" <zheng.z.yan@...el.com> Cc: mingo@...e.hu, andi@...stfloor.org, eranian@...gle.com, jolsa@...hat.com, ming.m.lin@...el.com, linux-kernel@...r.kernel.org Subject: Re: [PATCH 6/9] perf: Generic pci uncore device support 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@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists