All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Yan, Zheng" <zheng.z.yan@intel.com>
To: linux-kernel@vger.kernel.org
Cc: a.p.zijlstra@chello.nl, mingo@kernel.org, acme@infradead.org,
	eranian@google.com, andi@firstfloor.org
Subject: Re: [PATCH V4 08/16] perf, x86: allocate space for storing LBR stack
Date: Mon, 07 Jul 2014 14:36:52 +0800	[thread overview]
Message-ID: <53BA4004.7@intel.com> (raw)
In-Reply-To: <1404714527-18603-10-git-send-email-zheng.z.yan@intel.com>

please ignore this patch

On 07/07/2014 02:28 PM, Yan, Zheng wrote:
> When the LBR call stack is enabled, it is necessary to save/restore
> the LBR stack on context switch. We can use pmu specific data to
> store LBR stack when task is scheduled out. This patch adds code
> that allocates the pmu specific data.
> 
> Signed-off-by: Yan, Zheng <zheng.z.yan@intel.com>
> Reviewed-by: Stephane Eranian <eranian@google.com>
> ---
>  arch/x86/kernel/cpu/perf_event.c | 1 +
>  arch/x86/kernel/cpu/perf_event.h | 7 +++++++
>  2 files changed, 8 insertions(+)
> 
> diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c
> index 8868e9b..2008c2a 100644
> --- a/arch/x86/kernel/cpu/perf_event.c
> +++ b/arch/x86/kernel/cpu/perf_event.c
> @@ -1907,6 +1907,7 @@ static struct pmu pmu = {
>  
>  	.event_idx		= x86_pmu_event_idx,
>  	.sched_task		= x86_pmu_sched_task,
> +	.task_ctx_size          = sizeof(struct x86_perf_task_context),
>  };
>  
>  void arch_perf_update_userpage(struct perf_event_mmap_page *userpg, u64 now)
> diff --git a/arch/x86/kernel/cpu/perf_event.h b/arch/x86/kernel/cpu/perf_event.h
> index cc25819..b0eabca 100644
> --- a/arch/x86/kernel/cpu/perf_event.h
> +++ b/arch/x86/kernel/cpu/perf_event.h
> @@ -472,6 +472,13 @@ struct x86_pmu {
>  	struct perf_guest_switch_msr *(*guest_get_msrs)(int *nr);
>  };
>  
> +struct x86_perf_task_context {
> +	u64 lbr_from[MAX_LBR_ENTRIES];
> +	u64 lbr_to[MAX_LBR_ENTRIES];
> +	int lbr_callstack_users;
> +	int lbr_stack_state;
> +};
> +
>  enum {
>  	PERF_SAMPLE_BRANCH_CALL_STACK_SHIFT = PERF_SAMPLE_BRANCH_MAX_SHIFT,
>  	PERF_SAMPLE_BRANCH_SELECT_MAP_SIZE,
> 


  reply	other threads:[~2014-07-07  6:37 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-07  6:28 [PATCH v5 00/16] perf, x86: Haswell LBR call stack support Yan, Zheng
2014-07-07  6:28 ` [PATCH v5 01/16] perf, x86: Reduce lbr_sel_map size Yan, Zheng
2014-07-07  6:28 ` [PATCH v5 02/16] perf, core: introduce pmu context switch callback Yan, Zheng
2014-07-07  6:28 ` [PATCH v5 03/16] perf, x86: use context switch callback to flush LBR stack Yan, Zheng
2014-07-07  6:28 ` [PATCH v5 04/16] perf, x86: Basic Haswell LBR call stack support Yan, Zheng
2014-07-07  6:28 ` [PATCH v5 05/16] perf, core: pmu specific data for perf task context Yan, Zheng
2014-07-07  6:28 ` [PATCH v5 06/16] perf, core: always switch pmu specific data during context switch Yan, Zheng
2014-07-07  6:28 ` [PATCH v5 07/16] perf, x86: allocate space for storing LBR stack Yan, Zheng
2014-07-07  6:28 ` [PATCH V4 07/16] perf, x86: track number of events that use LBR callstack Yan, Zheng
2014-07-07  6:36   ` Yan, Zheng
2014-07-07  6:28 ` [PATCH V4 08/16] perf, x86: allocate space for storing LBR stack Yan, Zheng
2014-07-07  6:36   ` Yan, Zheng [this message]
2014-07-07  6:28 ` [PATCH v5 08/16] perf, x86: track number of events that use LBR callstack Yan, Zheng
2014-07-07  6:28 ` [PATCH v5 09/16] perf, x86: Save/resotre LBR stack during context switch Yan, Zheng
2014-07-07  6:28 ` [PATCH v5 10/16] perf, core: simplify need branch stack check Yan, Zheng
2014-07-07  6:28 ` [PATCH v5 11/16] perf, core: Pass perf_sample_data to perf_callchain() Yan, Zheng
2014-07-07  6:28 ` [PATCH v5 12/16] perf, x86: use LBR call stack to get user callchain Yan, Zheng
2014-07-07  6:28 ` [PATCH v5 13/16] perf, x86: re-organize code that implicitly enables LBR/PEBS Yan, Zheng
2014-07-07  6:28 ` [PATCH v5 14/16] perf, x86: enable LBR callstack when recording callchain Yan, Zheng
2014-07-07  6:28 ` [PATCH v5 15/16] perf, x86: disable FREEZE_LBRS_ON_PMI when LBR operates in callstack mode Yan, Zheng
2014-07-07  6:28 ` [PATCH v5 16/16] perf, x86: Discard zero length call entries in LBR call stack Yan, Zheng
2014-09-05 14:25 ` [PATCH v5 00/16] perf, x86: Haswell LBR call stack support Liang, Kan
2014-09-05 15:20   ` Stephane Eranian
  -- strict thread matches above, loose matches on Subject: below --
2014-06-30  8:50 [PATCH V4 " Yan, Zheng
2014-06-30  8:50 ` [PATCH V4 08/16] perf, x86: allocate space for storing LBR stack Yan, Zheng
2014-03-17  5:57 [PATCH v4 00/16] perf, x86: Haswell LBR call stack support Yan, Zheng
2014-03-17  5:57 ` [PATCH v4 08/16] perf, x86: allocate space for storing LBR stack Yan, Zheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=53BA4004.7@intel.com \
    --to=zheng.z.yan@intel.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@infradead.org \
    --cc=andi@firstfloor.org \
    --cc=eranian@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.