mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fixes from Ingo Molnar: "Some tooling fixes plus three kernel fixes: a memory leak fix, a statistics fix and a crash fix" * 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: perf/x86/intel/uncore: Fix memory leaks on allocation failures perf/core: Fix cgroup time when scheduling descendants perf/core: Avoid freeing static PMU contexts when PMU is unregistered tools include uapi bpf.h: Sync kernel ABI header with tooling header perf pmu: Unbreak perf record for arm/arm64 with events with explicit PMU perf script: Add missing separator for "-F ip,brstack" (and brstackoff) perf callchain: Compare dsos (as well) for CCKEY_FUNCTION
This commit is contained in:
commit
26c923ab19
8 changed files with 74 additions and 26 deletions
|
|
@ -662,7 +662,7 @@ static inline void update_cgrp_time_from_event(struct perf_event *event)
|
|||
/*
|
||||
* Do not update time when cgroup is not active
|
||||
*/
|
||||
if (cgrp == event->cgrp)
|
||||
if (cgroup_is_descendant(cgrp->css.cgroup, event->cgrp->css.cgroup))
|
||||
__update_cgrp_time(event->cgrp);
|
||||
}
|
||||
|
||||
|
|
@ -8955,6 +8955,14 @@ static struct perf_cpu_context __percpu *find_pmu_context(int ctxn)
|
|||
|
||||
static void free_pmu_context(struct pmu *pmu)
|
||||
{
|
||||
/*
|
||||
* Static contexts such as perf_sw_context have a global lifetime
|
||||
* and may be shared between different PMUs. Avoid freeing them
|
||||
* when a single PMU is going away.
|
||||
*/
|
||||
if (pmu->task_ctx_nr > perf_invalid_context)
|
||||
return;
|
||||
|
||||
mutex_lock(&pmus_lock);
|
||||
free_percpu(pmu->pmu_cpu_context);
|
||||
mutex_unlock(&pmus_lock);
|
||||
|
|
|
|||
Loading…
Reference in a new issue