hwpmc_arm64: remove write only variables and the computations they do
Sponsored by: Netflix
This commit is contained in:
parent
20669405d2
commit
1545c66789
@ -165,7 +165,6 @@ arm64_allocate_pmc(int cpu, int ri, struct pmc *pm,
|
||||
const struct pmc_op_pmcallocate *a)
|
||||
{
|
||||
uint32_t config;
|
||||
struct arm64_cpu *pac;
|
||||
enum pmc_event pe;
|
||||
|
||||
KASSERT(cpu >= 0 && cpu < pmc_cpu_max(),
|
||||
@ -173,8 +172,6 @@ arm64_allocate_pmc(int cpu, int ri, struct pmc *pm,
|
||||
KASSERT(ri >= 0 && ri < arm64_npmcs,
|
||||
("[arm64,%d] illegal row index %d", __LINE__, ri));
|
||||
|
||||
pac = arm64_pcpu[cpu];
|
||||
|
||||
if (a->pm_class != PMC_CLASS_ARMV8) {
|
||||
return (EINVAL);
|
||||
}
|
||||
@ -337,12 +334,6 @@ arm64_start_pmc(int cpu, int ri)
|
||||
static int
|
||||
arm64_stop_pmc(int cpu, int ri)
|
||||
{
|
||||
struct pmc_hw *phw;
|
||||
struct pmc *pm;
|
||||
|
||||
phw = &arm64_pcpu[cpu]->pc_arm64pmcs[ri];
|
||||
pm = phw->phw_pmc;
|
||||
|
||||
/*
|
||||
* Disable the PMCs.
|
||||
*/
|
||||
@ -372,7 +363,6 @@ arm64_release_pmc(int cpu, int ri, struct pmc *pmc)
|
||||
static int
|
||||
arm64_intr(struct trapframe *tf)
|
||||
{
|
||||
struct arm64_cpu *pc;
|
||||
int retval, ri;
|
||||
struct pmc *pm;
|
||||
int error;
|
||||
@ -386,7 +376,6 @@ arm64_intr(struct trapframe *tf)
|
||||
TRAPF_USERMODE(tf));
|
||||
|
||||
retval = 0;
|
||||
pc = arm64_pcpu[cpu];
|
||||
|
||||
for (ri = 0; ri < arm64_npmcs; ri++) {
|
||||
pm = arm64_pcpu[cpu]->pc_arm64pmcs[ri].phw_pmc;
|
||||
|
@ -112,13 +112,11 @@ pmc_save_user_callchain(uintptr_t *cc, int maxsamples,
|
||||
struct trapframe *tf)
|
||||
{
|
||||
uintptr_t pc, r, oldfp, fp;
|
||||
struct thread *td;
|
||||
int count;
|
||||
|
||||
KASSERT(TRAPF_USERMODE(tf), ("[arm64,%d] Not a user trap frame tf=%p",
|
||||
__LINE__, (void *) tf));
|
||||
|
||||
td = curthread;
|
||||
pc = PMC_TRAPFRAME_TO_PC(tf);
|
||||
*cc++ = pc;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user