Date: Thu, 16 Sep 2010 15:19:39 +0000 (UTC) From: Fabien Thomas <fabient@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-7@freebsd.org Subject: svn commit: r212743 - stable/7/lib/libpmc Message-ID: <201009161519.o8GFJdvl095962@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: fabient Date: Thu Sep 16 15:19:39 2010 New Revision: 212743 URL: http://svn.freebsd.org/changeset/base/212743 Log: MFC r212224: Fix invalid class removal when IAF is not the last class. Keep IAF class with 0 PMC and change the alias in libpmc to IAP. Modified: stable/7/lib/libpmc/libpmc.c Directory Properties: stable/7/lib/libpmc/ (props changed) Modified: stable/7/lib/libpmc/libpmc.c ============================================================================== --- stable/7/lib/libpmc/libpmc.c Thu Sep 16 15:19:23 2010 (r212742) +++ stable/7/lib/libpmc/libpmc.c Thu Sep 16 15:19:39 2010 (r212743) @@ -2597,7 +2597,8 @@ pmc_init(void) */ cpu_has_iaf_counters = 0; for (t = 0; t < cpu_info.pm_nclass; t++) - if (cpu_info.pm_classes[t].pm_class == PMC_CLASS_IAF) + if (cpu_info.pm_classes[t].pm_class == PMC_CLASS_IAF && + cpu_info.pm_classes[t].pm_num > 0) cpu_has_iaf_counters = 1; #endif @@ -2610,9 +2611,8 @@ pmc_init(void) #define PMC_MDEP_INIT_INTEL_V2(C) do { \ PMC_MDEP_INIT(C); \ - if (cpu_has_iaf_counters) \ - pmc_class_table[n++] = &iaf_class_table_descr; \ - else \ + pmc_class_table[n++] = &iaf_class_table_descr; \ + if (!cpu_has_iaf_counters) \ pmc_mdep_event_aliases = \ C##_aliases_without_iaf; \ pmc_class_table[n] = &C##_class_table_descr; \
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201009161519.o8GFJdvl095962>