Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1313101 > unrolled thread

Re: [PATCH V10 2/4] perf/powerpc: add support for sampling intr machine state

Started byMichael Ellerman <mpe@ellerman.id.au>
First post2016-01-20 11:50 +0100
Last post2016-01-25 04:30 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH V10 2/4] perf/powerpc: add support for sampling intr  machine state Michael Ellerman <mpe@ellerman.id.au> - 2016-01-20 11:50 +0100
    Re: [PATCH V10 2/4] perf/powerpc: add support for sampling intr  machine state Madhavan Srinivasan <maddy@linux.vnet.ibm.com> - 2016-01-25 04:30 +0100

#1313101 — Re: [PATCH V10 2/4] perf/powerpc: add support for sampling intr machine state

FromMichael Ellerman <mpe@ellerman.id.au>
Date2016-01-20 11:50 +0100
SubjectRe: [PATCH V10 2/4] perf/powerpc: add support for sampling intr machine state
Message-ID<qSYuS-5ao-19@gated-at.bofh.it>
On Mon, 2016-01-11 at 15:58 +0530, Anju T wrote:
> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
> index 9a7057e..c4ce60d 100644
> --- a/arch/powerpc/Kconfig
> +++ b/arch/powerpc/Kconfig
> @@ -119,6 +119,7 @@ config PPC
>  	select GENERIC_ATOMIC64 if PPC32
>  	select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
>  	select HAVE_PERF_EVENTS
> +	select HAVE_PERF_REGS
>  	select HAVE_REGS_AND_STACK_ACCESS_API
>  	select HAVE_HW_BREAKPOINT if PERF_EVENTS && PPC_BOOK3S_64
>  	select ARCH_WANT_IPC_PARSE_VERSION
> diff --git a/arch/powerpc/perf/perf_regs.c b/arch/powerpc/perf/perf_regs.c
> new file mode 100644
> index 0000000..d32581763
> --- /dev/null
> +++ b/arch/powerpc/perf/perf_regs.c
...
> +
> +u64 perf_reg_abi(struct task_struct *task)
> +{
> +	return PERF_SAMPLE_REGS_ABI_64;

What is this value used for exactly?

It seems like on 32-bit kernels we should be returning PERF_SAMPLE_REGS_ABI_32.

> +}
> +
> +void perf_get_regs_user(struct perf_regs *regs_user,
> +			struct pt_regs *regs,
> +			struct pt_regs *regs_user_copy)
> +{
> +	regs_user->regs = task_pt_regs(current);
> +	regs_user->abi  = perf_reg_abi(current);
> +}

cheers

[toc] | [next] | [standalone]


#1316189

FromMadhavan Srinivasan <maddy@linux.vnet.ibm.com>
Date2016-01-25 04:30 +0100
Message-ID<qUG0O-6aS-5@gated-at.bofh.it>
In reply to#1313101

On Wednesday 20 January 2016 04:10 PM, Michael Ellerman wrote:
> On Mon, 2016-01-11 at 15:58 +0530, Anju T wrote:
>> diff --git a/arch/powerpc/Kconfig b/arch/powerpc/Kconfig
>> index 9a7057e..c4ce60d 100644
>> --- a/arch/powerpc/Kconfig
>> +++ b/arch/powerpc/Kconfig
>> @@ -119,6 +119,7 @@ config PPC
>>  	select GENERIC_ATOMIC64 if PPC32
>>  	select ARCH_HAS_ATOMIC64_DEC_IF_POSITIVE
>>  	select HAVE_PERF_EVENTS
>> +	select HAVE_PERF_REGS
>>  	select HAVE_REGS_AND_STACK_ACCESS_API
>>  	select HAVE_HW_BREAKPOINT if PERF_EVENTS && PPC_BOOK3S_64
>>  	select ARCH_WANT_IPC_PARSE_VERSION
>> diff --git a/arch/powerpc/perf/perf_regs.c b/arch/powerpc/perf/perf_regs.c
>> new file mode 100644
>> index 0000000..d32581763
>> --- /dev/null
>> +++ b/arch/powerpc/perf/perf_regs.c
> ...
>> +
>> +u64 perf_reg_abi(struct task_struct *task)
>> +{
>> +	return PERF_SAMPLE_REGS_ABI_64;
> What is this value used for exactly?
>
> It seems like on 32-bit kernels we should be returning PERF_SAMPLE_REGS_ABI_32.

Yes. you are right. But even in 64bit kernel, based on the application
we need to return 32 to 64 abi. Damn my bad. missed 32bit part
all together.


Maddy
>
>> +}
>> +
>> +void perf_get_regs_user(struct perf_regs *regs_user,
>> +			struct pt_regs *regs,
>> +			struct pt_regs *regs_user_copy)
>> +{
>> +	regs_user->regs = task_pt_regs(current);
>> +	regs_user->abi  = perf_reg_abi(current);
>> +}
> cheers
>
> _______________________________________________
> Linuxppc-dev mailing list
> Linuxppc-dev@lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-dev

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web