mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Peter Zijlstra <peterz@infradead.org>
To: Andi Kleen <andi@firstfloor.org>
Cc: mingo@kernel.org, acme@infradead.org,
	linux-kernel@vger.kernel.org, eranian@google.com,
	Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH 2/6] perf, x86: Add Haswell specific transaction flag reporting v4
Date: Mon, 16 Sep 2013 13:08:05 +0200	[thread overview]
Message-ID: <20130916110805.GE29018@twins.programming.kicks-ass.net> (raw)
In-Reply-To: <1379095716-4705-3-git-send-email-andi@firstfloor.org>

On Fri, Sep 13, 2013 at 11:08:32AM -0700, Andi Kleen wrote:
> @@ -207,6 +207,8 @@ union hsw_tsx_tuning {
>  	u64	    value;
>  };
>  
> +#define PEBS_HSW_TSX_FLAGS	0xff00000000

That's a 64bit value and this needs ULL.

>  void init_debug_store_on_cpu(int cpu)
>  {
>  	struct debug_store *ds = per_cpu(cpu_hw_events, cpu).ds;
> @@ -893,6 +895,16 @@ static void __intel_pmu_pebs_event(struct perf_event *event,
>  	    (x86_pmu.intel_cap.pebs_format >= 2))
>  		data.weight = intel_hsw_weight(pebs);
>  
> +	if ((event->attr.sample_type & PERF_SAMPLE_TRANSACTION) &&
> +	    x86_pmu.intel_cap.pebs_format >= 2) {
> +		data.transaction =
> +			(pebs->tsx_tuning & PEBS_HSW_TSX_FLAGS) >> 32;

Screw checkpatch and make that an 81 char line or rename the thing
data.txn or so.

> +		/* For RTM XABORTs also log the abort code from AX */
> +		if ((data.transaction & PERF_SAMPLE_TXN_TRANSACTION) &&
> +		    (pebs->ax & 1))
> +			data.transaction |= pebs->ax & 0xff000000;

Yeah, do data.txn, that also allows the above line break to go away.

> +	}
> +
>  	if (has_branch_stack(event))
>  		data.br_stack = &cpuc->lbr_stack;
>  
> -- 
> 1.8.3.1
> 

  reply	other threads:[~2013-09-16 11:08 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-13 18:08 perf, x86: Add last TSX PMU code for Haswell Andi Kleen
2013-09-13 18:08 ` [PATCH 1/6] perf, core: Add generic transaction flags v4 Andi Kleen
2013-09-16 10:58   ` Peter Zijlstra
2013-09-16 11:04   ` Peter Zijlstra
2013-09-13 18:08 ` [PATCH 2/6] perf, x86: Add Haswell specific transaction flag reporting v4 Andi Kleen
2013-09-16 11:08   ` Peter Zijlstra [this message]
2013-09-16 11:21   ` Peter Zijlstra
2013-09-13 18:08 ` [PATCH 3/6] perf, tools: Support sorting by in_tx, abort branch flags v3 Andi Kleen
2013-09-13 18:08 ` [PATCH 4/6] perf, tools: Add abort_tx,no_tx,in_tx branch filter options to perf record -j v3 Andi Kleen
2013-09-13 18:08 ` [PATCH 5/6] perf, tools: Add support for record transaction flags v4 Andi Kleen
2013-09-13 18:08 ` [PATCH 6/6] perf, x86: Suppress duplicated abort LBR records Andi Kleen
2013-09-16 11:28   ` Peter Zijlstra

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=20130916110805.GE29018@twins.programming.kicks-ass.net \
    --to=peterz@infradead.org \
    --cc=acme@infradead.org \
    --cc=ak@linux.intel.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome