All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V2 1/2] perf tools: set no_aux_samples for the tracking event in PT
@ 2017-06-30 14:16 kan.liang
  2017-06-30 14:16 ` [PATCH V2 2/2] perf tools: always set no branch for dummy " kan.liang
  2017-07-26 17:13 ` [tip:perf/core] perf intel-pt: Set no_aux_samples for the tracking event tip-bot for Kan Liang
  0 siblings, 2 replies; 8+ messages in thread
From: kan.liang @ 2017-06-30 14:16 UTC (permalink / raw)
  To: acme, jolsa, linux-kernel
  Cc: mingo, peterz, adrian.hunter, alexander.shishkin, ak, Kan Liang

From: Kan Liang <kan.liang@intel.com>

The reason of introducing the tracking event (a dummy software event) is
to collect side-band information. Additional sampling is wasteful.
no_aux_samples should be set for tracking event.

Signed-off-by: Kan Liang <kan.liang@intel.com>
---

Changes since V1
- new patch to set no_aux_samples for the tracking event (jirka)

 tools/perf/arch/x86/util/intel-pt.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/perf/arch/x86/util/intel-pt.c b/tools/perf/arch/x86/util/intel-pt.c
index f630de0..4fe1aed 100644
--- a/tools/perf/arch/x86/util/intel-pt.c
+++ b/tools/perf/arch/x86/util/intel-pt.c
@@ -751,6 +751,7 @@ static int intel_pt_recording_options(struct auxtrace_record *itr,
 		tracking_evsel->attr.freq = 0;
 		tracking_evsel->attr.sample_period = 1;
 
+		tracking_evsel->no_aux_samples = true;
 		if (need_immediate)
 			tracking_evsel->immediate = true;
 
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [PATCH V2 2/2] perf tools: always set no branch for dummy event in PT
  2017-06-30 14:16 [PATCH V2 1/2] perf tools: set no_aux_samples for the tracking event in PT kan.liang
@ 2017-06-30 14:16 ` kan.liang
  2017-07-03  7:58   ` Jiri Olsa
  2017-07-26 17:13   ` [tip:perf/core] perf intel-pt: Always set no branch for dummy event tip-bot for Kan Liang
  2017-07-26 17:13 ` [tip:perf/core] perf intel-pt: Set no_aux_samples for the tracking event tip-bot for Kan Liang
  1 sibling, 2 replies; 8+ messages in thread
From: kan.liang @ 2017-06-30 14:16 UTC (permalink / raw)
  To: acme, jolsa, linux-kernel
  Cc: mingo, peterz, adrian.hunter, alexander.shishkin, ak, Kan Liang

From: Kan Liang <kan.liang@intel.com>

An earlier kernel patch allowed enabling PT and LBR at the same time on
Goldmont.

commit ccbebba4c6bf ("perf/x86/intel/pt: Bypass PT vs. LBR exclusivity
if the core supports it")

However, users still cannot use Intel PT and LBRs simultaneously.
 $ sudo perf record -e cycles,intel_pt//u -b  -- sleep 1
 Error:
 PMU Hardware doesn't support sampling/overflow-interrupts.

PT implicitly adds dummy event in perf tool. dummy event is software
event which doesn't support LBR.

Always setting no branch for dummy event in Intel PT.

Signed-off-by: Kan Liang <kan.liang@intel.com>
---

Changes since V1
- change the BRANCH_STACK sample bit directly (jirka)

 tools/perf/arch/x86/util/intel-pt.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/perf/arch/x86/util/intel-pt.c b/tools/perf/arch/x86/util/intel-pt.c
index 4fe1aed..2201f3b 100644
--- a/tools/perf/arch/x86/util/intel-pt.c
+++ b/tools/perf/arch/x86/util/intel-pt.c
@@ -700,6 +700,7 @@ static int intel_pt_recording_options(struct auxtrace_record *itr,
 				perf_evsel__set_sample_bit(switch_evsel, TID);
 				perf_evsel__set_sample_bit(switch_evsel, TIME);
 				perf_evsel__set_sample_bit(switch_evsel, CPU);
+				perf_evsel__reset_sample_bit(switch_evsel, BRANCH_STACK);
 
 				opts->record_switch_events = false;
 				ptr->have_sched_switch = 3;
@@ -761,6 +762,7 @@ static int intel_pt_recording_options(struct auxtrace_record *itr,
 			/* And the CPU for switch events */
 			perf_evsel__set_sample_bit(tracking_evsel, CPU);
 		}
+		perf_evsel__reset_sample_bit(tracking_evsel, BRANCH_STACK);
 	}
 
 	/*
-- 
2.9.4

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: [PATCH V2 2/2] perf tools: always set no branch for dummy event in PT
  2017-06-30 14:16 ` [PATCH V2 2/2] perf tools: always set no branch for dummy " kan.liang
@ 2017-07-03  7:58   ` Jiri Olsa
  2017-07-03 16:59     ` Arnaldo Carvalho de Melo
  2017-07-26 17:13   ` [tip:perf/core] perf intel-pt: Always set no branch for dummy event tip-bot for Kan Liang
  1 sibling, 1 reply; 8+ messages in thread
From: Jiri Olsa @ 2017-07-03  7:58 UTC (permalink / raw)
  To: kan.liang
  Cc: acme, linux-kernel, mingo, peterz, adrian.hunter, alexander.shishkin, ak

On Fri, Jun 30, 2017 at 10:16:56AM -0400, kan.liang@intel.com wrote:
> From: Kan Liang <kan.liang@intel.com>
> 
> An earlier kernel patch allowed enabling PT and LBR at the same time on
> Goldmont.
> 
> commit ccbebba4c6bf ("perf/x86/intel/pt: Bypass PT vs. LBR exclusivity
> if the core supports it")
> 
> However, users still cannot use Intel PT and LBRs simultaneously.
>  $ sudo perf record -e cycles,intel_pt//u -b  -- sleep 1
>  Error:
>  PMU Hardware doesn't support sampling/overflow-interrupts.
> 
> PT implicitly adds dummy event in perf tool. dummy event is software
> event which doesn't support LBR.
> 
> Always setting no branch for dummy event in Intel PT.
> 
> Signed-off-by: Kan Liang <kan.liang@intel.com>

for the patchset:

Acked-by: Jiri Olsa <jolsa@kernel.org>

thanks,
jirka

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH V2 2/2] perf tools: always set no branch for dummy event in PT
  2017-07-03  7:58   ` Jiri Olsa
@ 2017-07-03 16:59     ` Arnaldo Carvalho de Melo
  2017-07-19 14:28       ` Liang, Kan
  0 siblings, 1 reply; 8+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-07-03 16:59 UTC (permalink / raw)
  To: Jiri Olsa
  Cc: kan.liang, linux-kernel, mingo, peterz, adrian.hunter,
	alexander.shishkin, ak

Em Mon, Jul 03, 2017 at 09:58:32AM +0200, Jiri Olsa escreveu:
> On Fri, Jun 30, 2017 at 10:16:56AM -0400, kan.liang@intel.com wrote:
> > From: Kan Liang <kan.liang@intel.com>
> > 
> > An earlier kernel patch allowed enabling PT and LBR at the same time on
> > Goldmont.
> > 
> > commit ccbebba4c6bf ("perf/x86/intel/pt: Bypass PT vs. LBR exclusivity
> > if the core supports it")
> > 
> > However, users still cannot use Intel PT and LBRs simultaneously.
> >  $ sudo perf record -e cycles,intel_pt//u -b  -- sleep 1
> >  Error:
> >  PMU Hardware doesn't support sampling/overflow-interrupts.
> > 
> > PT implicitly adds dummy event in perf tool. dummy event is software
> > event which doesn't support LBR.
> > 
> > Always setting no branch for dummy event in Intel PT.
> > 
> > Signed-off-by: Kan Liang <kan.liang@intel.com>
> 
> for the patchset:
> 
> Acked-by: Jiri Olsa <jolsa@kernel.org>

Thanks, applied.

- Arnaldo

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: [PATCH V2 2/2] perf tools: always set no branch for dummy event in PT
  2017-07-03 16:59     ` Arnaldo Carvalho de Melo
@ 2017-07-19 14:28       ` Liang, Kan
  2017-07-19 14:35         ` Arnaldo Carvalho de Melo
  0 siblings, 1 reply; 8+ messages in thread
From: Liang, Kan @ 2017-07-19 14:28 UTC (permalink / raw)
  To: Arnaldo Carvalho de Melo, Jiri Olsa
  Cc: linux-kernel, mingo, peterz, Hunter, Adrian, alexander.shishkin, ak



> Em Mon, Jul 03, 2017 at 09:58:32AM +0200, Jiri Olsa escreveu:
> > On Fri, Jun 30, 2017 at 10:16:56AM -0400, kan.liang@intel.com wrote:
> > > From: Kan Liang <kan.liang@intel.com>
> > >
> > > An earlier kernel patch allowed enabling PT and LBR at the same time
> > > on Goldmont.
> > >
> > > commit ccbebba4c6bf ("perf/x86/intel/pt: Bypass PT vs. LBR
> > > exclusivity if the core supports it")
> > >
> > > However, users still cannot use Intel PT and LBRs simultaneously.
> > >  $ sudo perf record -e cycles,intel_pt//u -b  -- sleep 1
> > >  Error:
> > >  PMU Hardware doesn't support sampling/overflow-interrupts.
> > >
> > > PT implicitly adds dummy event in perf tool. dummy event is software
> > > event which doesn't support LBR.
> > >
> > > Always setting no branch for dummy event in Intel PT.
> > >
> > > Signed-off-by: Kan Liang <kan.liang@intel.com>
> >
> > for the patchset:
> >
> > Acked-by: Jiri Olsa <jolsa@kernel.org>
> 
> Thanks, applied.
> 

Hi Arnaldo,

The patch series looks miss the latest update.
Could you please have a look?

Thanks,
Kan

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [PATCH V2 2/2] perf tools: always set no branch for dummy event in PT
  2017-07-19 14:28       ` Liang, Kan
@ 2017-07-19 14:35         ` Arnaldo Carvalho de Melo
  0 siblings, 0 replies; 8+ messages in thread
From: Arnaldo Carvalho de Melo @ 2017-07-19 14:35 UTC (permalink / raw)
  To: Liang, Kan
  Cc: Jiri Olsa, linux-kernel, mingo, peterz, Hunter, Adrian,
	alexander.shishkin, ak

Em Wed, Jul 19, 2017 at 02:28:26PM +0000, Liang, Kan escreveu:
> 
> 
> > Em Mon, Jul 03, 2017 at 09:58:32AM +0200, Jiri Olsa escreveu:
> > > On Fri, Jun 30, 2017 at 10:16:56AM -0400, kan.liang@intel.com wrote:
> > > > From: Kan Liang <kan.liang@intel.com>
> > > >
> > > > An earlier kernel patch allowed enabling PT and LBR at the same time
> > > > on Goldmont.
> > > >
> > > > commit ccbebba4c6bf ("perf/x86/intel/pt: Bypass PT vs. LBR
> > > > exclusivity if the core supports it")
> > > >
> > > > However, users still cannot use Intel PT and LBRs simultaneously.
> > > >  $ sudo perf record -e cycles,intel_pt//u -b  -- sleep 1
> > > >  Error:
> > > >  PMU Hardware doesn't support sampling/overflow-interrupts.
> > > >
> > > > PT implicitly adds dummy event in perf tool. dummy event is software
> > > > event which doesn't support LBR.
> > > >
> > > > Always setting no branch for dummy event in Intel PT.
> > > >
> > > > Signed-off-by: Kan Liang <kan.liang@intel.com>
> > >
> > > for the patchset:
> > >
> > > Acked-by: Jiri Olsa <jolsa@kernel.org>
> > 
> > Thanks, applied.
> > 
> 
> Hi Arnaldo,
> 
> The patch series looks miss the latest update.
> Could you please have a look?

Will, check, thanks for verifying.

- Arnaldo

^ permalink raw reply	[flat|nested] 8+ messages in thread

* [tip:perf/core] perf intel-pt: Set no_aux_samples for the tracking event
  2017-06-30 14:16 [PATCH V2 1/2] perf tools: set no_aux_samples for the tracking event in PT kan.liang
  2017-06-30 14:16 ` [PATCH V2 2/2] perf tools: always set no branch for dummy " kan.liang
@ 2017-07-26 17:13 ` tip-bot for Kan Liang
  1 sibling, 0 replies; 8+ messages in thread
From: tip-bot for Kan Liang @ 2017-07-26 17:13 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: tglx, mingo, hpa, jolsa, linux-kernel, acme, alexander.shishkin,
	peterz, kan.liang, ak, adrian.hunter

Commit-ID:  69d8bd8aa7d8906a1e922ae884d97f0bd7f1b269
Gitweb:     http://git.kernel.org/tip/69d8bd8aa7d8906a1e922ae884d97f0bd7f1b269
Author:     Kan Liang <kan.liang@intel.com>
AuthorDate: Fri, 30 Jun 2017 10:16:55 -0400
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 20 Jul 2017 09:55:50 -0300

perf intel-pt: Set no_aux_samples for the tracking event

The reason of introducing the tracking event (a dummy software event) is
to collect side-band information. Additional sampling is wasteful.
no_aux_samples should be set for tracking event.

Signed-off-by: Kan Liang <kan.liang@intel.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20170630141656.1626-1-kan.liang@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/arch/x86/util/intel-pt.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/perf/arch/x86/util/intel-pt.c b/tools/perf/arch/x86/util/intel-pt.c
index 9535be5..4a461e8 100644
--- a/tools/perf/arch/x86/util/intel-pt.c
+++ b/tools/perf/arch/x86/util/intel-pt.c
@@ -752,6 +752,7 @@ static int intel_pt_recording_options(struct auxtrace_record *itr,
 		tracking_evsel->attr.freq = 0;
 		tracking_evsel->attr.sample_period = 1;
 
+		tracking_evsel->no_aux_samples = true;
 		if (need_immediate)
 			tracking_evsel->immediate = true;
 

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* [tip:perf/core] perf intel-pt: Always set no branch for dummy event
  2017-06-30 14:16 ` [PATCH V2 2/2] perf tools: always set no branch for dummy " kan.liang
  2017-07-03  7:58   ` Jiri Olsa
@ 2017-07-26 17:13   ` tip-bot for Kan Liang
  1 sibling, 0 replies; 8+ messages in thread
From: tip-bot for Kan Liang @ 2017-07-26 17:13 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: peterz, kan.liang, alexander.shishkin, tglx, mingo, hpa,
	linux-kernel, acme, jolsa, ak, adrian.hunter

Commit-ID:  91a8c5b840f2da31280e14b6268761cf14033756
Gitweb:     http://git.kernel.org/tip/91a8c5b840f2da31280e14b6268761cf14033756
Author:     Kan Liang <kan.liang@intel.com>
AuthorDate: Fri, 30 Jun 2017 10:16:56 -0400
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Thu, 20 Jul 2017 09:55:51 -0300

perf intel-pt: Always set no branch for dummy event

An earlier kernel patch allowed enabling PT and LBR at the same time on
Goldmont.

commit ccbebba4c6bf ("perf/x86/intel/pt: Bypass PT vs. LBR exclusivity
if the core supports it")

However, users still cannot use Intel PT and LBRs simultaneously.  $
sudo perf record -e cycles,intel_pt//u -b  -- sleep 1 Error: PMU
Hardware doesn't support sampling/overflow-interrupts.

PT implicitly adds dummy event in perf tool. dummy event is software
event which doesn't support LBR.

Always setting no branch for dummy event in Intel PT.

Signed-off-by: Kan Liang <kan.liang@intel.com>
Acked-by: Jiri Olsa <jolsa@redhat.com>
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/20170630141656.1626-2-kan.liang@intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/arch/x86/util/intel-pt.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/perf/arch/x86/util/intel-pt.c b/tools/perf/arch/x86/util/intel-pt.c
index 4a461e8..db0ba8c 100644
--- a/tools/perf/arch/x86/util/intel-pt.c
+++ b/tools/perf/arch/x86/util/intel-pt.c
@@ -701,6 +701,7 @@ static int intel_pt_recording_options(struct auxtrace_record *itr,
 				perf_evsel__set_sample_bit(switch_evsel, TID);
 				perf_evsel__set_sample_bit(switch_evsel, TIME);
 				perf_evsel__set_sample_bit(switch_evsel, CPU);
+				perf_evsel__reset_sample_bit(switch_evsel, BRANCH_STACK);
 
 				opts->record_switch_events = false;
 				ptr->have_sched_switch = 3;
@@ -762,6 +763,7 @@ static int intel_pt_recording_options(struct auxtrace_record *itr,
 			/* And the CPU for switch events */
 			perf_evsel__set_sample_bit(tracking_evsel, CPU);
 		}
+		perf_evsel__reset_sample_bit(tracking_evsel, BRANCH_STACK);
 	}
 
 	/*

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-07-26 17:16 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-30 14:16 [PATCH V2 1/2] perf tools: set no_aux_samples for the tracking event in PT kan.liang
2017-06-30 14:16 ` [PATCH V2 2/2] perf tools: always set no branch for dummy " kan.liang
2017-07-03  7:58   ` Jiri Olsa
2017-07-03 16:59     ` Arnaldo Carvalho de Melo
2017-07-19 14:28       ` Liang, Kan
2017-07-19 14:35         ` Arnaldo Carvalho de Melo
2017-07-26 17:13   ` [tip:perf/core] perf intel-pt: Always set no branch for dummy event tip-bot for Kan Liang
2017-07-26 17:13 ` [tip:perf/core] perf intel-pt: Set no_aux_samples for the tracking event tip-bot for Kan Liang

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.