hwpmc_arm.c (185168) | hwpmc_arm.c (200928) |
---|---|
1/*- 2 * Copyright (c) 2005, Joseph Koshy 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 12 unchanged lines hidden (view full) --- 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * 26 */ 27 28#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2005, Joseph Koshy 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 12 unchanged lines hidden (view full) --- 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 * 26 */ 27 28#include <sys/cdefs.h> |
29__FBSDID("$FreeBSD: head/sys/dev/hwpmc/hwpmc_arm.c 185168 2008-11-22 12:34:49Z jkoshy $"); | 29__FBSDID("$FreeBSD: head/sys/dev/hwpmc/hwpmc_arm.c 200928 2009-12-23 23:16:54Z rpaulo $"); |
30 31#include <sys/param.h> 32#include <sys/pmc.h> | 30 31#include <sys/param.h> 32#include <sys/pmc.h> |
33#include <sys/systm.h> |
|
33 34#include <machine/pmc_mdep.h> | 34 35#include <machine/pmc_mdep.h> |
36#include <machine/md_var.h> |
|
35 36struct pmc_mdep * 37pmc_md_initialize() 38{ | 37 38struct pmc_mdep * 39pmc_md_initialize() 40{ |
39 return NULL; | 41 if (cpu_class == CPU_CLASS_XSCALE) 42 return pmc_xscale_initialize(); 43 else 44 return NULL; |
40} 41 42void 43pmc_md_finalize(struct pmc_mdep *md) 44{ | 45} 46 47void 48pmc_md_finalize(struct pmc_mdep *md) 49{ |
45 (void) md; | 50 if (cpu_class == CPU_CLASS_XSCALE) 51 pmc_xscale_finalize(md); 52 else 53 KASSERT(0, ("[arm,%d] Unknown CPU Class 0x%x", __LINE__, 54 cpu_class)); |
46} 47 48int 49pmc_save_kernel_callchain(uintptr_t *cc, int maxsamples, 50 struct trapframe *tf) 51{ 52 (void) cc; 53 (void) maxsamples; --- 13 unchanged lines hidden --- | 55} 56 57int 58pmc_save_kernel_callchain(uintptr_t *cc, int maxsamples, 59 struct trapframe *tf) 60{ 61 (void) cc; 62 (void) maxsamples; --- 13 unchanged lines hidden --- |