1/*- 2 * Copyright (c) 2003-2008 Joseph Koshy 3 * Copyright (c) 2007 The FreeBSD Foundation 4 * All rights reserved. 5 * 6 * Portions of this software were developed by A. Joseph Koshy under 7 * sponsorship from the FreeBSD Foundation and Google, Inc. 8 * --- 16 unchanged lines hidden (view full) --- 25 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 26 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 27 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 28 * SUCH DAMAGE. 29 * 30 */ 31 32#include <sys/cdefs.h> |
33__FBSDID("$FreeBSD: head/sys/dev/hwpmc/hwpmc_mod.c 184994 2008-11-15 11:11:32Z jkoshy $"); |
34 35#include <sys/param.h> 36#include <sys/eventhandler.h> 37#include <sys/jail.h> 38#include <sys/kernel.h> 39#include <sys/kthread.h> 40#include <sys/limits.h> 41#include <sys/lock.h> --- 4609 unchanged lines hidden (view full) --- 4651 if (!pmc_cpu_is_active(cpu) || pmc_pcpu[cpu] == NULL) 4652 continue; 4653 pmc_select_cpu(cpu); 4654 for (c = 0; c < md->pmd_nclass; c++) 4655 md->pmd_classdep[c].pcd_pcpu_fini(md, cpu); 4656 if (md->pmd_pcpu_fini) 4657 md->pmd_pcpu_fini(cpu); 4658 } |
4659 4660 pmc_md_finalize(md); 4661 |
4662 free(md, M_PMC); 4663 md = NULL; 4664 pmc_restore_cpu_binding(&pb); 4665 } 4666 4667 /* Free per-cpu descriptors. */ 4668 for (cpu = 0; cpu < maxcpu; cpu++) { 4669 if (!pmc_cpu_is_active(cpu)) --- 68 unchanged lines hidden --- |