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


Groups > linux.kernel > #1678861 > unrolled thread

[PATCH V2 1/2] perf tools: set no_aux_samples for the tracking event in PT

Started bykan.liang@intel.com
First post2017-06-30 16:20 +0200
Last post2017-07-03 10:00 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH V2 1/2] perf tools: set no_aux_samples for the tracking event in PT kan.liang@intel.com - 2017-06-30 16:20 +0200
    [PATCH V2 2/2] perf tools: always set no branch for dummy event in PT kan.liang@intel.com - 2017-06-30 16:20 +0200
      Re: [PATCH V2 2/2] perf tools: always set no branch for dummy event  in PT Jiri Olsa <jolsa@redhat.com> - 2017-07-03 10:00 +0200

#1678861 — [PATCH V2 1/2] perf tools: set no_aux_samples for the tracking event in PT

Fromkan.liang@intel.com
Date2017-06-30 16:20 +0200
Subject[PATCH V2 1/2] perf tools: set no_aux_samples for the tracking event in PT
Message-ID<tY4W5-6wZ-7@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1678871 — [PATCH V2 2/2] perf tools: always set no branch for dummy event in PT

Fromkan.liang@intel.com
Date2017-06-30 16:20 +0200
Subject[PATCH V2 2/2] perf tools: always set no branch for dummy event in PT
Message-ID<tY4W7-6wZ-43@gated-at.bofh.it>
In reply to#1678861
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

[toc] | [prev] | [next] | [standalone]


#1679721 — Re: [PATCH V2 2/2] perf tools: always set no branch for dummy event in PT

FromJiri Olsa <jolsa@redhat.com>
Date2017-07-03 10:00 +0200
SubjectRe: [PATCH V2 2/2] perf tools: always set no branch for dummy event in PT
Message-ID<tZ4r0-6vk-13@gated-at.bofh.it>
In reply to#1678871
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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web