|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH 1/2] xenoprof: fix up ability to disable it
On 08/02/16 16:04, Doug Goldstein wrote:
> diff --git a/xen/arch/x86/cpu/vpmu_amd.c b/xen/arch/x86/cpu/vpmu_amd.c
> index 990e6f3..c7b5bd5 100644
> --- a/xen/arch/x86/cpu/vpmu_amd.c
> +++ b/xen/arch/x86/cpu/vpmu_amd.c
> @@ -22,6 +22,7 @@
> */
>
> #include <xen/config.h>
> +#include <xen/kconfig.h>
> #include <xen/xenoprof.h>
> #include <xen/hvm/save.h>
> #include <xen/sched.h>
> @@ -378,7 +379,8 @@ static int amd_vpmu_do_wrmsr(unsigned int msr, uint64_t
> msr_content,
> if ( (type == MSR_TYPE_CTRL) &&
> is_pmu_enabled(msr_content) && !vpmu_is_set(vpmu, VPMU_RUNNING) )
> {
> - if ( !acquire_pmu_ownership(PMU_OWNER_HVM) )
> + if ( IS_ENABLED(CONFIG_XENOPROF) &&
> + !acquire_pmu_ownership(PMU_OWNER_HVM) )
> return 0;
> vpmu_set(vpmu, VPMU_RUNNING);
>
Instead of modifying each caller into the oprofile code like this, I
wonder whether it would be neater to produce an empty set of static
inlines in xenoprof.h when !CONFIG_XENOPROF, similar to
CONFIG_SHADOW_PAGING in xen/include/asm-x86/shadow.h
~Andrew
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |