hwpmc_arm.c (cfe30d02adda7c3b5c76156ac52d50d8cab325d9) hwpmc_arm.c (6411d14d62a6bca53ba67bc581a1d89448f34944)
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

--- 33 unchanged lines hidden (view full) ---

42#include <vm/pmap.h>
43
44struct pmc_mdep *
45pmc_md_initialize()
46{
47#ifdef CPU_XSCALE_IXP425
48 if (cpu_class == CPU_CLASS_XSCALE)
49 return pmc_xscale_initialize();
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

--- 33 unchanged lines hidden (view full) ---

42#include <vm/pmap.h>
43
44struct pmc_mdep *
45pmc_md_initialize()
46{
47#ifdef CPU_XSCALE_IXP425
48 if (cpu_class == CPU_CLASS_XSCALE)
49 return pmc_xscale_initialize();
50 else
51#endif
50#endif
52 return NULL;
51#ifdef CPU_CORTEXA
52 if (cpu_class == CPU_CLASS_CORTEXA)
53 return pmc_armv7_initialize();
54#endif
55 return NULL;
53}
54
55void
56pmc_md_finalize(struct pmc_mdep *md)
57{
58#ifdef CPU_XSCALE_IXP425
59 if (cpu_class == CPU_CLASS_XSCALE)
60 pmc_xscale_finalize(md);
61 else
62 KASSERT(0, ("[arm,%d] Unknown CPU Class 0x%x", __LINE__,
63 cpu_class));
64#endif
56}
57
58void
59pmc_md_finalize(struct pmc_mdep *md)
60{
61#ifdef CPU_XSCALE_IXP425
62 if (cpu_class == CPU_CLASS_XSCALE)
63 pmc_xscale_finalize(md);
64 else
65 KASSERT(0, ("[arm,%d] Unknown CPU Class 0x%x", __LINE__,
66 cpu_class));
67#endif
68#ifdef CPU_CORTEXA
69 if (cpu_class == CPU_CLASS_CORTEXA)
70 pmc_armv7_finalize(md);
71#endif
65}
66
67int
68pmc_save_kernel_callchain(uintptr_t *cc, int maxsamples,
69 struct trapframe *tf)
70{
71 uintptr_t pc, r, stackstart, stackend, fp;
72 struct thread *td;

--- 88 unchanged lines hidden ---
72}
73
74int
75pmc_save_kernel_callchain(uintptr_t *cc, int maxsamples,
76 struct trapframe *tf)
77{
78 uintptr_t pc, r, stackstart, stackend, fp;
79 struct thread *td;

--- 88 unchanged lines hidden ---